Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2014-12-11 15:05:11 +0000
committerMickael ADAM2014-12-11 15:05:11 +0000
commit819225bc9d115e1a40fcc106654fcd6088183dce (patch)
tree1033186a36a93c9378b60c99631313fb0dbdde9a /plugins
parentde200440d37c73fc25545afe4a3d77d674013eda (diff)
parent85785b7900e513a0d47ba435349a613f5f8d1ad0 (diff)
downloadorg.eclipse.papyrus-819225bc9d115e1a40fcc106654fcd6088183dce.tar.gz
org.eclipse.papyrus-819225bc9d115e1a40fcc106654fcd6088183dce.tar.xz
org.eclipse.papyrus-819225bc9d115e1a40fcc106654fcd6088183dce.zip
Merge branch master into shape branch.
Conflicts: plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/NodeEditPart.xtend plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AbstractionNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAbstractionEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAssociationEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeDependencyEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeGeneralizationSetLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeInterfaceRealizationEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageImportEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageMergeEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeRealizationEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeSubstitutionEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeTemplateBindingEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeUsageEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotyperGeneralizationEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchMutliplicityEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchRoleEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleSourceEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleTargetEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicitySourceEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicityTargetEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationSourceNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationTargetNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/BindingSubstitutionEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContextLinkAppliedStereotypeEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ElementImportAliasEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowAppliedStereotypeEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowConveyedLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceRealizationNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RealizationNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SourceISLinkLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SubstitutionNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TargetISLinkLabelEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UsageNameEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/edit/policies/CustomGraphicalNodeEditPolicy.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml Change-Id: I723e9c8e78ca10425c684128686da2f30327dc11 Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/impl/diagram/editparts/.gitignore1
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkLabelEditPart.xtend37
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/ExternalNodeLabelEditPart.xtend32
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/LinkLabelEditPart.xtend5
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/NodeEditPart.xtend26
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/META-INF/MANIFEST.MF3
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore10
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml12
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionFactory.java10
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionPackage.java147
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/SpecificNodePlate.java108
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionFactoryImpl.java15
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionPackageImpl.java66
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/SpecificNodePlateImpl.java282
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingLabelDisplayBehavior.java223
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionAdapterFactory.java21
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionSwitch.java29
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/.project6
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css16
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF104
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css356
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/arrow.svg37
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/cross.svg30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/diamond.svg29
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/flag.svg37
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/hourglass.svg30
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_full.svg29
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_with_cross.svg33
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_with_dot.svg32
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/stickman.svg15
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/NodeEditPart.java641
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java816
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/BorderDisplayEditPolicy.java185
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/ExternalLabelPrimaryDragRoleEditPolicy.java199
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/GetChildLayoutEditPolicy.java68
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/RefreshTextAlignmentEditPolicy.java10
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/OneTopLineResizableBorder.java206
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/BorderedScalableImageFigure.java231
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/IRoundedRectangleFigure.java119
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RectangularShadowBorder.java102
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleNodePlateFigure.java260
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleShadowBorder.java158
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java884
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SlidableRoundedRectangleAnchor.java221
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/PapyrusRoundedEditPartHelper.java227
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java78
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/shape/ShapeService.java529
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java39
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/figure/CustomRequirementFigure.java113
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/draw2d/StructuredActivityNodeFigure.java332
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAcceptEventActionEditPart.java252
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPart.java119
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPartCN.java119
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityFinalNodeEditPart.java116
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityParameterNodeEditPart.java80
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityPartitionEditPart.java41
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddStructuralFeatureValueActionEditPart.java110
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddVariableValueActionEditPart.java113
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomBroadcastSignalActionEditPart.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallBehaviorActionEditPart.java83
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallOperationActionEditPart.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCentralBufferNodeEditPart.java103
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomConditionalNodeEditPart.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCreateObjectActionEditPart.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDataStoreNodeEditPart.java103
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDecisionNodeEditPart.java116
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDestroyObjectActionEditPart.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomExpansionRegionEditPart.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomFlowFinalNodeEditPart.java116
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomForkNodeEditPart.java113
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomInitialNodeEditPart.java116
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomInterruptibleActivityRegionEditPart.java115
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomJoinNodeEditPart.java113
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomLoopNodeEditPart.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomMergeNodeEditPart.java116
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomOpaqueActionEditPart.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadSelfActionEditPart.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadStructuralFeatureActionEditPart.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadVariableActionEditPart.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSendObjectActionEditPart.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSendSignalActionEditPart.java130
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSequenceNodeEditPart.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomStructuredActivityNodeEditPart.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomUMLEditPartFactory.java394
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomValueSpecificationActionEditPart.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/RoundedUMLNodeEditPart.java171
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/AcceptEventActionFigure.java766
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java968
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityPartitionFigure.java112
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/CallBehaviorActionFigure.java118
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java516
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/AcceptEventActionSwitchHelper.java339
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptEventActionParser.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen36490
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionEditPart.java3058
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionFloatingNameEditPart.java819
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionLabelEditPart.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptTimeEventActionLabelEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPart.java966
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPartCN.java950
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityFinalNodeEditPart.java2321
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityFinalNodeFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityParameterNodeEditPart.java2587
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityPartitionEditPart.java783
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityPartitionFloatingNameEditPart.java819
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionEditPart.java3122
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionEditPart.java3081
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionEditPart.java2950
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionEditPart.java3153
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionEditPart.java3102
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeEditPart.java2526
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ConditionalNodeEditPart.java2930
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionEditPart.java2990
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeEditPart.java2558
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionInputEditPart.java1855
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionNodeEditPart.java2284
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionNodeFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionEditPart.java2916
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ExpansionRegionEditPart.java3000
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/FlowFinalNodeEditPart.java2319
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/FlowFinalNodeFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ForkNodeEditPart.java2356
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ForkNodeFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InitialNodeEditPart.java2319
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InitialNodeFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InterruptibleActivityRegionEditPart.java620
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/JoinNodeEditPart.java2346
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/JoinNodeFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/LoopNodeEditPart.java3040
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/MergeNodeEditPart.java2300
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/MergeNodeFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionEditPart.java3036
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionEditPart.java2948
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionEditPart.java3070
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionEditPart.java3014
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionEditPart.java3082
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendSignalActionEditPart.java3124
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendSignalActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SequenceNodeEditPart.java2920
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/StructuredActivityNodeEditPart.java2920
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/UMLEditPartFactory.java1514
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionEditPart.java2974
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionFloatingNameEditPart.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java8714
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLParserProvider.java7120
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLViewProvider.java6984
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF197
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/AbstractObservationEditPart.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CAssociationNodeEditPart.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CDependencyNodeEditPart.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomComponentEditPart.java48
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomConstraintEditPartCN.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomDurationObservationEditPart.java112
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomDurationObservationFloatingNameEditPart.java52
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomTimeObservationEditPart.java112
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomTimeObservationFloatingNameEditPart.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/factory/CustomUMLEditPartFactory.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/AbstractObservationNodeFigure.java124
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/DurationObservationNodeFigure.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/TimeObservationNodeFigure.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/nodes/InformationItemFigure.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/InformationItemFigure.java)76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/ObservationLayoutEditPolicy.java126
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen17012
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml3934
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForComponentCreateCommand.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShortCutDiagramCreateCommand.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AbstractionNameEditPart.java1651
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAbstractionEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAssociationEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeDependencyEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeGeneralizationSetLabelEditPart.java1651
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeInterfaceRealizationEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageImportEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageMergeEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeRealizationEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeSubstitutionEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeTemplateBindingEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeUsageEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotyperGeneralizationEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchMutliplicityEditPart.java1639
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchRoleEditPart.java1639
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassAttributeCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassEditPart.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassNestedClassifierCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassOperationCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleSourceEditPart.java1639
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleTargetEditPart.java1639
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicitySourceEditPart.java1639
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicityTargetEditPart.java1639
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationNameEditPart.java1685
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationNodeEditPart.java81
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationSourceNameEditPart.java1639
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationTargetNameEditPart.java1639
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/BindingSubstitutionEditPart.java1655
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassAttributeCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassAttributeCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassEditPart.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassEditPartCN.java73
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassFloatingNameEditPartCN.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNameEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNestedClassifierCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNestedClassifierCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassOperationCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassOperationCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentBodyEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentBodyEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentAttributeCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentAttributeCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentEditPart.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentEditPartCN.java59
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentFloatingNameEditPartCN.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNameEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNestedClassifierCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNestedClassifierCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentOperationCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentOperationCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintBodyEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintBodyEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintLabelEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintNameEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContainmentCircleEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContextLinkAppliedStereotypeEditPart.java1639
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeAttributeCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeAttributeCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeEditPart.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeEditPartCN.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeFloatingNameEditPartCN.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeNameEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeOperationCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeOperationCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DefaultNamedElementEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DefaultNamedElementNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyNameEditPart.java1651
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyNodeEditPart.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DiagramNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationEditPart.java29
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationStereotypeLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ElementImportAliasEditPart.java1651
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEditPart.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEditPartCN.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationFloatingNameEditPartCN.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationNameEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowAppliedStereotypeEditPart.java1639
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowConveyedLabelEditPart.java1655
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemEditPart.java65
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemEditPartCN.java65
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemFloatingNameEditPartCN.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemNameEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationEditPart.java67
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationEditPartCN.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationFloatingNameEditPartCN.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationNameEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceAttributeCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceAttributeCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceEditPart.java59
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceEditPartCN.java59
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceFloatingNameEditPartCN.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNameEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNestedClassifierCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNestedClassifierCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceOperationCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceOperationCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceRealizationNameEditPart.java1651
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPartCN.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPartTN.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelNameEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelNameEditPartTN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelPackageableElementCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelPackageableElementCompartmentEditPartTN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/MultiDependencyLabelEditPart.java1702
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageEditPart.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageEditPartCN.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageNameEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackagePackageableElementCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackagePackageableElementCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeAttributeCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeAttributeCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPart.java65
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPartCN.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeFloatingNameEditPartCN.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeNameEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeOperationCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeOperationCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RealizationNameEditPart.java1651
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RedefinableTemplateSignatureEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RedefinableTemplateSignatureTemplateParameterCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ShortCutDiagramEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalAttributeCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalAttributeCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalEditPart.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalEditPartCN.java59
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalFloatingNameEditPartCN.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalNameEditPartCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SourceISLinkLabelEditPart.java1641
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SubstitutionNameEditPart.java1651
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TargetISLinkLabelEditPart.java1641
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TemplateSignatureEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TemplateSignatureTemplateParameterCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationEditPart.java29
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationFloatingNameEditPart.java862
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationStereotypeLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UMLEditPartFactory.java71
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UsageNameEditPart.java1651
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/UMLBaseItemSemanticEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramEditorUtil.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramUpdater.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDocumentProvider.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLPaletteFactory.java1930
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLVisualIDRegistry.java71
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLParserProvider.java450
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLViewProvider.java349
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/sheet/UMLPropertySection.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/deepHistory.svg33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/durationObservation.svg19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/shallowHistory.svg32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/timeObservation.svg19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/AbstractBorderEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/AbstractInteractionEditPart.java54
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassEditPart.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassifierEditPart.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/FloatingLabelEditPart.java81
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/NamedElementEditPart.java131
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedBorderNamedElementEditPart.java189
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedCompartmentEditPart.java180
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/BorderItemResizableEditPolicy.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/ConstrainedItemBorderLayoutEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/MaskManagedFloatingLabelEditPolicy.java248
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AffixedNamedElementFigure.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ClassFigure.java93
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ClassifierFigure.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DataTypeFigure.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DependencyNodeFigure.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/EnumerationFigure.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FinalNode.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FlowFinalNode.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ForkNode.java57
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InitialNode.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InstanceSpecificationFigure.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusNodeFigure.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PrimitiveTypeFigure.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/RoundedCompartmentFigure.java404
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/SignalFigure.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/FloatingLabelHelper.java325
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/ExternalLabelPositionLocator.java66
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java274
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/RoundedRectangleLabelPositionLocator.java714
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF162
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/AbstractObservationEditPart.java73
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomDurationObservationLabelEditPartCN.java57
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomLifelineEditPartCN.java133
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomTimeObservationNameEditPartCN.java57
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/factory/CustomUMLeditPartFactory.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/InteractionRectangleFigure.java91
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.gmfgen2194
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml1058
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentAnnotatedElementReorientCommand.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConnectorDurationObservationReorientCommand.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConnectorTimeObservationReorientCommand.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintConstrainedElementReorientCommand.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ShortCutDiagramCreateCommand.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/AppliedStereotypeMessageEditPart.java1635
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentBodyEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentEditPartCN.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintBodyEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintNameEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DiagramNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationEditPartCN.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationLabelEditPartCN.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationStereotypeLabelEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionCompartmentEditPart.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionEditPart.java69
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionFloatingLabelEditPart.java849
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionNameEditPart.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineEditPartCN.java75
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineFloatingLabelEditPartCN.java850
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/MessageNameEditPart.java1679
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ModelEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ShortCutDiagramEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationEditPartCN.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationNameEditPartCN.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationStereotypeLabelEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/UMLEditPartFactory.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/CommentItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ConstraintItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/DurationObservationItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/LifelineItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/MessageItemSemanticEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ModelCanonicalEditPolicy.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/TimeObservationItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorContentProvider.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorContentProvider.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditorUtil.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramUpdater.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDocumentProvider.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLInitDiagramFileAction.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLVisualIDRegistry.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/providers/UMLParserProvider.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/providers/UMLViewProvider.java78
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/edit/part/CustomPortEditPart.java39
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/figure/nodes/CompositeFigure.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/figure/nodes/LollipopInterfaceFigure.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/locators/PortPositionLocator.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen257
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml1902
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/AbstractionCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandPCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentRealizationCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommandPCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DefaultNamedElementCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyBranchCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyNodeCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/GeneralizationCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommandPCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceRealizationCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ManifestationCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/OperationForInterfaceCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyForInterfaceCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ReceptionInInterfaceCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/RectangleInterfaceCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/SubstitutionCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionAppliedStereotypeEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionNameEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentBodyEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentBodyEditPartPCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentEditPartPCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPart.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartCN.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartPCN.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentDiagramEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPart.java65
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPartCN.java65
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPartPCN.java65
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPart.java856
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPartCN.java856
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPartPCN.java856
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPartCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPartPCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationAppliedStereotypeEditPart.java1643
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationNameEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorAppliedStereotypeEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorNameEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintEditPartPCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintNameEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintNameEditPartPCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintSpecificationEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintSpecificationEditPartPCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DefaultNamedElementEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DefaultNamedElementNameEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyAppliedStereotypeEditPart.java1643
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNameEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNodeEditPart.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNodeFloatingLabelEditPart.java856
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/GeneralizationAppliedStereotypeEditPart.java1643
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceAttributeCompartmentEditPart.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceAttributeCompartmentEditPartCN.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceEditPart.java42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceEditPartPCN.java42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceFloatingLabelEditPart.java856
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceFloatingLabelEditPartPCN.java856
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceNameEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceNameEditPartPCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceOperationCompartmentEditPart.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceOperationCompartmentEditPartCN.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationAppliedStereotypeEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationNameEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelNameEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelNameEditPartCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/MultiDependencyLabelEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/OperationForInterfaceEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageNameEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageNameEditPartCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortAppliedStereotypeEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortEditPart.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortFloatingNameEditPart.java813
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortNameEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyForInterfaceEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyPartEditPartCN.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyPartNameEditPartCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ReceptionInInterfaceEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceEditPart.java79
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceEditPartCN.java79
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceFloatingLabelEditPart.java856
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceFloatingLabelEditPartCN.java856
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceNameEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceNameEditPartCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionAppliedStereotypeEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionNameEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/UMLEditPartFactory.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelCanonicalEditPolicy.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/OperationForInterfaceItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ReceptionInInterfaceItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/RectangleInterfaceItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/SubstitutionItemSemanticEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UMLBaseItemSemanticEditPolicy.java39
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/expressions/UMLOCLFactory.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDiagramEditorUtil.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDiagramUpdater.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDocumentProvider.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLLinkDescriptor.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLVisualIDRegistry.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/ValidateAction.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLParserProvider.java176
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLViewProvider.java295
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/sheet/UMLPropertySection.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/META-INF/MANIFEST.MF155
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/figure/nodes/ArtifactFigure.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/model/DeploymentDiagram.gmfgen6161
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/plugin.xml1584
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommand.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandACN.java252
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementCreateCommand.java216
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementReorientCommand.java330
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommand.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementCreateCommand.java216
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementReorientCommand.java330
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommand.java262
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchCreateCommand.java342
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchReorientCommand.java374
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyCreateCommand.java342
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyNodeCreateCommand.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyReorientCommand.java374
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentCreateCommand.java342
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentReorientCommand.java374
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommand.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommand.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationCreateCommand.java340
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationReorientCommand.java348
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationCreateCommand.java342
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationReorientCommand.java374
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommand.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedArtifactNodeCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedDeviceCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedExecutionEnvironmentCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedNodeCreateCommandCN.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommand.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommandCN.java252
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommand.java252
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommandCN.java252
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPart.java276
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPartACN.java276
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPartCN.java276
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPart.java663
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPartACN.java663
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPartCN.java648
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPartACN.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPartCN.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPart.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPartACN.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPartCN.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentBodyEditPart.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentBodyEditPartCN.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentEditPart.java563
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentEditPartCN.java563
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintEditPart.java574
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintEditPartCN.java574
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintNameEditPart.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintNameEditPartCN.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintSpecificationEditPart.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintSpecificationEditPartCN.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DefaultNamedElementEditPart.java570
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DefaultNamedElementNameEditPart.java1776
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyAppliedStereotypeEditPart.java1658
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyEditPart.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyNameEditPart.java1658
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyNodeEditPart.java488
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentAppliedStereotypeEditPart.java1658
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentDiagramEditPart.java126
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentEditPart.java248
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentNameEditPart.java1658
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceCompositeCompartmentEditPart.java270
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceCompositeCompartmentEditPartCN.java274
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceEditPart.java610
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceEditPartCN.java580
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceNameEditPart.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceNameEditPartCN.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java270
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java274
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentEditPart.java610
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentEditPartCN.java580
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentNameEditPart.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentNameEditPartCN.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/GeneralizationAppliedStereotypeEditPart.java1642
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/GeneralizationEditPart.java234
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationAppliedStereotypeEditPart.java1658
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationEditPart.java248
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationNameEditPart.java1658
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelEditPart.java598
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelEditPartCN.java598
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelNameEditPart.java1776
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelNameEditPartCN.java1776
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelPackageableElementCompartmentEditPart.java270
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelPackageableElementCompartmentEditPartCN.java270
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/MultiDependencyLabelEditPart.java1702
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedArtifactNameEditPart.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedArtifactNodeEditPartCN.java567
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedDeviceEditPartCN.java586
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedDeviceNameEditPartCN.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedExecutionEnvironmentEditPartCN.java586
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedExecutionEnvironmentNameEditPartCN.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedNodeEditPartCN.java584
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedNodeNameEditPart.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeCompositeCompartmentEditPart.java270
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeCompositeCompartmentEditPartCN.java274
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeEditPart.java608
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeEditPartCN.java578
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeNameEditPart.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeNameEditPartCN.java1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageEditPart.java598
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageEditPartCN.java598
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageNameEditPart.java1776
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageNameEditPartCN.java1776
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackagePackageableElementCompartmentEditPart.java270
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackagePackageableElementCompartmentEditPartCN.java270
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/UMLEditPartFactory.java709
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicy.java352
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyACN.java352
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyCN.java352
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicy.java532
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyACN.java678
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyCN.java617
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java322
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicyCN.java338
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicy.java506
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicyCN.java530
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java522
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyBranchItemSemanticEditPolicy.java498
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyItemSemanticEditPolicy.java498
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyNodeItemSemanticEditPolicy.java498
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentItemSemanticEditPolicy.java498
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicy.java358
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicyCN.java358
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicy.java532
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicyCN.java556
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy.java380
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN.java380
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicy.java532
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicyCN.java556
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/GeneralizationItemSemanticEditPolicy.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ManifestationItemSemanticEditPolicy.java498
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelCanonicalEditPolicy.java1278
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicy.java1070
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicyCN.java1070
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java416
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java416
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedArtifactNodeItemSemanticEditPolicyCN.java617
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedDeviceItemSemanticEditPolicyCN.java806
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedExecutionEnvironmentItemSemanticEditPolicyCN.java742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedNodeItemSemanticEditPolicyCN.java870
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicy.java398
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicyCN.java398
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicy.java532
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicyCN.java556
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicy.java498
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicyCN.java498
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java416
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java412
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLBaseItemSemanticEditPolicy.java1090
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLTextNonResizableEditPolicy.java488
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLTextSelectionEditPolicy.java452
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/parsers/MessageFormatParser.java424
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/DiagramEditorContextMenuProvider.java124
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLCreationWizard.java356
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLCreationWizardPage.java196
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditor.java1100
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditorPlugin.java604
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditorUtil.java722
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramUpdater.java5858
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDocumentProvider.java2068
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLInitDiagramFileAction.java214
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLNewDiagramFileWizard.java388
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLVisualIDRegistry.java1982
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/ValidateAction.java604
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/ElementInitializers.java1370
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLEditPartProvider.java64
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLMarkerNavigationProvider.java192
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLParserProvider.java1710
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLValidationDecoratorProvider.java148
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLValidationProvider.java152
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLViewProvider.java2534
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/sheet/UMLPropertySection.java64
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/sheet/UMLSheetLabelProvider.java176
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/ActivityAsInteractionFigure.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionUseFigure.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionWithSnapshotFigure.java254
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/figure/StereotypeFigure.java74
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPartCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdateCommand.java88
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomPseudostateEntryPointEditPart.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomPseudostateExitPointEditPart.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateEditPart.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateMachineEditPart.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/factory/CustomUMLEditPartFactory.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/FinalStateFigure.java94
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateChoiceFigure.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateDeepHistoryFigure.java94
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateEntryPointFigure.java82
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateExitPointFigure.java56
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateInitialFigure.java104
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateJoinForkFigure.java89
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateJunctionFigure.java95
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateShallowHistoryFigure.java90
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateTerminateFigure.java98
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateFigure.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateMachineFigure.java133
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.gmfgen5418
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml1742
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentBodyEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceStereotypeEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintBodyEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintEditPart.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintNameLabelEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ContextLinkAppliedStereotypeEditPart.java1640
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateEditPart.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateStereotypeEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/GeneralizationStereotypeEditPart.java1642
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PackageEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceEditPart.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceStereotypeEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryEditPart.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryStereotypeEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointEditPart.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointStereotypeEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointEditPart.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointStereotypeEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkEditPart.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkNameEditPart.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkStereotypeEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialEditPart.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialStereotypeEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinEditPart.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinStereotypeEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionEditPart.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionStereotypeEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryEditPart.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryStereotypeEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateEditPart.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateStereotypeEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateCompartmentEditPart.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateEditPart.java75
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineEditPart.java22
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateNameEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionGuardEditPart.java1676
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionNameEditPart.java1676
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionStereotypeEditPart.java1642
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/UMLEditPartFactory.java43
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/CommentItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ConnectionPointReferenceItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ConstraintItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/DoActivityStateBehaviorStateItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/EntryStateBehaviorItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ExitStateBehaviorItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/FinalStateItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/GeneralizationItemSemanticEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/InternalTransitionItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateChoiceItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateDeepHistoryItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateEntryPointItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateExitPointItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateForkItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateInitialItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateJoinItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateJunctionItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateShallowHistoryItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateTerminateItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/RegionItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/TransitionItemSemanticEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditorUtil.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramUpdater.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDocumentProvider.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java46
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLParserProvider.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLViewProvider.java112
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/sheet/UMLPropertySection.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/META-INF/MANIFEST.MF60
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/plugin.xml183
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/AcceptEventActionShapeProvider.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ActorShapeProvider.java)401
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/ExternalLabelPrimaryDragRoleEditPolicy.java174
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/META-INF/MANIFEST.MF176
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/CustomUseCaseEditPartTN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/CustomUseCasePointsEditPartTN.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/SubjectNodeEditPart.java32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/UseCaseNodeEditPart.java31
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/factory/CustomUMLEditPartFactory.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/figure/SubjectFigure.java121
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/figure/UseCaseFigure.java121
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/models/usecaseDiagram.gmfgen6224
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/plugin.xml2000
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentAnnotatedElementReorientCommand.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintConstrainedElementReorientCommand.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShortCutDiagramCreateCommand.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AbstractionNameEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAppliedStereotypeEditPartTN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAsRectangleEditPartTN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAsRectangleNameEditPartTN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorEditPartTN.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorFloatingLabelEditPartTN.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentAppliedStereotypeEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentEditPart.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageAppliedStereotypeEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageEditPart.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorNameEditPartTN.java1762
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameEditPartTN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameInCEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameInPEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypeAbstractionEditPart.java1643
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypePackageMergeEditPart.java1643
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypeUsageEditPart.java1643
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AssociationAppliedStereotypeEditPart.java1643
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AssociationNameEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentBodyEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentBodyEditPartTN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentEditPartTN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInComponentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInComponentNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageEditPart.java83
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageNameEditPart.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentUsecases2EditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentUsecases3EditPart.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyInCEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyInPEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintEditPartTN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInComponentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInComponentNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInPackageEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInPackageNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintNameEditPartTN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DefaultNamedElementEditPartTN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DefaultNamedElementNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DependencyAppliedStereotypeEditPart.java1643
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DependencyNameEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DiagramNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtendAppliedStereotypeEditPart.java1643
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtendsLink_fixedEditPart.java1661
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtensionPointEditPart.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtensionPointInRectangleEditPart.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/GeneralizationAppliedStereotypeEditPart.java1643
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/IncludeAppliedStereotypeEditPart.java1643
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/IncludeLink_fixedEditPart.java1661
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageEditPartCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageEditPartTN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageImportAppliedStereotypeEditPart.java1643
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageNameEditPartCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageNameEditPartTN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackagePackageableElementCompartment2EditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackagePackageableElementCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/RealizationAppliedStereotypeEditPart.java1643
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/RealizationNameEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ShortCutDiagramEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierEditPartTN.java67
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierFloatingLabelEditPartTN.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierNameEditPartTN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectComponentUsecasesEditPart.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UMLEditPartFactory.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UsageNameEditPart.java1659
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseAsRectangleEditPartTN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseAsRectangleNameEditPartTN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseDiagramEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseEditPartTN.java67
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseFloatingLabelEditPartTN.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentEditPart.java67
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageEditPart.java67
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageFloatingLabelEditPart.java861
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageNameEditPart.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseNameEditPartTN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsEditPartTN.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInComponentEditPart.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInPackageEditPart.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInRectangleEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/DefaultNamedElementItemSemanticEditPolicyTN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ExtensionPointInRectangleItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ExtensionPointItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseDiagramCanonicalEditPolicy.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/navigator/UMLDomainNavigatorContentProvider.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/navigator/UMLNavigatorContentProvider.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDiagramEditorUtil.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDiagramUpdater.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDocumentProvider.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLInitDiagramFileAction.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLVisualIDRegistry.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/providers/UMLParserProvider.java176
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/providers/UMLViewProvider.java178
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/sheet/UMLPropertySection.java2
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/parameter/xtext/generator/UmlParameterGenerator.java28
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ICustomAppearance.java318
1011 files changed, 320102 insertions, 234128 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/impl/diagram/editparts/.gitignore b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/impl/diagram/editparts/.gitignore
index 37f57489b1b..34f20c26406 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/impl/diagram/editparts/.gitignore
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/impl/diagram/editparts/.gitignore
@@ -7,3 +7,4 @@
/LinkEditPart.java
/LinkLabelEditPart.java
/NodeLabelEditPart.java
+/ExternalNodeLabelEditPart.java
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkLabelEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkLabelEditPart.xtend
index 03513d7a8c8..7dcf4beeee4 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkLabelEditPart.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/diagram/editparts/LinkLabelEditPart.xtend
@@ -19,6 +19,7 @@ import org.eclipse.gmf.codegen.gmfgen.GenLinkLabel
import org.eclipse.papyrus.papyrusgmfgenextension.LabelVisibilityPreference
import xpt.Common
import org.eclipse.gmf.codegen.gmfgen.CustomBehaviour
+import org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView
@Singleton class LinkLabelEditPart extends diagram.editparts.LinkLabelEditPart{
@Inject extension Common;
@@ -50,25 +51,21 @@ import org.eclipse.gmf.codegen.gmfgen.CustomBehaviour
««« END: PapyrusGenCode
'''
- override extendsList(GenLinkLabel it) '''extends org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart'''
-
- override createDefaultEditPolicies(GenLinkLabel it) '''
- /**
- * @generated Papyrus Generation
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new «diagram.getTextSelectionEditPolicyQualifiedClassName()»());
- ««« BEGIN: PapyrusGenCode
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy());
- ««« END: PapyrusGenCode
- ««« Get the added custom behavoir
- «FOR CustomBehaviour:it.behaviour.filter(typeof (CustomBehaviour))»
- installEditPolicy(«CustomBehaviour.key», new «CustomBehaviour.editPolicyQualifiedClassName»());
- «ENDFOR»
- }
+// override extendsList(GenLinkLabel it) '''extends org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart'''
+
+ override extendsList(GenLinkLabel it) '''
+ «««BEGIN: PapyrusGenCode
+ «««specify a java super class for external nodes
+ «IF it.eResource.allContents.filter(typeof (ExtendedGenView)).filter[v | v.genView.contains(it) && v.superOwnedEditPart != null].size != 0»
+ extends «FOR extendedObject : it.eResource.allContents.filter(typeof (ExtendedGenView)).filter[v|v.genView.contains(it) && v.superOwnedEditPart != null].toIterable»
+ «extendedObject.superOwnedEditPart»
+ «ENDFOR»
+ «««END: PapyrusGenCode
+ «ELSE»
+ extends org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart
+ «ENDIF»
'''
-
+
+
+
}
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/ExternalNodeLabelEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/ExternalNodeLabelEditPart.xtend
new file mode 100644
index 00000000000..2a80b048294
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/ExternalNodeLabelEditPart.xtend
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package aspects.impl.diagram.editparts
+
+import xpt.diagram.editparts.Common
+import org.eclipse.gmf.codegen.gmfgen.GenExternalNodeLabel
+import com.google.inject.Inject
+
+/**
+ * @author Mickael ADAM
+ *
+ */
+class ExternalNodeLabelEditPart extends impl.diagram.editparts.ExternalNodeLabelEditPart {
+
+ override additionalEditPolicies(GenExternalNodeLabel it){
+ '''
+ installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE, new org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy());
+ '''
+ }
+
+} \ No newline at end of file
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/LinkLabelEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/LinkLabelEditPart.xtend
index 80c54cde444..1175194be6e 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/LinkLabelEditPart.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/LinkLabelEditPart.xtend
@@ -38,5 +38,10 @@ import xpt.diagram.editparts.Common
««« End Papyrus Code
super.handleNotificationEvent(event);
'''
+
+ override additionalEditPolicies(GenLinkLabel it)
+ '''
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy());
+ '''
}
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/NodeEditPart.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/NodeEditPart.xtend
index 8c84ea36d0d..f6ab147f25e 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/NodeEditPart.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/NodeEditPart.xtend
@@ -35,6 +35,8 @@ import xpt.diagram.editparts.EditPartFactory
import xpt.diagram.editparts.Utils_qvto
import xpt.diagram.editpolicies.TextSelectionEditPolicy
import xpt.CodeStyle
+import xpt.diagram.ViewmapAttributesUtils_qvto
+import org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate
@Singleton class NodeEditPart extends impl.diagram.editparts.NodeEditPart {
@Inject extension Common;
@@ -43,8 +45,10 @@ import xpt.CodeStyle
@Inject extension EditPartsUtils_qvto;
@Inject extension VisualIDRegistry;
- @Inject extension Utils_qvto;
+ @Inject extension ViewmapAttributesUtils_qvto;
+ @Inject extension Utils_qvto;
+ @Inject extension xpt.diagram.Utils_qvto;
@Inject EditPartFactory xptEditPartFactory;
@Inject impl.diagram.editparts.TextAware xptTextAware;
@@ -177,6 +181,26 @@ override addFixedChild (GenNode it)'''
// }
// '''
+ override createNodePlate(GenNode it) '''
+ «IF it.eResource.allContents.filter(typeof(SpecificNodePlate)).filter[v |v.editParts.contains(it) && v.nodePlateQualifiedName!=null].size != 0»
+ «val editPart = it.eResource.allContents.filter(typeof(SpecificNodePlate)).filter[v |v.editParts.contains(it) && v.nodePlateQualifiedName!=null].head»
+ protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure createNodePlate() {
+ «editPart.nodePlateQualifiedName» result = new «editPart.nodePlateQualifiedName»(«IF getDiagram().isPixelMapMode()»«defaultSizeWidth(viewmap, 40)», «defaultSizeHeight(viewmap, 40)»«ELSE»getMapMode().DPtoLP(«defaultSizeWidth(viewmap, 40)»), getMapMode().DPtoLP(«defaultSizeHeight(viewmap, 40)»)«ENDIF»);
+ «setupNodePlate»
+ return result;
+ }
+ «««END: BEGIN: PapyrusGenCode
+ «ELSE»
+ ««« «super.createNodePlate(it)»
+ ««« By default node edit part are now RoundedRectangleNodePlateFigure
+ protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure createNodePlate() {
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure result = new org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure(«IF getDiagram().isPixelMapMode()»«defaultSizeWidth(viewmap, 40)», «defaultSizeHeight(viewmap, 40)»«ELSE»getMapMode().DPtoLP(«defaultSizeWidth(viewmap, 40)»), getMapMode().DPtoLP(«defaultSizeHeight(viewmap, 40)»)«ENDIF»);
+ «setupNodePlate»
+ return result;
+ }
+ «ENDIF»
+ '''
+
override borderItemSelectionEditPolicy(GenNode it)'''
«IF hasBorderItems(it)»
org.eclipse.gmf.runtime.notation.View childView = (org.eclipse.gmf.runtime.notation.View) child.getModel();
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/META-INF/MANIFEST.MF b/plugins/developer/org.eclipse.papyrus.gmfgenextension/META-INF/MANIFEST.MF
index d5bb01d1bae..669489a7f60 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/META-INF/MANIFEST.MF
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/META-INF/MANIFEST.MF
@@ -19,7 +19,6 @@ Bundle-Version: 1.1.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.gmfgenextension;singleton:=tr
- ue
+Bundle-SymbolicName: org.eclipse.papyrus.gmfgenextension;singleton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore b/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
index 4286563ba12..8e4b2714324 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/model/papyrusGmfgenExtension.ecore
@@ -178,4 +178,14 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="singletonPath" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SpecificNodePlate" eSuperTypes="#//CommentedElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This element is always linked to a genView (topLevel, or child)&#xD;&#xA;Used set if an editPart is abstract.&#xD;&#xA;SuperGenViews is a list of all superEditPart.&#xD;&#xA;&#xD;&#xA;Thanks to this, it is possible to factorize code and to decrease the number of generated classes."/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="editParts" ordered="false"
+ unique="false" lowerBound="1" upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.gmf.codegen/models/gmfgen.ecore#//GenNode"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="nodePlateQualifiedName"
+ eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml b/plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml
index 40d84d21c23..8c851cfef10 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/plugin.xml
@@ -115,6 +115,18 @@
</enablement>
</action>
<action
+ class="org.eclipse.papyrus.papyrusgmfgenextension.popupaction.AddExternalNodeFloatingLabelDisplayBehavior"
+ enablesFor="*"
+ id="org.eclipse.papyrus.papyrusgmfgenextension.popupaction.AddExternalNodeFloatingNameDisplayBehavior"
+ label="Add label to display Label as an external Floating node label"
+ menubarPath="org.eclipse.papyrus.papyrusgmfgenextension.popupaction.MenuPapyrus/AddExternalNodeFloatingNameDisplayBehavior">
+ <enablement>
+ <objectClass
+ name="org.eclipse.gmf.codegen.gmfgen.GenNode">
+ </objectClass>
+ </enablement>
+ </action>
+ <action
class="org.eclipse.papyrus.papyrusgmfgenextension.popupaction.AddHyperLinkPopupBarBehavior"
enablesFor="*"
id="org.eclipse.papyrus.papyrusgmfgenextension.popupaction.AddHyperLinkPopupBarBehavior"
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionFactory.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionFactory.java
index 9d0bfdb3e4c..35a0f2caa43 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionFactory.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionFactory.java
@@ -279,6 +279,16 @@ public interface PapyrusgmfgenextensionFactory extends EFactory {
CustomDiagramUpdaterSingleton createCustomDiagramUpdaterSingleton();
/**
+ * Returns a new object of class '<em>Specific Node Plate</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Specific Node Plate</em>'.
+ * @generated
+ */
+ SpecificNodePlate createSpecificNodePlate();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionPackage.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionPackage.java
index 5601eebbe91..f8b5c162c7b 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionPackage.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/PapyrusgmfgenextensionPackage.java
@@ -1586,6 +1586,68 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
/**
+ * The meta object id for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl <em>Specific Node Plate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getSpecificNodePlate()
+ * @generated
+ */
+ int SPECIFIC_NODE_PLATE = 25;
+
+ /**
+ * The feature id for the '<em><b>Comment</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SPECIFIC_NODE_PLATE__COMMENT = COMMENTED_ELEMENT__COMMENT;
+
+ /**
+ * The feature id for the '<em><b>Edit Parts</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SPECIFIC_NODE_PLATE__EDIT_PARTS = COMMENTED_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SPECIFIC_NODE_PLATE__NAME = COMMENTED_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Node Plate Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME = COMMENTED_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Specific Node Plate</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SPECIFIC_NODE_PLATE_FEATURE_COUNT = COMMENTED_ELEMENT_FEATURE_COUNT + 3;
+
+
+ /**
* Returns the meta object for class '{@link org.eclipse.papyrus.papyrusgmfgenextension.ExtendedGenView <em>Extended Gen View</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2377,6 +2439,53 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
EAttribute getCustomDiagramUpdaterSingleton_SingletonPath();
/**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate <em>Specific Node Plate</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Specific Node Plate</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate
+ * @generated
+ */
+ EClass getSpecificNodePlate();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getEditParts <em>Edit Parts</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Edit Parts</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getEditParts()
+ * @see #getSpecificNodePlate()
+ * @generated
+ */
+ EReference getSpecificNodePlate_EditParts();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getName()
+ * @see #getSpecificNodePlate()
+ * @generated
+ */
+ EAttribute getSpecificNodePlate_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getNodePlateQualifiedName <em>Node Plate Qualified Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Node Plate Qualified Name</em>'.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getNodePlateQualifiedName()
+ * @see #getSpecificNodePlate()
+ * @generated
+ */
+ EAttribute getSpecificNodePlate_NodePlateQualifiedName();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -3063,6 +3172,44 @@ public interface PapyrusgmfgenextensionPackage extends EPackage {
*/
EAttribute CUSTOM_DIAGRAM_UPDATER_SINGLETON__SINGLETON_PATH = eINSTANCE.getCustomDiagramUpdaterSingleton_SingletonPath();
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl <em>Specific Node Plate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.impl.PapyrusgmfgenextensionPackageImpl#getSpecificNodePlate()
+ * @generated
+ */
+ EClass SPECIFIC_NODE_PLATE = eINSTANCE.getSpecificNodePlate();
+
+ /**
+ * The meta object literal for the '<em><b>Edit Parts</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference SPECIFIC_NODE_PLATE__EDIT_PARTS = eINSTANCE.getSpecificNodePlate_EditParts();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute SPECIFIC_NODE_PLATE__NAME = eINSTANCE.getSpecificNodePlate_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Node Plate Qualified Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME = eINSTANCE.getSpecificNodePlate_NodePlateQualifiedName();
+
}
} // PapyrusgmfgenextensionPackage
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/SpecificNodePlate.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/SpecificNodePlate.java
new file mode 100644
index 00000000000..672529582bf
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/SpecificNodePlate.java
@@ -0,0 +1,108 @@
+/**
+ */
+package org.eclipse.papyrus.papyrusgmfgenextension;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.gmf.codegen.gmfgen.GenNode;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Specific Node Plate</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This element is always linked to a genView (topLevel, or child)
+ * Used set if an editPart is abstract.
+ * SuperGenViews is a list of all superEditPart.
+ *
+ * Thanks to this, it is possible to factorize code and to decrease the number of generated classes.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getEditParts <em>Edit Parts</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getNodePlateQualifiedName <em>Node Plate Qualified Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getSpecificNodePlate()
+ * @model
+ * @generated
+ */
+public interface SpecificNodePlate extends CommentedElement {
+ /**
+ * Returns the value of the '<em><b>Edit Parts</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.gmf.codegen.gmfgen.GenNode}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Edit Parts</em>' reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Edit Parts</em>' reference list.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getSpecificNodePlate_EditParts()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ EList<GenNode> getEditParts();
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getSpecificNodePlate_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Node Plate Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Node Plate Qualified Name</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Node Plate Qualified Name</em>' attribute.
+ * @see #setNodePlateQualifiedName(String)
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage#getSpecificNodePlate_NodePlateQualifiedName()
+ * @model
+ * @generated
+ */
+ String getNodePlateQualifiedName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate#getNodePlateQualifiedName <em>Node Plate Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Node Plate Qualified Name</em>' attribute.
+ * @see #getNodePlateQualifiedName()
+ * @generated
+ */
+ void setNodePlateQualifiedName(String value);
+
+} // SpecificNodePlate
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionFactoryImpl.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionFactoryImpl.java
index b1844c1f221..86acbe040e5 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionFactoryImpl.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionFactoryImpl.java
@@ -11,6 +11,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.papyrusgmfgenextension.*;
import org.eclipse.papyrus.papyrusgmfgenextension.AdditionalEditPartCandies;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateCanvas;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateGenLink;
@@ -137,6 +138,8 @@ public class PapyrusgmfgenextensionFactoryImpl extends EFactoryImpl implements P
return createGenerateUsingElementTypeCreationCommand();
case PapyrusgmfgenextensionPackage.CUSTOM_DIAGRAM_UPDATER_SINGLETON:
return createCustomDiagramUpdaterSingleton();
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE:
+ return createSpecificNodePlate();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -449,6 +452,18 @@ public class PapyrusgmfgenextensionFactoryImpl extends EFactoryImpl implements P
* @generated
*/
@Override
+ public SpecificNodePlate createSpecificNodePlate() {
+ SpecificNodePlateImpl specificNodePlate = new SpecificNodePlateImpl();
+ return specificNodePlate;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
public PapyrusgmfgenextensionPackage getPapyrusgmfgenextensionPackage() {
return (PapyrusgmfgenextensionPackage) getEPackage();
}
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionPackageImpl.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionPackageImpl.java
index 16c8cef05e5..caa96baae62 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionPackageImpl.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/PapyrusgmfgenextensionPackageImpl.java
@@ -42,6 +42,7 @@ import org.eclipse.papyrus.papyrusgmfgenextension.PropertyRefreshHook;
import org.eclipse.papyrus.papyrusgmfgenextension.SpecificDiagramUpdater;
import org.eclipse.papyrus.papyrusgmfgenextension.SpecificLocator;
import org.eclipse.papyrus.papyrusgmfgenextension.SpecificLocatorExternalLabel;
+import org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate;
/**
* <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc -->
@@ -240,6 +241,14 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
private EClass customDiagramUpdaterSingletonEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass specificNodePlateEClass = null;
+
+ /**
* Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* <p>
@@ -1019,6 +1028,50 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getSpecificNodePlate() {
+ return specificNodePlateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getSpecificNodePlate_EditParts() {
+ return (EReference) specificNodePlateEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getSpecificNodePlate_Name() {
+ return (EAttribute) specificNodePlateEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getSpecificNodePlate_NodePlateQualifiedName() {
+ return (EAttribute) specificNodePlateEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
@@ -1141,6 +1194,11 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
customDiagramUpdaterSingletonEClass = createEClass(CUSTOM_DIAGRAM_UPDATER_SINGLETON);
createEAttribute(customDiagramUpdaterSingletonEClass, CUSTOM_DIAGRAM_UPDATER_SINGLETON__SINGLETON_PATH);
+
+ specificNodePlateEClass = createEClass(SPECIFIC_NODE_PLATE);
+ createEReference(specificNodePlateEClass, SPECIFIC_NODE_PLATE__EDIT_PARTS);
+ createEAttribute(specificNodePlateEClass, SPECIFIC_NODE_PLATE__NAME);
+ createEAttribute(specificNodePlateEClass, SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME);
}
/**
@@ -1204,6 +1262,7 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
externalMetamodelTypeEClass.getESuperTypes().add(theGMFGenPackage.getMetamodelType());
generateUsingElementTypeCreationCommandEClass.getESuperTypes().add(this.getCommentedElement());
customDiagramUpdaterSingletonEClass.getESuperTypes().add(this.getCommentedElement());
+ specificNodePlateEClass.getESuperTypes().add(this.getCommentedElement());
// Initialize classes and features; add operations and parameters
initEClass(extendedGenViewEClass, ExtendedGenView.class, "ExtendedGenView", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -1332,6 +1391,13 @@ public class PapyrusgmfgenextensionPackageImpl extends EPackageImpl implements P
initEAttribute(getCustomDiagramUpdaterSingleton_SingletonPath(), ecorePackage.getEString(), "singletonPath", null, 1, 1, CustomDiagramUpdaterSingleton.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
IS_ORDERED);
+ initEClass(specificNodePlateEClass, SpecificNodePlate.class, "SpecificNodePlate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getSpecificNodePlate_EditParts(), theGMFGenPackage.getGenNode(), null, "editParts", null, 1, -1, SpecificNodePlate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE,
+ !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getSpecificNodePlate_Name(), theEcorePackage.getEString(), "name", null, 0, 1, SpecificNodePlate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSpecificNodePlate_NodePlateQualifiedName(), theEcorePackage.getEString(), "nodePlateQualifiedName", null, 0, 1, SpecificNodePlate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+
// Create resource
createResource(eNS_URI);
}
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/SpecificNodePlateImpl.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/SpecificNodePlateImpl.java
new file mode 100644
index 00000000000..4b9ce6ccf7e
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/impl/SpecificNodePlateImpl.java
@@ -0,0 +1,282 @@
+/**
+ */
+package org.eclipse.papyrus.papyrusgmfgenextension.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+import org.eclipse.gmf.codegen.gmfgen.GenNode;
+import org.eclipse.papyrus.papyrusgmfgenextension.PapyrusgmfgenextensionPackage;
+import org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Specific Node Plate</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl#getEditParts <em>Edit Parts</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.papyrusgmfgenextension.impl.SpecificNodePlateImpl#getNodePlateQualifiedName <em>Node Plate Qualified Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SpecificNodePlateImpl extends CommentedElementImpl implements SpecificNodePlate {
+ /**
+ * The cached value of the '{@link #getEditParts() <em>Edit Parts</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getEditParts()
+ * @generated
+ * @ordered
+ */
+ protected EList<GenNode> editParts;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getNodePlateQualifiedName() <em>Node Plate Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getNodePlateQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NODE_PLATE_QUALIFIED_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getNodePlateQualifiedName() <em>Node Plate Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getNodePlateQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected String nodePlateQualifiedName = NODE_PLATE_QUALIFIED_NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected SpecificNodePlateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PapyrusgmfgenextensionPackage.Literals.SPECIFIC_NODE_PLATE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EList<GenNode> getEditParts() {
+ if (editParts == null) {
+ editParts = new EObjectResolvingEList<GenNode>(GenNode.class, this, PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__EDIT_PARTS);
+ }
+ return editParts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NAME, oldName, name));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getNodePlateQualifiedName() {
+ return nodePlateQualifiedName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setNodePlateQualifiedName(String newNodePlateQualifiedName) {
+ String oldNodePlateQualifiedName = nodePlateQualifiedName;
+ nodePlateQualifiedName = newNodePlateQualifiedName;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME, oldNodePlateQualifiedName, nodePlateQualifiedName));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__EDIT_PARTS:
+ return getEditParts();
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NAME:
+ return getName();
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME:
+ return getNodePlateQualifiedName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__EDIT_PARTS:
+ getEditParts().clear();
+ getEditParts().addAll((Collection<? extends GenNode>) newValue);
+ return;
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NAME:
+ setName((String) newValue);
+ return;
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME:
+ setNodePlateQualifiedName((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__EDIT_PARTS:
+ getEditParts().clear();
+ return;
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME:
+ setNodePlateQualifiedName(NODE_PLATE_QUALIFIED_NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__EDIT_PARTS:
+ return editParts != null && !editParts.isEmpty();
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE__NODE_PLATE_QUALIFIED_NAME:
+ return NODE_PLATE_QUALIFIED_NAME_EDEFAULT == null ? nodePlateQualifiedName != null : !NODE_PLATE_QUALIFIED_NAME_EDEFAULT.equals(nodePlateQualifiedName);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", nodePlateQualifiedName: ");
+ result.append(nodePlateQualifiedName);
+ result.append(')');
+ return result.toString();
+ }
+
+} // SpecificNodePlateImpl
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingLabelDisplayBehavior.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingLabelDisplayBehavior.java
new file mode 100644
index 00000000000..afeb2c93985
--- /dev/null
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/popupaction/AddExternalNodeFloatingLabelDisplayBehavior.java
@@ -0,0 +1,223 @@
+/*****************************************************************************
+ * Copyright (c) 2009, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.papyrusgmfgenextension.popupaction;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.gmf.codegen.gmfgen.FeatureLabelModelFacet;
+import org.eclipse.gmf.codegen.gmfgen.FigureViewmap;
+import org.eclipse.gmf.codegen.gmfgen.GMFGenFactory;
+import org.eclipse.gmf.codegen.gmfgen.GenEditorGenerator;
+import org.eclipse.gmf.codegen.gmfgen.GenExternalNodeLabel;
+import org.eclipse.gmf.codegen.gmfgen.GenLinkLabel;
+import org.eclipse.gmf.codegen.gmfgen.GenNode;
+import org.eclipse.gmf.codegen.gmfgen.GenNodeLabel;
+import org.eclipse.gmf.codegen.gmfgen.GenParsers;
+import org.eclipse.gmf.codegen.gmfgen.PredefinedParser;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * this class is used to add a label to display name from external node
+ */
+public class AddExternalNodeFloatingLabelDisplayBehavior extends Action {
+
+ public static final String FIGURE_VIEWMAP_PATH = "org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel";//"org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"; //$NON-NLS-1$
+
+ public static final String LABEL_POLICY_CLASS = "org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"; //$NON-NLS-1$
+
+ public static final String LABEL_POLICY_KEY = "org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"; //$NON-NLS-1$
+
+ public static final String DEFAULT_GETTER_NAME = "getFloatingNameLabel"; //$NON-NLS-1$
+
+ public static final String DEFAULT_EDITPART_NAME_SUFFIX = "FloatingLabelEditPart"; //$NON-NLS-1$
+
+ public static final String DEFAULT_EDITPOLICY_NAME_SUFFIX = "FloatingLabelItemSemanticEditPolicy"; //$NON-NLS-1$
+
+ // public static final String DEFAULT_WRAPPING_LABEL_CLASS = "org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"; //$NON-NLS-1$
+
+ public static final String DEFAULT_PARSER_PATTERN = ""; //$NON-NLS-1$
+
+ public static final String GEN_CLASS_RT_CLASS = "Node"; //$NON-NLS-1$
+
+ public static final String GEN_CLASS_FACET_META_FEATURE = "NamedElement"; //$NON-NLS-1$
+
+ public static final String GEN_FEATURE_FACET_META_FEATURE = "name"; //$NON-NLS-1$
+
+ public static final String URI_NOTATION_GENMODEL = "org.eclipse.gmf.runtime.notation/model/notation.genmodel"; //$NON-NLS-1$
+
+ public static final String URI_UML_GENMODEL = "org.eclipse.uml2.uml/model/UML.genmodel"; //$NON-NLS-1$
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+ */
+ public void init(IViewPart view) {
+ // NO OP
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ @Override
+ public void run(IAction action) {
+ // Parse selected GenLink(s) and add the desired CustomBehavior
+ Iterator<EObject> it = getSelectedEObject().iterator();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof GenNode) {
+ // test if it has got a external node to display floating name
+ if (!hasAnFloatingNameExternalNode((GenNode) eObject)) {
+ createAnFloatingNameExternalNode((GenNode) eObject);
+ }
+ }
+ }
+ }
+
+ /**
+ * creation an external node floating name
+ *
+ * @param genNode
+ * the parent genNode
+ */
+ private void createAnFloatingNameExternalNode(GenNode genNode) {
+ // Create une external node label
+ GenExternalNodeLabel label = GMFGenFactory.eINSTANCE.createGenExternalNodeLabel();
+
+ // Set Name of the edit part
+ // label.setEditPartClassName(genNode.getClassNamePrefix() + DEFAULT_EDITPART_NAME_SUFFIX);
+
+ String editPartClassName = genNode.getEditPartClassName();
+ int index = editPartClassName.indexOf("EditPart");
+ String name = editPartClassName.substring(0, index) + DEFAULT_EDITPART_NAME_SUFFIX + editPartClassName.substring(index + "EditPart".length());
+ label.setEditPartClassName(name);
+ // Set item semantic edit policy
+ label.setItemSemanticEditPolicyClassName(genNode.getClassNamePrefix() + DEFAULT_EDITPOLICY_NAME_SUFFIX);
+ // Set the Read only
+ label.setReadOnly(false);
+
+ // Set GenLinkLabel VisualID with new unique ID
+ int visualID = SetVisualIDWithUnusedValue.getNewVisualID(genNode.eResource(), GenLinkLabel.class);
+ label.setVisualID(visualID);
+
+ // Retrieve DiagramRunTimeClass in notation.genmodel (Node -> View)
+ URI uri_notation = URI.createPlatformPluginURI(URI_NOTATION_GENMODEL, false);
+ Resource notation = genNode.eResource().getResourceSet().getResource(uri_notation, true);
+ label.setDiagramRunTimeClass(findGenClass(notation, GEN_CLASS_RT_CLASS));
+
+ // Create Viewmap
+ FigureViewmap viewmap = GMFGenFactory.eINSTANCE.createFigureViewmap();
+ viewmap.setFigureQualifiedClassName(FIGURE_VIEWMAP_PATH);
+
+ // Create FeatureLabelModelFacet
+ FeatureLabelModelFacet facet = GMFGenFactory.eINSTANCE.createFeatureLabelModelFacet();
+ facet.setEditPattern(DEFAULT_PARSER_PATTERN);
+ facet.setEditorPattern(DEFAULT_PARSER_PATTERN);
+ facet.setViewPattern(DEFAULT_PARSER_PATTERN);
+
+ // Select NamedElement::name property in UML.genmodel for MetaFeatures
+ URI uri_uml = URI.createPlatformPluginURI(URI_UML_GENMODEL, false);
+ Resource uml = genNode.eResource().getResourceSet().getResource(uri_uml, true);
+ facet.getMetaFeatures().add(findGenFeature(uml, GEN_CLASS_FACET_META_FEATURE, GEN_FEATURE_FACET_META_FEATURE));
+ // Attach Predefined Parser MessageFormatParser
+ // not good must find the predifined parser of the model...
+
+ // Get the predefined parser.
+ PredefinedParser parser = getPredefinedParser(genNode);
+ facet.setParser(parser);
+
+ // Attach created element one to another in the model
+ label.setViewmap(viewmap);
+ label.setModelFacet(facet);
+
+ // Add custom Policy to have feedback
+ // addCustomBehavior(label, LABEL_POLICY_KEY, LABEL_POLICY_CLASS);
+
+ // edit policy which permit to take into account of specific locator of external label
+ addCustomBehavior(genNode, "org.eclipse.gef.EditPolicy.LAYOUT_ROLE", "org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy");
+
+ genNode.getLabels().add(label);
+ }
+
+ /**
+ * Gets the predefined parser.
+ *
+ * @param eObject
+ * the e object
+ * @return the predefined parser
+ */
+ private PredefinedParser getPredefinedParser(GenNode eObject) {
+ PredefinedParser parser = null;
+ // /get the ressource contents
+ EList<EObject> ressourceContents = eObject.eResource().getContents();
+ for (EObject ressourceContent : ressourceContents) {
+ // get the Gen Editor Node
+ if (ressourceContent instanceof GenEditorGenerator) {
+ // Get Parsers node
+ GenParsers genParsers = ((GenEditorGenerator) ressourceContent).getLabelParsers();
+ for (EObject GenParsersContent : genParsers.eContents()) {
+ // Get the predefined parser
+ if (GenParsersContent instanceof PredefinedParser) {
+ parser = (PredefinedParser) GenParsersContent;
+ }
+ }
+ }
+ }
+ return parser;
+ }
+
+ /**
+ * Checks for a floating name external node.
+ *
+ * @param node
+ * the node
+ * @return true, if successful
+ */
+ public boolean hasAnFloatingNameExternalNode(GenNode node) {
+ Iterator<GenNodeLabel> iterator = node.getLabels().iterator();
+ while (iterator.hasNext()) {
+ GenNodeLabel currentGenNodeLabel = iterator.next();
+ // check each child node
+ if (currentGenNodeLabel instanceof GenExternalNodeLabel) {
+ if (isAnFloatingNameExternalNode((GenExternalNodeLabel) currentGenNodeLabel)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Checks if is an floating name external node.
+ *
+ * @param node
+ * the node
+ * @return true, if is an floating name external node
+ */
+ public boolean isAnFloatingNameExternalNode(GenExternalNodeLabel node) {
+ // Look if the edit part name contains the default edit part name suffix
+ if (node.getEditPartClassName().contains(DEFAULT_EDITPART_NAME_SUFFIX)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionAdapterFactory.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionAdapterFactory.java
index b69d3ed3c1c..59cc8fe2035 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionAdapterFactory.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionAdapterFactory.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.codegen.gmfgen.GenContainerBase;
import org.eclipse.gmf.codegen.gmfgen.GenLinkEnd;
import org.eclipse.gmf.codegen.gmfgen.GenNode;
import org.eclipse.gmf.codegen.gmfgen.MetamodelType;
+import org.eclipse.papyrus.papyrusgmfgenextension.*;
import org.eclipse.papyrus.papyrusgmfgenextension.AdditionalEditPartCandies;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateCanvas;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateGenLink;
@@ -231,6 +232,11 @@ public class PapyrusgmfgenextensionAdapterFactory extends AdapterFactoryImpl {
}
@Override
+ public Adapter caseSpecificNodePlate(SpecificNodePlate object) {
+ return createSpecificNodePlateAdapter();
+ }
+
+ @Override
public Adapter caseGenCommonBase(GenCommonBase object) {
return createGenCommonBaseAdapter();
}
@@ -663,6 +669,21 @@ public class PapyrusgmfgenextensionAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate <em>Specific Node Plate</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.papyrusgmfgenextension.SpecificNodePlate
+ * @generated
+ */
+ public Adapter createSpecificNodePlateAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.gmf.codegen.gmfgen.GenCommonBase <em>Gen Common Base</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
diff --git a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionSwitch.java b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionSwitch.java
index 0f0206b2061..1c9e0a43873 100644
--- a/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionSwitch.java
+++ b/plugins/developer/org.eclipse.papyrus.gmfgenextension/src/org/eclipse/papyrus/papyrusgmfgenextension/util/PapyrusgmfgenextensionSwitch.java
@@ -16,6 +16,7 @@ import org.eclipse.gmf.codegen.gmfgen.GenContainerBase;
import org.eclipse.gmf.codegen.gmfgen.GenLinkEnd;
import org.eclipse.gmf.codegen.gmfgen.GenNode;
import org.eclipse.gmf.codegen.gmfgen.MetamodelType;
+import org.eclipse.papyrus.papyrusgmfgenextension.*;
import org.eclipse.papyrus.papyrusgmfgenextension.AdditionalEditPartCandies;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateCanvas;
import org.eclipse.papyrus.papyrusgmfgenextension.AlternateGenLink;
@@ -410,6 +411,17 @@ public class PapyrusgmfgenextensionSwitch<T> extends Switch<T> {
}
return result;
}
+ case PapyrusgmfgenextensionPackage.SPECIFIC_NODE_PLATE: {
+ SpecificNodePlate specificNodePlate = (SpecificNodePlate) theEObject;
+ T result = caseSpecificNodePlate(specificNodePlate);
+ if (result == null) {
+ result = caseCommentedElement(specificNodePlate);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
default:
return defaultCase(theEObject);
}
@@ -841,6 +853,23 @@ public class PapyrusgmfgenextensionSwitch<T> extends Switch<T> {
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Specific Node Plate</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Specific Node Plate</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSpecificNodePlate(SpecificNodePlate object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>Gen Common Base</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/.project b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/.project
index 0f37954209c..37460a6fb23 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/.project
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/.project
@@ -6,6 +6,11 @@
</projects>
<buildSpec>
<buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
@@ -18,5 +23,6 @@
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css
index acfce1e4950..05b5e75590e 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme/theme/papyrus_theme.css
@@ -131,6 +131,11 @@ ActivityDiagram Activity *,InteractionOverviewDiagram Activity * {
elementIcon:false;
}
+ClassDiagram Dependency{
+ fillColor:Black;
+ gradient:none;
+}
+
/*
* The Actor element icon is not useful either
*/
@@ -141,3 +146,14 @@ UseCaseDiagram Actor {
TimingDiagram * {
gradient:none;
}
+
+UseCaseDiagram UseCase {
+ fillColor:white;
+}
+
+StateMachineDiagram Pseudostate[kind="exitPoint"],
+StateMachineDiagram Pseudostate[kind="entryPoint"]
+{
+ fillColor:white;
+}
+
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
index 870288bda96..9c7ae7bd4f2 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
@@ -1,53 +1,53 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.gmfdiag.css,
- org.eclipse.papyrus.infra.gmfdiag.css.converters,
- org.eclipse.papyrus.infra.gmfdiag.css.dom,
- org.eclipse.papyrus.infra.gmfdiag.css.engine,
- org.eclipse.papyrus.infra.gmfdiag.css.engine.enginecopy,
- org.eclipse.papyrus.infra.gmfdiag.css.handler,
- org.eclipse.papyrus.infra.gmfdiag.css.helper,
- org.eclipse.papyrus.infra.gmfdiag.css.listener,
- org.eclipse.papyrus.infra.gmfdiag.css.lists,
- org.eclipse.papyrus.infra.gmfdiag.css.notation,
- org.eclipse.papyrus.infra.gmfdiag.css.preferences,
- org.eclipse.papyrus.infra.gmfdiag.css.provider,
- org.eclipse.papyrus.infra.gmfdiag.css.resource,
- org.eclipse.papyrus.infra.gmfdiag.css.service,
- org.eclipse.papyrus.infra.gmfdiag.css.style.impl,
- org.eclipse.papyrus.infra.gmfdiag.css.theme
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.e4.ui.css.core;bundle-version="0.10.0",
- org.eclipse.emf.ecore;bundle-version="2.8.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
- org.w3c.css.sac;bundle-version="1.3.1",
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.tools;bundle-version="1.1.0",
- org.eclipse.core.databinding;bundle-version="1.4.1",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.notation.edit;bundle-version="1.7.0",
- org.w3c.dom.svg;bundle-version="1.1.0",
- org.eclipse.emf.edit.ui,
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.1.0",
- org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.1.0",
- org.eclipse.papyrus.views.properties;bundle-version="1.1.0",
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.css,
+ org.eclipse.papyrus.infra.gmfdiag.css.converters,
+ org.eclipse.papyrus.infra.gmfdiag.css.dom,
+ org.eclipse.papyrus.infra.gmfdiag.css.engine,
+ org.eclipse.papyrus.infra.gmfdiag.css.engine.enginecopy,
+ org.eclipse.papyrus.infra.gmfdiag.css.handler,
+ org.eclipse.papyrus.infra.gmfdiag.css.helper,
+ org.eclipse.papyrus.infra.gmfdiag.css.listener,
+ org.eclipse.papyrus.infra.gmfdiag.css.lists,
+ org.eclipse.papyrus.infra.gmfdiag.css.notation,
+ org.eclipse.papyrus.infra.gmfdiag.css.preferences,
+ org.eclipse.papyrus.infra.gmfdiag.css.provider,
+ org.eclipse.papyrus.infra.gmfdiag.css.resource,
+ org.eclipse.papyrus.infra.gmfdiag.css.service,
+ org.eclipse.papyrus.infra.gmfdiag.css.style.impl,
+ org.eclipse.papyrus.infra.gmfdiag.css.theme
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.e4.ui.css.core;bundle-version="0.10.0",
+ org.eclipse.emf.ecore;bundle-version="2.8.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
+ org.w3c.css.sac;bundle-version="1.3.1",
+ org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.tools;bundle-version="1.1.0",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.notation.edit;bundle-version="1.7.0",
+ org.w3c.dom.svg;bundle-version="1.1.0",
+ org.eclipse.emf.edit.ui,
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.1.0",
+ org.eclipse.papyrus.views.properties;bundle-version="1.1.0",
org.eclipse.papyrus.views.properties.model;bundle-version="1.1.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css;singleton:=
- true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css;singleton:=
+ true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css
index 0440760a294..eb32aa78f39 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/resources/base.css
@@ -1,52 +1,304 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr
- *****************************************************************************/
-
-/**
-
-This stylesheets declares the default style options for Papyrus. It mostly contains hacks to avoid
-unwished behaviors, related to the base implementation (GMF, Papyrus...)
-
-*/
-
-Compartment[kind=symbol]{
- visible:false;
-}
-
-* {
- lineColor:black; /* Avoid the gray line-colors from default GMF connectors */
- fontName:"Segoe UI"; /* Default font used in Papyrus. It is different from the GMF default */
- fontColor:black;
- transparency:0; /* Default transparency in GMF Notation is -1. -1 is recognized as "Unchanged" by the GMF NodeFigure. e.g. changing from 50 to -1 ("reset") does nothing */
- showTitle:false;
-}
-
-/* For most Activity diagram nodes (e.g. initial, final, fork, decision, ...),
- * the element icon is displayed next to the actual object.
- * By default, we prevent this.
- *
- * For standard nodes (OpaqueAction, ...), they are not implemented at all,
- * so a global selector will not have side effects (yet).
- */
-ActivityDiagram Activity *,InteractionOverviewDiagram Activity * {
- elementIcon:false;
-}
-
-/*
- * The Actor element icon is not useful either
- */
-UseCaseDiagram Actor {
- elementIcon:false;
-}
-
-TimingDiagram * {
- gradient:none;
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr
+ * Mickaël ADAM (ALL4TEC) mickael.adam@all4tec.net - Generic shape default value implementation. Default symbol implementation.
+ *
+ *****************************************************************************/
+
+/**
+
+This stylesheets declares the default style options for Papyrus. It mostly contains hacks to avoid
+unwished behaviors, related to the base implementation (GMF, Papyrus...)
+
+*/
+
+Compartment[kind=symbol]{
+ visible:false;
+}
+
+* {
+ lineColor:black; /* Avoid the gray line-colors from default GMF connectors */
+ fontName:"Segoe UI"; /* Default font used in Papyrus. It is different from the GMF default */
+ fontColor:black;
+ transparency:0; /* Default transparency in GMF Notation is -1. -1 is recognized as "Unchanged" by the GMF NodeFigure. e.g. changing from 50 to -1 ("reset") does nothing */
+ showTitle:false;
+}
+
+
+/*
+ * The Actor element icon is not useful either
+ */
+UseCaseDiagram Actor {
+ elementIcon:false;
+}
+
+TimingDiagram * {
+ gradient:none;
+}
+
+/*---------- Default SVG symbols ----------*/
+
+/* Round full */
+StateMachineDiagram Pseudostate[kind="initial"],
+StateMachineDiagram Pseudostate[kind="junction"],
+ActivityDiagram InitialNode
+{
+svgFile:"platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_full.svg";
+}
+
+ActivityDiagram ActivityFinalNode,
+StateMachineDiagram FinalState
+{
+svgFile:"platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_with_dot.svg";
+}
+
+ActivityDiagram FlowFinalNode
+{
+svgFile:"platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_with_cross.svg";
+}
+
+ActivityDiagram SendSignalAction
+{
+svgFile:"platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/arrow.svg";
+}
+
+StateMachineDiagram Pseudostate[kind="terminate"]
+{
+svgFile:"platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/cross.svg";
+}
+
+ActivityDiagram MergeNode,
+ActivityDiagram DecisionNode,
+StateMachineDiagram Pseudostate[kind="choice"],
+ClassDiagram Association
+{
+svgFile:"platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/diamond.svg";
+}
+
+Actor
+{
+svgFile:"platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/stickman.svg";
+}
+
+DurationObservation
+{
+svgFile:"platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/symbols/DurationObservation.svg";
+}
+
+TimeObservation
+{
+svgFile:"platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/symbols/TimeObservation.svg";
+}
+
+StateMachineDiagram Pseudostate[kind="shallowHistory"]
+{
+svgFile:"platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/symbols/shallowHistory.svg";
+}
+
+StateMachineDiagram Pseudostate[kind="deepHistory"]
+{
+svgFile:"platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/symbols/deepHistory.svg";
+}
+
+/*---------- Activity Diagram ----------*/
+
+ActivityDiagram MergeNode,
+ActivityDiagram InitialNode,
+ActivityDiagram ActivityFinalNode,
+ActivityDiagram FlowFinalNode,
+ActivityDiagram DecisionNode,
+ActivityDiagram SendSignalAction,
+ActivityDiagram AcceptEventAction
+{
+ displayBorder:false;
+ displayName:false;
+ diplayIcon:false;
+ displayTag:false;
+ followSVGSymbol:true;
+ maintainSymbolRatio:true;
+ transparency:100;
+ /*displayFloatingLabel:true;*/
+ maxNumberOfSymbol:1;
+ useOriginalColors:false;
+ gradient:none;
+ fillColor:white;
+}
+
+/*symbol compartment set to visible */
+ActivityDiagram MergeNode > Compartment[kind="symbol"],
+ActivityDiagram InitialNode > Compartment[kind="symbol"],
+ActivityDiagram ActivityFinalNode > Compartment[kind="symbol"],
+ActivityDiagram FlowFinalNode > Compartment[kind="symbol"],
+ActivityDiagram MergeNode > Compartment[kind="symbol"],
+ActivityDiagram SendSignalAction > Compartment[kind="symbol"],
+ActivityDiagram DecisionNode > Compartment[kind="symbol"],
+ActivityDiagram AcceptEventAction > Compartment[kind="symbol"]
+{
+ visible:true;
+}
+
+/*External Label set to visible*/
+ActivityDiagram MergeNode > Label,
+ActivityDiagram InitialNode > Label,
+ActivityDiagram ActivityFinalNode > Label,
+ActivityDiagram FlowFinalNode > Label,
+ActivityDiagram DecisionNode > Label,
+ActivityDiagram SendSignalAction > Label,
+ActivityDiagram ForkNode > Label,
+ActivityDiagram JoinNode > Label
+{
+ visible:true;
+}
+
+
+
+ActivityDiagram SendSignalAction,
+ActivityDiagram AcceptEventAction{
+ maintainSymbolRatio:false;
+ displayName:true;
+}
+
+/* For most Activity diagram nodes (e.g. initial, final, fork, decision, ...),
+ * the element icon is displayed next to the actual object.
+ * By default, we prevent this.
+ *
+ * For standard nodes (OpaqueAction, ...), they are not implemented at all,
+ * so a global selector will not have side effects (yet).
+ */
+ActivityDiagram Activity *,InteractionOverviewDiagram Activity * {
+ elementIcon:false;
+}
+
+/*---------- Class Diagram ----------*/
+ClassDiagram Association
+{
+ displayBorder:false;
+ displayName:false;
+ diplayIcon:false;
+ displayTag:false;
+ followSVGSymbol:true;
+ maintainSymbolRatio:true;
+ transparency:100;
+ displayFloatingLabel:true;
+ maxNumberOfSymbol:1;
+ useOriginalColors:false;
+ gradient:none;
+ fillColor:white;
+}
+
+ClassDiagram Association > Compartment[kind="symbol"],
+ClassDiagram DurationObservation > Compartment[kind="symbol"],
+ClassDiagram TimeObservation > Compartment[kind="symbol"]
+{
+ visible:true;
+}
+
+ClassDiagram Dependency
+{
+ fillColor:Black;
+ gradient:none;
+}
+
+/*---------- UseCase Diagram ----------*/
+UseCaseDiagram UseCase > Compartment {
+ lineLengthRatio:"0.70";
+}
+
+UseCaseDiagram UseCase {
+ topMarginLabel:10;
+}
+
+UseCaseDiagram Actor
+{
+ displayBorder:false;
+ displayName:false;
+ diplayIcon:false;
+ displayTag:false;
+ followSVGSymbol:true;
+ maintainSymbolRatio:true;
+ transparency:100;
+ /*displayFloatingLabel:true;*/
+ maxNumberOfSymbol:1;
+ useOriginalColors:false;
+ gradient:none;
+ fillColor:white;
+}
+
+UseCaseDiagram Actor > Compartment[kind="symbol"]
+{
+ visible:true;
+}
+
+/*---------- Communication Diagram ----------*/
+CommunicationDiagram DurationObservation > Compartment[kind="symbol"],
+CommunicationDiagram TimeObservation > Compartment[kind="symbol"]
+{
+ visible:true;
+}
+CommunicationDiagram Interaction > Compartment
+{
+ lineLength:0;
+}
+
+/*---------- State Machine Diagram ----------*/
+StateMachineDiagram Pseudostate[kind="initial"],
+StateMachineDiagram Pseudostate[kind="junction"],
+StateMachineDiagram Pseudostate[kind="shallowHistory"],
+StateMachineDiagram Pseudostate[kind="terminate"],
+StateMachineDiagram Pseudostate[kind="deepHistory"],
+StateMachineDiagram Pseudostate[kind="choice"],
+StateMachineDiagram FinalState
+{
+ displayBorder:false;
+ displayName:false;
+ diplayIcon:false;
+ displayTag:false;
+ followSVGSymbol:true;
+ maintainSymbolRatio:true;
+ transparency:100;
+ displayFloatingLabel:true;
+ maxNumberOfSymbol:1;
+ useOriginalColors:false;
+ gradient:none;
+ fillColor:white;
+}
+
+StateMachineDiagram Pseudostate[kind="initial"] > Label,
+StateMachineDiagram Pseudostate[kind="junction"] > Label,
+StateMachineDiagram Pseudostate[kind="shallowHistory"] > Label,
+StateMachineDiagram Pseudostate[kind="terminate"] > Label,
+StateMachineDiagram Pseudostate[kind="deepHistory"] > Label,
+StateMachineDiagram Pseudostate[kind="choice"] > Label,
+StateMachineDiagram FinalState> Label,
+StateMachineDiagram Pseudostate[kind="exitPoint"] > Label,
+StateMachineDiagram Pseudostate[kind="entryPoint"] > Label,
+StateMachineDiagram Pseudostate[kind="join"] > Label,
+StateMachineDiagram Pseudostate[kind="fork"] > Label
+{
+ visible:true;
+ textAlignment:"Left";
+}
+
+StateMachineDiagram Pseudostate[kind="initial"] > Compartment[kind="symbol"],
+StateMachineDiagram Pseudostate[kind="shallowHistory"] > Compartment[kind="symbol"],
+StateMachineDiagram Pseudostate[kind="terminate"] > Compartment[kind="symbol"],
+StateMachineDiagram Pseudostate[kind="deepHistory"] > Compartment[kind="symbol"],
+StateMachineDiagram Pseudostate[kind="choice"] > Compartment[kind="symbol"],
+StateMachineDiagram Pseudostate[kind="junction"] > Compartment[kind="symbol"],
+StateMachineDiagram FinalState > Compartment[kind="symbol"]
+{
+ visible:true;
+}
+
+StateMachineDiagram Pseudostate[kind="choice"]{
+ maintainSymbolRatio:false;
+}
+
+
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
index 3b5c16f5043..0e35c42ae54 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
@@ -66,7 +66,8 @@ Require-Bundle: org.eclipse.emf.edit.ui;bundle-version="2.5.0",
org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.7.0",
- org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.1.0"
+ org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.draw2d.ui.render.awt
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
@@ -75,7 +76,6 @@ Bundle-Localization: plugin
Bundle-Name: %pluginName
Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.common.Activator
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.common;singleto
- n:=true
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.common;singleton:=true
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/arrow.svg b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/arrow.svg
new file mode 100644
index 00000000000..7764434544c
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/arrow.svg
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="85" height="40" id="svgRoot" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="arrow.svg">
+ <defs id="defs4">
+ <linearGradient id="linearGradient3789">
+ <stop style="stop-color:#000005;stop-opacity:1;" offset="0" id="stop3791" />
+ <stop style="stop-color:white;stop-opacity:0;" offset="1" id="stop3793" />
+ </linearGradient>
+ <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 20 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="85 : 20 : 1" inkscape:persp3d-origin="42.5 : 13.333333 : 1" id="perspective3063" />
+ <linearGradient id="linearGradient3786">
+ <stop style="stop-color:#000000;stop-opacity:0;" offset="0" id="stop3788" />
+ <stop id="stop3794" offset="1" style="stop-color:#919cd7;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6" inkscape:cx="59.375" inkscape:cy="21.696429" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" />
+ <metadata id="metadata7">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1012.3617)">
+ <path style="fill:white;fill-opacity:1;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 1,1 L 70,1 L 84,20 L 70,39 L 1,39 z" id="PapyrusPath" inkscape:connector-curvature="0" class="Arrow" transform="translate(-0.17857143,1012.2724)" />
+ <rect
+ style="fill:none;stroke:none"
+ id="PapyrusLabel"
+ width="75"
+ height="15"
+ x="2"
+ y="12"
+ transform="translate(0,1012.3617)" />
+ </g>
+</svg>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/cross.svg b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/cross.svg
new file mode 100644
index 00000000000..382dd1ce0ea
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/cross.svg
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="20" height="20" id="svg2" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="cross.svg">
+ <defs id="defs4">
+ <linearGradient id="linearGradient3789">
+ <stop style="stop-color:#000005;stop-opacity:1;" offset="0" id="stop3791" />
+ <stop style="stop-color:white;stop-opacity:0;" offset="1" id="stop3793" />
+ </linearGradient>
+ <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 20 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="85 : 20 : 1" inkscape:persp3d-origin="42.5 : 13.333333 : 1" id="perspective3063" />
+ <linearGradient id="linearGradient3786">
+ <stop style="stop-color:#000000;stop-opacity:0;" offset="0" id="stop3788" />
+ <stop id="stop3794" offset="1" style="stop-color:#919cd7;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6" inkscape:cx="38.184429" inkscape:cy="-13.962009" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" />
+ <metadata id="metadata7">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:groupmode="layer" id="layer2" inkscape:label="Calque" />
+ <g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1032.3617)" style="display:inline">
+ <path sodipodi:type="star" style="fill:white;fill-opacity:1;stroke:black;stroke-width:3.49399996;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="path2995" sodipodi:sides="4" sodipodi:cx="10.178571" sodipodi:cy="10.357143" sodipodi:r1="13.763908" sodipodi:r2="0.13763908" sodipodi:arg1="0.79457222" sodipodi:arg2="1.5799704" inkscape:flatsided="false" inkscape:rounded="0" inkscape:randomized="0" d="M 19.821428,20.178573 L 10.177308,10.494777 L 0.35714161,20.000001 L 10.040937,10.355881 L 0.53571309,0.53571427 L 10.179833,10.21951 L 20,0.71428574 L 10.316204,10.358406 z" transform="translate(0,1032.3617)" />
+ </g>
+</svg>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/diamond.svg b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/diamond.svg
new file mode 100644
index 00000000000..93b895e5658
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/diamond.svg
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="20" height="30" id="svg2" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="diamond.svg">
+ <defs id="defs4">
+ <linearGradient id="linearGradient3789">
+ <stop style="stop-color:#000005;stop-opacity:1;" offset="0" id="stop3791" />
+ <stop style="stop-color:white;stop-opacity:0;" offset="1" id="stop3793" />
+ </linearGradient>
+ <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 20 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="85 : 20 : 1" inkscape:persp3d-origin="42.5 : 13.333333 : 1" id="perspective3063" />
+ <linearGradient id="linearGradient3786">
+ <stop style="stop-color:#000000;stop-opacity:0;" offset="0" id="stop3788" />
+ <stop id="stop3794" offset="1" style="stop-color:#919cd7;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="11.2" inkscape:cx="31.53922" inkscape:cy="17.616168" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" />
+ <metadata id="metadata7">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1022.3617)">
+ <path style="fill:white;fill-opacity:1;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 10,0 L 20,15 L 10,30 L 0,15 z" id="PapyrusPath" inkscape:connector-curvature="0" transform="matrix(0.9340331,0,0,0.94955646,0.70015879,1023.0983)" />
+ </g>
+</svg>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/flag.svg b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/flag.svg
new file mode 100644
index 00000000000..e4e24f91782
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/flag.svg
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="160" height="45" id="svg2" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="flag.svg">
+ <defs id="defs4">
+ <linearGradient id="linearGradient3789">
+ <stop style="stop-color:#000005;stop-opacity:1;" offset="0" id="stop3791" />
+ <stop style="stop-color:white;stop-opacity:0;" offset="1" id="stop3793" />
+ </linearGradient>
+ <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 20 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="85 : 20 : 1" inkscape:persp3d-origin="42.5 : 13.333333 : 1" id="perspective3063" />
+ <linearGradient id="linearGradient3786">
+ <stop style="stop-color:#000000;stop-opacity:0;" offset="0" id="stop3788" />
+ <stop id="stop3794" offset="1" style="stop-color:#919cd7;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6" inkscape:cx="71.750943" inkscape:cy="21.696429" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" />
+ <metadata id="metadata7">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1012.3617)">
+ <path style="fill:white;fill-opacity:1;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 1,1 L 159,1 L 159,44 L 1,44 L 12,21.5 z" id="PapyrusPath" inkscape:connector-curvature="0" transform="translate(0,1012.8974)" sodipodi:nodetypes="cccccc" />
+ <rect
+ style="fill:none;stroke:none"
+ id="PapyrusLabel"
+ width="145"
+ height="15"
+ x="20"
+ y="5"
+ transform="translate(0,1012.3617)" />
+ </g>
+</svg>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/hourglass.svg b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/hourglass.svg
new file mode 100644
index 00000000000..d7d5bff4fc5
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/hourglass.svg
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="140" height="35" id="svg2" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="hourglass.svg">
+ <defs id="defs4">
+ <linearGradient id="linearGradient3789">
+ <stop style="stop-color:#000005;stop-opacity:1;" offset="0" id="stop3791" />
+ <stop style="stop-color:white;stop-opacity:0;" offset="1" id="stop3793" />
+ </linearGradient>
+ <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 20 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="85 : 20 : 1" inkscape:persp3d-origin="42.5 : 13.333333 : 1" id="perspective3063" />
+ <linearGradient id="linearGradient3786">
+ <stop style="stop-color:#000000;stop-opacity:0;" offset="0" id="stop3788" />
+ <stop id="stop3794" offset="1" style="stop-color:#919cd7;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6" inkscape:cx="42.531265" inkscape:cy="24.375" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" borderlayer="false" />
+ <metadata id="metadata7">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1017.3617)">
+ <path style="fill:white;fill-opacity:1;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 1,1 L 19,1 L 10,10 L 19,19 L 1,19 L 10,10 z" id="papyrusPath" inkscape:connector-curvature="0" transform="translate(60,1017.3618)" />
+ <rect style="fill:none;stroke:none" id="PapyrusLabel" width="140" height="15" x="0" y="20" transform="translate(-10,1025.3975)" />
+ </g>
+</svg>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_full.svg b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_full.svg
new file mode 100644
index 00000000000..2e9be477158
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_full.svg
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="20" height="20" id="svg2" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="round_full.svg">
+ <defs id="defs4">
+ <linearGradient id="linearGradient3789">
+ <stop style="stop-color:#000005;stop-opacity:1;" offset="0" id="stop3791" />
+ <stop style="stop-color:white;stop-opacity:0;" offset="1" id="stop3793" />
+ </linearGradient>
+ <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 20 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="85 : 20 : 1" inkscape:persp3d-origin="42.5 : 13.333333 : 1" id="perspective3063" />
+ <linearGradient id="linearGradient3786">
+ <stop style="stop-color:#000000;stop-opacity:0;" offset="0" id="stop3788" />
+ <stop id="stop3794" offset="1" style="stop-color:#919cd7;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6" inkscape:cx="35.858086" inkscape:cy="21.696429" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" />
+ <metadata id="metadata7">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1032.3617)">
+ <path sodipodi:type="star" style="fill:black;fill-opacity:1;stroke:none;stroke-opacity:1" id="PapyrusPath" sodipodi:sides="16" sodipodi:cx="9.8214283" sodipodi:cy="10" sodipodi:r1="9.0667877" sodipodi:r2="9.0667877" sodipodi:arg1="0.56068699" sodipodi:arg2="0.75703654" inkscape:flatsided="false" inkscape:rounded="0" inkscape:randomized="0" d="M 17.5,14.821429 L 16.411844,16.226801 L 15.070423,17.392882 L 13.527285,18.274857 L 11.841734,18.838835 L 10.078543,19.063141 L 8.3054712,18.939156 L 6.5906569,18.471644 L 4.9999996,17.678572 L 3.5946269,16.590416 L 2.4285468,15.248994 L 1.5465709,13.705857 L 0.98259317,12.020305 L 0.75828691,10.257114 L 0.8822721,8.4840429 L 1.3497841,6.7692286 L 2.1428565,5.1785713 L 3.2310123,3.7731986 L 4.5724339,2.6071185 L 6.1155716,1.7251426 L 7.8011231,1.1611649 L 9.564314,0.93685861 L 11.337385,1.0608438 L 13.0522,1.5283558 L 14.642857,2.3214282 L 16.04823,3.409584 L 17.21431,4.7510056 L 18.096286,6.2941433 L 18.660263,7.9796948 L 18.88457,9.7428857 L 18.760584,11.515957 L 18.293073,13.230771 z" transform="translate(0,1032.3617)" />
+ </g>
+</svg>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_with_cross.svg b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_with_cross.svg
new file mode 100644
index 00000000000..1b21300e115
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_with_cross.svg
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="20" height="20" id="svg2" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="round_with_cross.svg">
+ <defs id="defs4">
+ <linearGradient id="linearGradient3789">
+ <stop style="stop-color:#000005;stop-opacity:1;" offset="0" id="stop3791" />
+ <stop style="stop-color:white;stop-opacity:0;" offset="1" id="stop3793" />
+ </linearGradient>
+ <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 20 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="85 : 20 : 1" inkscape:persp3d-origin="42.5 : 13.333333 : 1" id="perspective3063" />
+ <linearGradient id="linearGradient3786">
+ <stop style="stop-color:#000000;stop-opacity:0;" offset="0" id="stop3788" />
+ <stop id="stop3794" offset="1" style="stop-color:#919cd7;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6" inkscape:cx="68.452286" inkscape:cy="-13.962009" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" />
+ <metadata id="metadata7">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:groupmode="layer" id="layer2" inkscape:label="Calque">
+ <path sodipodi:type="star" style="fill:white;fill-opacity:1;stroke:black;stroke-opacity:1;stroke-width:1.3;stroke-miterlimit:4;stroke-dasharray:none" id="PapyrusPath" sodipodi:sides="16" sodipodi:cx="10.357143" sodipodi:cy="10.357143" sodipodi:r1="8.9731035" sodipodi:r2="8.9731035" sodipodi:arg1="0.82762657" sodipodi:arg2="1.0239761" inkscape:flatsided="false" inkscape:rounded="0" inkscape:randomized="0" d="M 16.428572,16.964287 L 15.022922,18.021809 L 13.437968,18.784783 L 11.73462,19.223887 L 9.9783361,19.322248 L 8.2366099,19.076084 L 6.5763743,18.494856 L 5.0614318,17.600901 L 3.7500003,16.428572 L 2.6924778,15.022922 L 1.9295039,13.437968 L 1.4903996,11.73462 L 1.3920393,9.9783361 L 1.6382028,8.2366099 L 2.2194305,6.5763743 L 3.1133857,5.0614318 L 4.2857147,3.7500003 L 5.6913651,2.6924778 L 7.2763189,1.9295039 L 8.9796668,1.4903996 L 10.735951,1.3920393 L 12.477677,1.6382028 L 14.137912,2.2194305 L 15.652855,3.1133857 L 16.964287,4.2857147 L 18.021809,5.6913651 L 18.784783,7.2763189 L 19.223887,8.9796668 L 19.322248,10.735951 L 19.076084,12.477677 L 18.494856,14.137912 L 17.600901,15.652855 z" transform="translate(-0.3571434,-0.3571434)" />
+ </g>
+ <g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1032.3617)" style="display:inline">
+ <path style="fill:none;stroke:black;stroke-width:1.3;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" d="M 3.5714286,16.428571 L 16.25,3.2142857" id="path3005" inkscape:connector-curvature="0" transform="translate(0.0892857,1032.5403)" />
+ <path style="fill:none;stroke:black;stroke-width:1.3;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" d="M 3.0357143,3.3928571 L 16.25,16.071429" id="path3007" inkscape:connector-curvature="0" transform="translate(0.35714285,1032.6296)" />
+ </g>
+</svg>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_with_dot.svg b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_with_dot.svg
new file mode 100644
index 00000000000..a2f1dda812c
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/round_with_dot.svg
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="20" height="20" id="svg2" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="round_with_dot.svg">
+ <defs id="defs4">
+ <linearGradient id="linearGradient3789">
+ <stop style="stop-color:#000005;stop-opacity:1;" offset="0" id="stop3791" />
+ <stop style="stop-color:white;stop-opacity:0;" offset="1" id="stop3793" />
+ </linearGradient>
+ <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 20 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="85 : 20 : 1" inkscape:persp3d-origin="42.5 : 13.333333 : 1" id="perspective3063" />
+ <linearGradient id="linearGradient3786">
+ <stop style="stop-color:#000000;stop-opacity:0;" offset="0" id="stop3788" />
+ <stop id="stop3794" offset="1" style="stop-color:#919cd7;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6" inkscape:cx="-24.677628" inkscape:cy="21.696429" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" />
+ <metadata id="metadata7">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:groupmode="layer" id="layer2" inkscape:label="Calque">
+ <path sodipodi:type="star" style="fill:white;fill-opacity:1;stroke:black;stroke-opacity:1" id="PapyrusPath" sodipodi:sides="16" sodipodi:cx="10" sodipodi:cy="10.357143" sodipodi:r1="9.0085707" sodipodi:r2="9.0085707" sodipodi:arg1="0.88367212" sodipodi:arg2="1.0800217" inkscape:flatsided="false" inkscape:rounded="0" inkscape:randomized="0" d="M 15.714286,17.32143 L 14.245822,18.302415 L 12.614195,18.978067 L 10.882105,19.322423 L 9.1161164,19.322248 L 7.3840946,18.977549 L 5.7526012,18.301572 L 4.2843323,17.320296 L 3.0357139,16.071429 L 2.0547286,14.602966 L 1.379076,12.971338 L 1.0347205,11.239248 L 1.0348957,9.4732598 L 1.3795949,7.741238 L 2.0555712,6.1097446 L 3.0368478,4.6414757 L 4.285714,3.3928573 L 5.7541775,2.411872 L 7.385805,1.7362194 L 9.1178952,1.3918639 L 10.883884,1.3920391 L 12.615905,1.7367383 L 14.247399,2.4127146 L 15.715668,3.3939912 L 16.964286,4.6428574 L 17.945271,6.1113209 L 18.620924,7.7429484 L 18.96528,9.4750386 L 18.965104,11.241027 L 18.620405,12.973049 L 17.944429,14.604542 L 16.963152,16.072811 z" />
+ </g>
+ <g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1032.3617)">
+ <path sodipodi:type="arc" style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="dot" sodipodi:cx="13.75" sodipodi:cy="13.75" sodipodi:rx="3.9285715" sodipodi:ry="3.75" d="M 17.678571,13.75 A 3.9285715,3.75 0 1 1 9.8214285,13.75 A 3.9285715,3.75 0 1 1 17.678571,13.75 z" transform="matrix(1.5820039,0,0,1.7003653,-11.752554,1019.3388)" />
+ </g>
+</svg>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/stickman.svg b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/stickman.svg
new file mode 100644
index 00000000000..961feec9eb3
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/icons/symbols/stickman.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" width="60" height="100" id="svg2" inkscape:version="0.48.5 r10040" sodipodi:docname="stickman.svg">
+ <metadata id="metadata14">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs id="defs12" />
+ <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1920" inkscape:window-height="1005" id="namedview10" showgrid="false" inkscape:zoom="2.0344828" inkscape:cx="-15.79661" inkscape:cy="58" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" inkscape:current-layer="svg2" />
+ <path inkscape:connector-curvature="0" style="fill:white;fill-opacity:1;stroke:black;stroke-width:2.63808894;stroke-miterlimit:4;stroke-dasharray:none" id="path6" transform="matrix(1.1826896,0,0,1.1941167,-62.215672,0.65414091)" d="M 91.166271,19.719835 A 13.195118,13.068849 0 1 1 64.776035,19.719835 A 13.195118,13.068849 0 1 1 91.166271,19.719835 z" />
+ <path inkscape:connector-curvature="0" style="fill:none;stroke:black;stroke-width:3;stroke-miterlimit:4;stroke-dasharray:none" id="path8" transform="matrix(1.1648124,0,0,1.1648124,-60.858532,-18.091619)" d="M 77.497641,50 L 77.497641,80.960333 M 77.497641,80.392123 L 58.052204,96.933371 M 77.529208,80.392123 L 98.868681,95.860084 M 57.073619,55 L 98.931815,55" />
+</svg>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/NodeEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/NodeEditPart.java
index d29d73019ad..e1751f6a66f 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/NodeEditPart.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/NodeEditPart.java
@@ -1,318 +1,323 @@
-/*****************************************************************************
- * Copyright (c) 2008-2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Style implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common.editpart;
-
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.DragTracker;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.BooleanValueStyle;
-import org.eclipse.gmf.runtime.notation.FillStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.runtime.notation.datatype.GradientData;
-import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.FollowSVGSymbolEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusResizableShapeEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.ShapeService;
-import org.eclipse.papyrus.infra.gmfdiag.common.snap.PapyrusDragEditPartsTrackerEx;
-import org.eclipse.swt.graphics.Color;
-import org.w3c.dom.svg.SVGDocument;
-
-/**
- * this edit part can refresh shadow and gradient.
- */
-public abstract class NodeEditPart extends AbstractBorderedShapeEditPart implements IPapyrusEditPart {
-
- protected SVGNodePlateFigure svgNodePlate;
-
- protected IFigure shape;
-
- /**
- *
- * Constructor.
- *
- * @param view
- */
- public NodeEditPart(View view) {
- super(view);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected NodeFigure createMainFigure() {
- return createNodeFigure();
- }
-
- protected void refreshSVGPath() {
- View view = getNotationView();
- if (svgNodePlate != null) {
- BooleanValueStyle followStyle = (BooleanValueStyle) view.getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), FollowSVGSymbolEditPolicy.FOLLOW_SVG_SYMBOL);
- if (followStyle != null && followStyle.isBooleanValue()) {
- if (ShapeService.getInstance().hasShapeToDisplay(getNotationView())) {
- List<SVGDocument> svgToDisplay = ShapeService.getInstance().getSVGDocumentToDisplay(getNotationView());
- int documentNumber = svgToDisplay.size();
- SVGDocument svgdoc = null;
- if (documentNumber > 0) {
- svgdoc = svgToDisplay.get(documentNumber - 1);
- }
-
- svgNodePlate.setSVGDocument(svgdoc);
- } else {
- svgNodePlate.setSVGDocument(null);
- }
- } else {
- svgNodePlate.setSVGDocument(null);
- }
- }
- }
-
- /**
- * <p>
- * Returns the primary shape being the View of this edit part.
- * </p>
- * <b>Warning</b> It should never return <code>null</code>
- *
- * @return the primary shape associated to this edit part.
- */
- @Override
- public abstract IPapyrusNodeFigure getPrimaryShape();
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean supportsGradient() {
- return true;
- }
-
- /**
- *
- * {@inheritDoc}
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- // Update the figure when the line width changes
- Object feature = event.getFeature();
- if ((getModel() != null) && (getModel() == event.getNotifier())) {
- if (NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
- refreshLineWidth();
- } else if (NotationPackage.eINSTANCE.getLineTypeStyle_LineType().equals(feature)) {
- refreshLineType();
- }
- }
-
- // set the figure active when the feature of the of a class is true
- if (resolveSemanticElement() != null) {
- refreshShadow();
- }
- }
-
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshShadow();
- refreshLineType();
- refreshLineWidth();
- refreshTransparency();
- refreshSVGPath();
- }
-
- @Override
- protected void setLineWidth(int width) {
- if (width < 0) {
- width = 1;
- }
- getPrimaryShape().setLineWidth(width);
- }
-
- @Override
- protected void setLineType(int style) {
- getPrimaryShape().setLineStyle(style);
- }
-
- /**
- * Override to set the transparency to the correct figure
- */
- @Override
- protected void setTransparency(int transp) {
- getPrimaryShape().setTransparency(transp);
- }
-
- /**
- * sets the back ground color of this edit part
- *
- * @param color
- * the new value of the back ground color
- */
- @Override
- protected void setBackgroundColor(Color color) {
- getPrimaryShape().setBackgroundColor(color);
- getPrimaryShape().setIsUsingGradient(false);
- getPrimaryShape().setGradientData(-1, -1, 0);
- }
-
- /**
- * Override to set the gradient data to the correct figure
- */
- @Override
- protected void setGradient(GradientData gradient) {
- IPapyrusNodeFigure fig = getPrimaryShape();
- FillStyle style = (FillStyle) getPrimaryView().getStyle(NotationPackage.Literals.FILL_STYLE);
- if (gradient != null) {
- fig.setIsUsingGradient(true);
- ;
- fig.setGradientData(style.getFillColor(), gradient.getGradientColor1(), gradient.getGradientStyle());
- } else {
- fig.setIsUsingGradient(false);
- }
- }
-
- /**
- * sets the font color
- *
- * @param color
- * the new value of the font color
- */
- @Override
- protected void setFontColor(Color color) {
- // NULL implementation
- }
-
- /**
- * sets the fore ground color of this edit part's figure
- *
- * @param color
- * the new value of the foregroundcolor
- */
- @Override
- protected void setForegroundColor(Color color) {
- getPrimaryShape().setForegroundColor(color);
- }
-
- /**
- * Refresh the shadow of the figure
- */
- protected final void refreshShadow() {
- getPrimaryShape().setShadow(AppearanceHelper.showShadow((View) getModel()));
- }
-
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
- }
-
- /**
- *
- * @return the figure that represent the shape, this class is generated by the GMF tooling
- */
- protected abstract IFigure createNodePlate();
-
- /**
- *
- * @return the figure that represent the shape, this class is generated by the GMF tooling
- */
- protected abstract IFigure createNodeShape();
-
- /**
- * this method installs the content pane in the node shape to add compartment for example
- *
- * @param nodeShape
- * @return the figure that is the the node shape
- */
- protected abstract IFigure setupContentPane(IFigure nodeShape);
-
-
- /**
- * Now the method create node plate is not used,
- * If you want to overlad it you must overload createSVGNodePlate
- *
- * @return the figure that allow following border of shape
- */
- protected NodeFigure createSVGNodePlate() {
-
- svgNodePlate = new SVGNodePlateFigure(-1, -1);
- svgNodePlate.setDefaultNodePlate(createNodePlate());
- return svgNodePlate;
- }
-
- /**
- * 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.
- *
- */
- protected NodeFigure createMainFigureWithSVG() {
-
- NodeFigure figure = createSVGNodePlate();
-
- figure.setLayoutManager(new StackLayout());
- shape = createNodeShape();
- figure.add(shape);
- setupContentPane(shape);
- return figure;
- }
-
- @Override
- public IFigure getContentPane() {
- if (shape != null) {
- IFigure contentPane = setupContentPane(shape);
- return contentPane;
- } else {
- return super.getContentPane();
- }
- }
-
- /**
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#getDragTracker(org.eclipse.gef.Request)
- *
- * @param request
- * @return
- */
- @Override
- public DragTracker getDragTracker(final Request request) {
- return new PapyrusDragEditPartsTrackerEx(this, true, false, false);
- }
-
- /**
- * TODO : remove this override when the bug will be fixed
- * See Bug 424943 ResizableEditPolicy#getResizeCommand duplicates request ignoring some request values
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart#getPrimaryDragEditPolicy()
- *
- * @return
- */
- @Override
- public EditPolicy getPrimaryDragEditPolicy() {
- EditPolicy policy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- return policy != null ? policy : new PapyrusResizableShapeEditPolicy();
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2008-2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Style implementation
+ * Micka�l ADAM (ALL4TEC) mickael.adam@all4tec.net - Add condition to set SVG Path
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.editpart;
+
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.DragTracker;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.BooleanValueStyle;
+import org.eclipse.gmf.runtime.notation.FillStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.runtime.notation.datatype.GradientData;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.FollowSVGSymbolEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusResizableShapeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.ShapeService;
+import org.eclipse.papyrus.infra.gmfdiag.common.snap.PapyrusDragEditPartsTrackerEx;
+import org.eclipse.swt.graphics.Color;
+import org.w3c.dom.svg.SVGDocument;
+
+/**
+ * this edit part can refresh shadow and gradient.
+ */
+public abstract class NodeEditPart extends AbstractBorderedShapeEditPart implements IPapyrusEditPart {
+
+ protected SVGNodePlateFigure svgNodePlate;
+
+ protected IFigure shape;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param view
+ */
+ public NodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ return createNodeFigure();
+ }
+
+ /**
+ * Refresh the SVG Path for anchorable elements
+ */
+ protected void refreshSVGPath() {
+ View view = getNotationView();
+ if (svgNodePlate != null) {
+ BooleanValueStyle followStyle = (BooleanValueStyle) view.getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), FollowSVGSymbolEditPolicy.FOLLOW_SVG_SYMBOL);
+ //follow SVG is set to true
+ if (followStyle != null && followStyle.isBooleanValue()) {
+ if (ShapeService.getInstance().hasShapeToDisplay(getNotationView())) {
+ List<SVGDocument> svgToDisplay = ShapeService.getInstance().getSVGDocumentToDisplay(getNotationView());
+ int documentNumber = svgToDisplay.size();
+ //If there is more than one element we don't follow the SVG path.
+ if(documentNumber == 1) {
+ //Set the SVG document of the SVGNodePlate to the document to display
+ svgNodePlate.setSVGDocument(svgToDisplay.get(0));
+ } else {
+ svgNodePlate.setSVGDocument(null);
+ }
+ } else {
+ svgNodePlate.setSVGDocument(null);
+ }
+ } else {
+ svgNodePlate.setSVGDocument(null);
+ }
+ }
+ }
+
+ /**
+ * <p>
+ * Returns the primary shape being the View of this edit part.
+ * </p>
+ * <b>Warning</b> It should never return <code>null</code>
+ *
+ * @return the primary shape associated to this edit part.
+ */
+ @Override
+ public abstract IPapyrusNodeFigure getPrimaryShape();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean supportsGradient() {
+ return true;
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ // Update the figure when the line width changes
+ Object feature = event.getFeature();
+ if ((getModel() != null) && (getModel() == event.getNotifier())) {
+ if (NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
+ refreshLineWidth();
+ } else if (NotationPackage.eINSTANCE.getLineTypeStyle_LineType().equals(feature)) {
+ refreshLineType();
+ }
+ }
+
+ // set the figure active when the feature of the of a class is true
+ if (resolveSemanticElement() != null) {
+ refreshShadow();
+ }
+ }
+
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshShadow();
+ refreshLineType();
+ refreshLineWidth();
+ refreshTransparency();
+ refreshSVGPath();
+ }
+
+ @Override
+ protected void setLineWidth(int width) {
+ if (width < 0) {
+ width = 1;
+ }
+ getPrimaryShape().setLineWidth(width);
+ }
+
+ @Override
+ protected void setLineType(int style) {
+ getPrimaryShape().setLineStyle(style);
+ }
+
+ /**
+ * Override to set the transparency to the correct figure
+ */
+ @Override
+ protected void setTransparency(int transp) {
+ getPrimaryShape().setTransparency(transp);
+ }
+
+ /**
+ * sets the back ground color of this edit part
+ *
+ * @param color
+ * the new value of the back ground color
+ */
+ @Override
+ protected void setBackgroundColor(Color color) {
+ getPrimaryShape().setBackgroundColor(color);
+ getPrimaryShape().setIsUsingGradient(false);
+ getPrimaryShape().setGradientData(-1, -1, 0);
+ }
+
+ /**
+ * Override to set the gradient data to the correct figure
+ */
+ @Override
+ protected void setGradient(GradientData gradient) {
+ IPapyrusNodeFigure fig = getPrimaryShape();
+ FillStyle style = (FillStyle) getPrimaryView().getStyle(NotationPackage.Literals.FILL_STYLE);
+ if (gradient != null) {
+ fig.setIsUsingGradient(true);
+ fig.setGradientData(style.getFillColor(), gradient.getGradientColor1(), gradient.getGradientStyle());
+ } else {
+ fig.setIsUsingGradient(false);
+ }
+ }
+
+ /**
+ * sets the font color
+ *
+ * @param color
+ * the new value of the font color
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ // NULL implementation
+ }
+
+ /**
+ * sets the fore ground color of this edit part's figure
+ *
+ * @param color
+ * the new value of the foregroundcolor
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ getPrimaryShape().setForegroundColor(color);
+ }
+
+ /**
+ * Refresh the shadow of the figure
+ */
+ protected final void refreshShadow() {
+ getPrimaryShape().setShadow(AppearanceHelper.showShadow((View) getModel()));
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ *
+ * @return the figure that represent the shape, this class is generated by the GMF tooling
+ */
+ protected abstract IFigure createNodePlate();
+
+ /**
+ *
+ * @return the figure that represent the shape, this class is generated by the GMF tooling
+ */
+ protected abstract IFigure createNodeShape();
+
+ /**
+ * this method installs the content pane in the node shape to add compartment for example
+ *
+ * @param nodeShape
+ * @return the figure that is the the node shape
+ */
+ protected abstract IFigure setupContentPane(IFigure nodeShape);
+
+
+ /**
+ * Now the method create node plate is not used,
+ * If you want to overlad it you must overload createSVGNodePlate
+ *
+ * @return the figure that allow following border of shape
+ */
+ protected NodeFigure createSVGNodePlate() {
+
+ svgNodePlate = new SVGNodePlateFigure(-1, -1);
+ svgNodePlate.setDefaultNodePlate(createNodePlate());
+ return svgNodePlate;
+ }
+
+ /**
+ * 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.
+ *
+ */
+ protected NodeFigure createMainFigureWithSVG() {
+
+ NodeFigure figure = createSVGNodePlate();
+
+ figure.setLayoutManager(new StackLayout());
+ shape = createNodeShape();
+ figure.add(shape);
+ setupContentPane(shape);
+ return figure;
+ }
+
+ @Override
+ public IFigure getContentPane() {
+ if (shape != null) {
+ IFigure contentPane = setupContentPane(shape);
+ return contentPane;
+ } else {
+ return super.getContentPane();
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#getDragTracker(org.eclipse.gef.Request)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ public DragTracker getDragTracker(final Request request) {
+ return new PapyrusDragEditPartsTrackerEx(this, true, false, false);
+ }
+
+ /**
+ * TODO : remove this override when the bug will be fixed
+ * See Bug 424943 ResizableEditPolicy#getResizeCommand duplicates request ignoring some request values
+ *
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart#getPrimaryDragEditPolicy()
+ *
+ * @return
+ */
+ @Override
+ public EditPolicy getPrimaryDragEditPolicy() {
+ EditPolicy policy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ return policy != null ? policy : new PapyrusResizableShapeEditPolicy();
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java
index feb00b8fbd9..2542fb88e8a 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java
@@ -1,406 +1,410 @@
-/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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.infra.gmfdiag.common.editpart;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.draw2d.AbstractLayout;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.ScrollPane;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
-import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.render.RenderedImage;
-import org.eclipse.gmf.runtime.draw2d.ui.render.figures.ScalableImageFigure;
-import org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.GraphicalEditPolicyEx;
-import org.eclipse.gmf.runtime.notation.BooleanValueStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.Activator;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.MaintainSymbolRatioEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.BorderedScalableImageFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.ScalableCompartmentFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.ShapeFlowLayout;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SubCompartmentLayoutManager;
-import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.NotificationManager;
-import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.ShapeService;
-
-/**
- * CompartmentEditPart in charge of shpae display.
- */
-public class ShapeDisplayCompartmentEditPart extends ResizableCompartmentEditPart {
-
- /** Title of this compartment */
- public final static String COMPARTMENT_NAME = "symbol"; // $NON-NLS-1$
-
- /**
- * Creates a new ShapeDisplayCompartmentEditPart
- *
- * @param model
- * The resizable compartment view
- */
- public ShapeDisplayCompartmentEditPart(EObject model) {
- super(model);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void activate() {
- super.activate();
-
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void deactivate() {
- super.deactivate();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- // Start of user code custom edit policies
- installEditPolicy(ShapeRefreshEditPolicy.SHAPE_REFRESH_EDIT_POLICY_ROLE, new ShapeRefreshEditPolicy());
- installEditPolicy(MaintainSymbolRatioEditPolicy.MAINTAIN_SYMBOL_RATIO_EDITPOLICY, new MaintainSymbolRatioEditPolicy());
- installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
- // End of user code
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getCompartmentName() {
- return COMPARTMENT_NAME;
- }
-
- /**
- * this method is used to set the ratio of the figure.
- * pay attention if the ratio is true, the only figure is displayed
- *
- * @param maintainRatio
- */
- protected void maintainRatio(boolean maintainRatio) {
- IFigure contentPane = ((ResizableCompartmentFigure) getFigure()).getContentPane();
- for (Object subFigure : contentPane.getChildren()) {
- if (subFigure instanceof BorderedScalableImageFigure) {
- ((BorderedScalableImageFigure) subFigure).setMaintainAspectRatio(maintainRatio);
- }
-
- }
- if (!maintainRatio) {
- OneShapeLayoutManager layout = new OneShapeLayoutManager();
- contentPane.setLayoutManager(layout);
- } else {
- ShapeFlowLayout layout = new ShapeFlowLayout();
- contentPane.setLayoutManager(layout);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IFigure createFigure() {
- ResizableCompartmentFigure result = new ScalableCompartmentFigure(getCompartmentName(), getMapMode());
- // result.setBackgroundColor(ColorConstants.lightBlue);
- // result.setForegroundColor(ColorConstants.blue);
- // result.getParent().setBackgroundColor(ColorConstants.lightGray);
- ShapeCompartmentLayoutManager layoutManager = new ShapeCompartmentLayoutManager();
- result.setLayoutManager(layoutManager);
- ShapeFlowLayout layout = new ShapeFlowLayout();
- // layout.setHorizontal(true);
- // layout.setStretchMinorAxis(true);
- // layout.setStretchMajorAxis(true);
- // layout.setMinorAlignment(OrderedLayout.ALIGN_CENTER);
-
- result.getContentPane().setLayoutManager(layout);
-
- return result;
- }
-
- /**
- * Refreshes the displayed shapes on the figure.
- * <P>
- * To be sure everything is clean, it removes all the current displayed shapes and then redraw all of the demanded shapes. This could be probably improved in case of performance issues.
- * </P>
- *
- * @param contentPane
- * the figure where to add the new shapes
- */
- protected void refreshShapes(IFigure contentPane) {
- List<Object> children = new ArrayList<Object>(contentPane.getChildren());
- for (Object child : children) {
- if (child instanceof IFigure) {
- contentPane.remove((IFigure) child);
- }
- }
-
- List<RenderedImage> shapesToDisplay = ShapeService.getInstance().getShapesToDisplay(getNotationView().eContainer());
- if (shapesToDisplay != null && !shapesToDisplay.isEmpty()) {
- for (RenderedImage image : shapesToDisplay) {
- if (image != null) {
- IFigure imageFigure = new BorderedScalableImageFigure(image, false, true, true);
- imageFigure.setOpaque(false);
- imageFigure.setVisible(true);
- contentPane.add(imageFigure);
- } else {
- Activator.log.debug("No image will be drawn");
- }
- }
- }
- }
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshSymbolCompartment();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * Specific layout manager for the shape compartment. The main goal of this class is to ease the debug process. no specific implementation is
- * planned yet.
- * We prevent to display the label of the compartment shape
- */
- public class ShapeCompartmentLayoutManager extends SubCompartmentLayoutManager {
-
- public static final int MIN_PREFERRED_SIZE = 40;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void layout(IFigure container) {
- super.layout(container);
- for (int i = 0; i < container.getChildren().size(); i++) {
- if (container.getChildren().get(i) instanceof ScrollPane) {
- ((ScrollPane) container.getChildren().get(i)).setBounds(container.getBounds());
- }
- }
-
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Dimension calculatePreferredSize(IFigure figure, int wHint, int hHint) {
- Dimension dim = super.calculatePreferredSize(figure, wHint, hHint);
-
- dim.height = Math.max(MIN_PREFERRED_SIZE, dim.height);
-
- return dim;
- }
-
-
- }
-
- public class OneShapeLayoutManager extends AbstractLayout {
-
- /**
- *
- * {@inheritDoc}
- */
- @Override
- protected Dimension calculatePreferredSize(IFigure container, int hint, int hint2) {
-
- int minimumWith = 50;
- int minimumHeight = 50;
-
- return new Dimension(minimumWith, minimumHeight);
- }
-
- /**
- *
- * {@inheritDoc}
- */
- @Override
- public void layout(IFigure container) {
- Rectangle compartmentBound = new Rectangle(container.getBounds());
- if (container.getBorder() instanceof MarginBorder) {
- MarginBorder marginBorder = ((MarginBorder) container.getBorder());
- compartmentBound = compartmentBound.shrink(marginBorder.getInsets(container));
- }
-
-
- IFigure contentPane = ((ResizableCompartmentFigure) getFigure()).getContentPane();
- ScalableImageFigure scalableImageFigure = null;
- if (contentPane.getChildren().size() > 0) {
- Object lastFig = contentPane.getChildren().get(contentPane.getChildren().size() - 1);
- if (lastFig instanceof ScalableImageFigure) {
- scalableImageFigure = (ScalableImageFigure) lastFig;
- }
- }
- if (scalableImageFigure != null) {
- scalableImageFigure.setBounds(compartmentBound);
- }
-
- }
- }
-
- /**
- * Edit Policy in charge of the graphical update of the compartment
- */
- @SuppressWarnings("restriction")
- public class ShapeRefreshEditPolicy extends GraphicalEditPolicyEx implements NotificationListener {
-
- /** role for this edit policy */
- public static final String SHAPE_REFRESH_EDIT_POLICY_ROLE = "shape_refresh_edit_policy"; ////$NON-NLS-1$
-
- /** manager for notifications */
- protected NotificationManager notificationManager;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void activate() {
- super.activate();
- // retrieve the view and the element managed by the edit part
- View view = getView();
- if (view == null) {
- return;
- }
- // listens for modifications on the container of the compartment, i.e. the figure that handle stereotype management (ClassifierView for example)
- notificationManager = ShapeService.getInstance().createNotificationManager(getDiagramEventBroker(), view.eContainer(), this);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void deactivate() {
- // retrieve the view and the element managed by the edit part
- View view = getView();
- if (view == null) {
- return;
- }
- notificationManager.dispose();
- notificationManager = null;
- super.deactivate();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void refresh() {
- super.refresh();
- refreshShapes(getContentPane());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void notifyChanged(Notification notification) {
- refresh();
- }
-
- /**
- * Gets the diagram event broker from the editing domain.
- *
- * @return the diagram event broker
- */
- protected DiagramEventBroker getDiagramEventBroker() {
- TransactionalEditingDomain theEditingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
- if (theEditingDomain != null) {
- return DiagramEventBroker.getInstance(theEditingDomain);
- }
- return null;
- }
-
- /**
- * Returns the view controlled by the host edit part
- *
- * @return the view controlled by the host edit part
- */
- protected View getView() {
- return (View) getHost().getModel();
- }
- }
-
- /**
- * refresh the qualified name
- */
- protected void refreshSymbolCompartment() {
- BooleanValueStyle maintainRatio = getMaintainSymbolRatioStyle(getNotationView());
- if (maintainRatio != null && maintainRatio.isBooleanValue() == false) {
- maintainRatio(false);
- } else {
- maintainRatio(true);
- }
- }
-
- /**
- *
- * @param currentView
- * @return the current Style that reperesent the boder
- */
- protected BooleanValueStyle getMaintainSymbolRatioStyle(View currentView) {
- View parentView = currentView;
- while (parentView.getElement() == currentView.getElement()) {
- BooleanValueStyle style = (BooleanValueStyle) parentView.getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), MaintainSymbolRatioEditPolicy.MAINTAIN_SYMBOL_RATIO);
- if (style != null) {
- return style;
- }
-
- if (parentView.eContainer() instanceof View) {
- parentView = (View) parentView.eContainer();
- } else {
- break;
- }
-
- }
-
- return null;
- }
-
- @Override
- public boolean isSelectable() {
- return false;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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.infra.gmfdiag.common.editpart;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.AbstractLayout;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.MarginBorder;
+import org.eclipse.draw2d.ScrollPane;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.render.RenderedImage;
+import org.eclipse.gmf.runtime.draw2d.ui.render.figures.ScalableImageFigure;
+import org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.GraphicalEditPolicyEx;
+import org.eclipse.gmf.runtime.notation.BooleanValueStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.MaintainSymbolRatioEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.BorderedScalableImageFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.ScalableCompartmentFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.ShapeFlowLayout;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SubCompartmentLayoutManager;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.NotificationManager;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.ShapeService;
+
+/**
+ * CompartmentEditPart in charge of shpae display.
+ */
+public class ShapeDisplayCompartmentEditPart extends ResizableCompartmentEditPart {
+
+ /** Title of this compartment */
+ public final static String COMPARTMENT_NAME = "symbol"; // $NON-NLS-1$
+ private boolean useOriginalColors = true;
+
+ /**
+ * @param useOriginalColors
+ * the useOriginalColors to set
+ */
+ public void setUseOriginalColors(boolean useOriginalColors) {
+ this.useOriginalColors = useOriginalColors;
+ }
+
+ /**
+ * Creates a new ShapeDisplayCompartmentEditPart
+ *
+ * @param model
+ * The resizable compartment view
+ */
+ public ShapeDisplayCompartmentEditPart(EObject model) {
+ super(model);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void activate() {
+ super.activate();
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void deactivate() {
+ super.deactivate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ // Start of user code custom edit policies
+ installEditPolicy(ShapeRefreshEditPolicy.SHAPE_REFRESH_EDIT_POLICY_ROLE, new ShapeRefreshEditPolicy());
+ installEditPolicy(MaintainSymbolRatioEditPolicy.MAINTAIN_SYMBOL_RATIO_EDITPOLICY, new MaintainSymbolRatioEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ // End of user code
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getCompartmentName() {
+ return COMPARTMENT_NAME;
+ }
+
+ /**
+ * this method is used to set the ratio of the figure.
+ * pay attention if the ratio is true, the only figure is displayed
+ *
+ * @param maintainRatio
+ */
+ protected void maintainRatio(boolean maintainRatio) {
+ IFigure contentPane = ((ResizableCompartmentFigure) getFigure()).getContentPane();
+ for (Object subFigure : contentPane.getChildren()) {
+ if (subFigure instanceof BorderedScalableImageFigure) {
+ ((BorderedScalableImageFigure) subFigure).setMaintainAspectRatio(maintainRatio);
+ }
+
+ }
+ int nbShapeToDisplay = ShapeService.getInstance().getShapesToDisplay(getPrimaryView()).size();
+ if (!maintainRatio && nbShapeToDisplay == 1) {
+ OneShapeLayoutManager layout = new OneShapeLayoutManager();
+ contentPane.setLayoutManager(layout);
+ } else {
+ ShapeFlowLayout layout = new ShapeFlowLayout();
+ contentPane.setLayoutManager(layout);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = new ScalableCompartmentFigure(getCompartmentName(), getMapMode());
+ ShapeCompartmentLayoutManager layoutManager = new ShapeCompartmentLayoutManager();
+ result.setLayoutManager(layoutManager);
+ ShapeFlowLayout layout = new ShapeFlowLayout();
+
+ result.getContentPane().setLayoutManager(layout);
+
+ return result;
+ }
+
+ /**
+ * Refreshes the displayed shapes on the figure.
+ * <P>
+ * To be sure everything is clean, it removes all the current displayed shapes and then redraw all of the demanded shapes. This could be probably improved in case of performance issues.
+ * </P>
+ *
+ * @param contentPane
+ * the figure where to add the new shapes
+ */
+ protected void refreshShapes(IFigure contentPane) {
+ List<Object> children = new ArrayList<Object>(contentPane.getChildren());
+ for (Object child : children) {
+ if (child instanceof IFigure) {
+ contentPane.remove((IFigure) child);
+ }
+ }
+
+ List<RenderedImage> shapesToDisplay = ShapeService.getInstance().getShapesToDisplay(getNotationView().eContainer());
+ if (shapesToDisplay != null && !shapesToDisplay.isEmpty()) {
+ for (RenderedImage image : shapesToDisplay) {
+ if (image != null) {
+ IFigure imageFigure = new BorderedScalableImageFigure(image, false, useOriginalColors, true);
+ imageFigure.setOpaque(false);
+ imageFigure.setVisible(true);
+ contentPane.add(imageFigure);
+ } else {
+ Activator.log.debug("No image will be drawn");
+ }
+ }
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshSymbolCompartment();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * Specific layout manager for the shape compartment. The main goal of this class is to ease the debug process. no specific implementation is
+ * planned yet.
+ * We prevent to display the label of the compartment shape
+ */
+ public class ShapeCompartmentLayoutManager extends SubCompartmentLayoutManager {
+
+ public static final int MIN_PREFERRED_SIZE = 40;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void layout(IFigure container) {
+ super.layout(container);
+ for (int i = 0; i < container.getChildren().size(); i++) {
+ if (container.getChildren().get(i) instanceof ScrollPane) {
+ ((ScrollPane) container.getChildren().get(i)).setBounds(container.getBounds());
+ }
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Dimension calculatePreferredSize(IFigure figure, int wHint, int hHint) {
+ Dimension dim = super.calculatePreferredSize(figure, wHint, hHint);
+
+ if (figure.getParent().getBounds().height > MIN_PREFERRED_SIZE) // Patch to permit to have shape dimension < 40
+ dim.height = Math.max(MIN_PREFERRED_SIZE, dim.height);
+
+ return dim;
+ }
+
+
+ }
+
+ public class OneShapeLayoutManager extends AbstractLayout {
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected Dimension calculatePreferredSize(IFigure container, int hint, int hint2) {
+
+ int minimumWith = 16;
+ int minimumHeight = 16;
+
+ return new Dimension(minimumWith, minimumHeight);
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void layout(IFigure container) {
+ Rectangle compartmentBound = new Rectangle(container.getBounds());
+ if (container.getBorder() instanceof MarginBorder) {
+ MarginBorder marginBorder = ((MarginBorder) container.getBorder());
+ compartmentBound = compartmentBound.shrink(marginBorder.getInsets(container));
+ }
+
+
+ IFigure contentPane = ((ResizableCompartmentFigure) getFigure()).getContentPane();
+ ScalableImageFigure scalableImageFigure = null;
+ if (contentPane.getChildren().size() > 0) {
+ Object lastFig = contentPane.getChildren().get(contentPane.getChildren().size() - 1);
+ if (lastFig instanceof ScalableImageFigure) {
+ scalableImageFigure = (ScalableImageFigure) lastFig;
+ }
+ }
+ if (scalableImageFigure != null) {
+ scalableImageFigure.setBounds(compartmentBound);
+ }
+
+ }
+ }
+
+ /**
+ * Edit Policy in charge of the graphical update of the compartment
+ */
+ @SuppressWarnings("restriction")
+ public class ShapeRefreshEditPolicy extends GraphicalEditPolicyEx implements NotificationListener {
+
+ /** role for this edit policy */
+ public static final String SHAPE_REFRESH_EDIT_POLICY_ROLE = "shape_refresh_edit_policy"; ////$NON-NLS-1$
+
+ /** manager for notifications */
+ protected NotificationManager notificationManager;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ // retrieve the view and the element managed by the edit part
+ View view = getView();
+ if (view == null) {
+ return;
+ }
+ // listens for modifications on the container of the compartment, i.e. the figure that handle stereotype management (ClassifierView for example)
+ notificationManager = ShapeService.getInstance().createNotificationManager(getDiagramEventBroker(), view.eContainer(), this);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void deactivate() {
+ // retrieve the view and the element managed by the edit part
+ View view = getView();
+ if (view == null) {
+ return;
+ }
+ notificationManager.dispose();
+ notificationManager = null;
+ super.deactivate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void refresh() {
+ super.refresh();
+ refreshShapes(getContentPane());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ refresh();
+ }
+
+ /**
+ * Gets the diagram event broker from the editing domain.
+ *
+ * @return the diagram event broker
+ */
+ protected DiagramEventBroker getDiagramEventBroker() {
+ TransactionalEditingDomain theEditingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
+ if (theEditingDomain != null) {
+ return DiagramEventBroker.getInstance(theEditingDomain);
+ }
+ return null;
+ }
+
+ /**
+ * Returns the view controlled by the host edit part
+ *
+ * @return the view controlled by the host edit part
+ */
+ protected View getView() {
+ return (View) getHost().getModel();
+ }
+ }
+
+ /**
+ * refresh the qualified name
+ */
+ protected void refreshSymbolCompartment() {
+ BooleanValueStyle maintainRatio = getMaintainSymbolRatioStyle(getNotationView());
+ if (maintainRatio != null && maintainRatio.isBooleanValue() == false) {
+ maintainRatio(false);
+ } else {
+ maintainRatio(true);
+ }
+ }
+
+ /**
+ *
+ * @param currentView
+ * @return the current Style that reperesent the boder
+ */
+ protected BooleanValueStyle getMaintainSymbolRatioStyle(View currentView) {
+ View parentView = currentView;
+ while (parentView.getElement() == currentView.getElement()) {
+ BooleanValueStyle style = (BooleanValueStyle) parentView.getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), MaintainSymbolRatioEditPolicy.MAINTAIN_SYMBOL_RATIO);
+ if (style != null) {
+ return style;
+ }
+
+ if (parentView.eContainer() instanceof View) {
+ parentView = (View) parentView.eContainer();
+ } else {
+ break;
+ }
+
+ }
+
+ return null;
+ }
+
+ @Override
+ public boolean isSelectable() {
+ return false;
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/BorderDisplayEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/BorderDisplayEditPolicy.java
index 3b93184dce3..e31d1bf5957 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/BorderDisplayEditPolicy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/BorderDisplayEditPolicy.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2010, 2014 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,23 +7,30 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.editpolicies;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.core.databinding.observable.ChangeEvent;
import org.eclipse.core.databinding.observable.IChangeListener;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.draw2d.Border;
import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
import org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.GraphicalEditPolicyEx;
import org.eclipse.gmf.runtime.notation.BooleanValueStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
@@ -32,17 +38,39 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomBooleanStyleObservableValue;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.OneTopLineResizableBorder;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
/**
- * this edit policy has in charge to toggle the border of its edit part's figure
+ * this edit policy has in charge to toggle the border of its edit part's figure.
*/
public class BorderDisplayEditPolicy extends GraphicalEditPolicyEx implements IChangeListener, NotificationListener {
+ /** The notation NameStyle property to define line position. */
+ public static final String LINE_POSITION = "linePosition";
+
+ /** The default value for the line position of compartment. */
+ private static final String LINE_POSITION_DEFAULT_VALUE = "center";
+
+ /** The default value for the line length ratio of compartment. */
+ private static final String LINE_LENGTH_RATIO_DEFAULT_VALUE = "1.0";
+
+ /** The notation NameStyle property to define the line length ratio of compartment's topLine. */
+ private static final String LINE_LENGTH_RATIO = "lineLengthRatio";
+
+ /** the default value for the line length of compartment. If the length is set to this default value, the length will be not forced */
+ private static final int DEFAULT_LENGTH_VALUE = -1;
+
+ /** The notation NameStyle property to define the line length of compartment's topLine. */
+ public static final String LENGTH = "lineLength";
+
+ /** The notation NameStyle property to display. */
public static final String DISPLAY_BORDER = "displayBorder";
- /** key for this edit policy */
+ /** key for this edit policy. */
public final static String BORDER_DISPLAY_EDITPOLICY = "BORDER_DISPLAY_EDITPOLICY";
+ /** The style observable. */
protected IObservableValue styleObservable;
/**
@@ -60,8 +88,7 @@ public class BorderDisplayEditPolicy extends GraphicalEditPolicyEx implements IC
styleObservable = new CustomBooleanStyleObservableValue(view, EMFHelper.resolveEditingDomain(view), DISPLAY_BORDER);
styleObservable.addChangeListener(this);
- // adds a listener on the view and the element controlled by the
- // editpart
+ // adds a listener on the view and the element controlled by the editpart
getDiagramEventBroker().addNotificationListener(view, this);
EObject semanticElement = EMFHelper.getEObject(getHost());
@@ -86,16 +113,6 @@ public class BorderDisplayEditPolicy extends GraphicalEditPolicyEx implements IC
return null;
}
-
- /**
- *
- * @param currentView
- * @return the current Style that reperesent the boder
- */
- protected BooleanValueStyle getMaintainSymbolRatioStyle(View currentView) {
- return (BooleanValueStyle) currentView.getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), DISPLAY_BORDER);
- }
-
/**
*
* {@inheritDoc}
@@ -109,21 +126,45 @@ public class BorderDisplayEditPolicy extends GraphicalEditPolicyEx implements IC
}
}
+ /**
+ * Notify changed.
+ *
+ * @param notification
+ * the notification
+ * @see org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ */
@Override
public void notifyChanged(Notification notification) {
refreshBorderDisplay();
}
+ /**
+ * Handle change.
+ *
+ * @param event
+ * the event
+ * @see org.eclipse.core.databinding.observable.IChangeListener#handleChange(org.eclipse.core.databinding.observable.ChangeEvent)
+ */
@Override
public void handleChange(ChangeEvent event) {
getHost().refresh();
}
+ /**
+ * Refresh.
+ *
+ * @see org.eclipse.gmf.runtime.gef.ui.internal.editpolicies.GraphicalEditPolicyEx#refresh()
+ */
@Override
public void refresh() {
refreshBorderDisplay();
}
+ /**
+ * Gets the primary shape.
+ *
+ * @return the primary shape
+ */
protected IFigure getPrimaryShape() {
EditPart host = getHost();
if (host instanceof IPapyrusEditPart) {
@@ -134,6 +175,11 @@ public class BorderDisplayEditPolicy extends GraphicalEditPolicyEx implements IC
return getHostFigure();
}
+ /**
+ * Gets the notation view.
+ *
+ * @return the notation view
+ */
protected View getNotationView() {
EditPart host = getHost();
if (host instanceof org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart) {
@@ -144,8 +190,12 @@ public class BorderDisplayEditPolicy extends GraphicalEditPolicyEx implements IC
return view;
}
+ /** The default border. */
protected Border defaultBorder;
+ /**
+ * Refresh border display.
+ */
protected void refreshBorderDisplay() {
View view = getNotationView();
if (view == null) {
@@ -154,39 +204,101 @@ public class BorderDisplayEditPolicy extends GraphicalEditPolicyEx implements IC
BooleanValueStyle displayBorderStyle = findDisplayBorderStyle(view);
+ // if not diplayBorder
if (displayBorderStyle != null && !displayBorderStyle.isBooleanValue()) {
if (defaultBorder == null) {
defaultBorder = getPrimaryShape().getBorder();
}
getPrimaryShape().setBorder(null);
-
- // TODO: This edit policy should be installed on all compartments. We shouldn't need to refresh them from here
- // for(Object currentEditPart : getHost().getChildren()) {
- // if(currentEditPart instanceof ResizableCompartmentEditPart) {
- // ((ResizableCompartmentEditPart)currentEditPart).getFigure().setBorder(null);
- // }
- // }
- //
-
-
} else {
- if (defaultBorder != null) {
+ // if diplayBorder
+ // If the shape is a compartment
+ if (getPrimaryShape() instanceof ResizableCompartmentFigure) {
+ if (!(defaultBorder instanceof OneTopLineResizableBorder)) {
+ defaultBorder = new OneTopLineResizableBorder(2);
+ }
+ // Set OneLineResizableBorder as border
getPrimaryShape().setBorder(defaultBorder);
+ // If a length or a length ratio is defined in notation or CSS
+ ((OneTopLineResizableBorder) defaultBorder).setLength(NotationUtils.getIntValue(view, LENGTH, DEFAULT_LENGTH_VALUE));
+ ((OneTopLineResizableBorder) defaultBorder).setLengthRatio(new Float(NotationUtils.getStringValue(view, LINE_LENGTH_RATIO, LINE_LENGTH_RATIO_DEFAULT_VALUE)));
+ ((OneTopLineResizableBorder) defaultBorder).setLinePosition(getlinePosition());
+
+ // If it's the first one, set border to null.
+ final List<View> allVisibleCompartments = getAllVisibleCompartments(view, getHost().getParent());
+ // If the view is the first compartment set border to null
+ if (allVisibleCompartments.size() > 0 && allVisibleCompartments.get(0).equals(view)) {
+ getPrimaryShape().setBorder(null);
+ }
+ } else {
+ if (defaultBorder != null) {
+ getPrimaryShape().setBorder(defaultBorder);
+ }
}
- defaultBorder = null;
+ }
+ }
+
+ public int getlinePosition() {
+ // get the value of the CSS property
+ View view = getNotationView();
+
+ String linePosition = NotationUtils.getStringValue(view, LINE_POSITION, LINE_POSITION_DEFAULT_VALUE).toLowerCase();
- // TODO: This edit policy should be installed on all compartments. We shouldn't need to refresh them from here
- // for(Object currentEditPart : getHost().getChildren()) {
- // if(currentEditPart instanceof ResizableCompartmentEditPart) {
- // ((ResizableCompartmentEditPart)currentEditPart).getFigure().setBorder(new OneLineBorder());
- // }
- // }
- //
+ int position = PositionConstants.CENTER;
+ if ("left".equals(linePosition)) {
+ position = PositionConstants.LEFT;
}
+ if ("right".equals(linePosition)) {
+ position = PositionConstants.RIGHT;
+ }
+ if ("center".equals(linePosition)) {
+ position = PositionConstants.CENTER;
+ }
+
+ return position;
}
+ /**
+ * Returns all the displayed compartments for the EditPart.
+ *
+ * @param view
+ * the view
+ * @param editpart
+ * an editpart
+ * @return all the displayed compartments for the EditPart
+ */
+ public static List<View> getAllVisibleCompartments(View view, EditPart editpart) {
+ List<View> visibleCompartments = new ArrayList<View>();
+ if (editpart == null)
+ return visibleCompartments;
+ List<?> localChildren = editpart.getChildren();
+ for (Object current : localChildren) {
+ if (current instanceof CompartmentEditPart) {
+ // If the height is > to 0 (for name compartment which is hide by set the height to 0)
+ BooleanValueStyle displayNameStyle = (BooleanValueStyle) view.getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), NameDisplayEditPolicy.DISPLAY_NAME);
+ final boolean isNameDiplayed = displayNameStyle != null ? displayNameStyle.isBooleanValue() : true;
+
+ // if it's the name compartment and it is diplayed
+ if (current instanceof ITextAwareEditPart) {
+ if (isNameDiplayed) {
+ visibleCompartments.add(((View) ((CompartmentEditPart) current).getModel()));
+ }
+ } else {
+ visibleCompartments.add(((View) ((CompartmentEditPart) current).getModel()));
+ }
+ }
+ }
+ return visibleCompartments;
+ }
+ /**
+ * Find display border style.
+ *
+ * @param view
+ * the view
+ * @return the boolean value style
+ */
private BooleanValueStyle findDisplayBorderStyle(View view) {
View parentView = view;
while (parentView.getElement() == view.getElement()) {
@@ -205,5 +317,4 @@ public class BorderDisplayEditPolicy extends GraphicalEditPolicyEx implements IC
return null;
}
-
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/ExternalLabelPrimaryDragRoleEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/ExternalLabelPrimaryDragRoleEditPolicy.java
new file mode 100644
index 00000000000..0adf2444c6f
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/ExternalLabelPrimaryDragRoleEditPolicy.java
@@ -0,0 +1,199 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Move to common
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.common.editpolicies;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Polyline;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableLabelEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+
+/**
+ * This policy provides the selection handles, feedback and move command for
+ * external node label.
+ * The expected behavior is to provide an external label that can freely move and with a link feedback
+ * towards its parent figure during the move.
+ */
+public class ExternalLabelPrimaryDragRoleEditPolicy extends NonResizableLabelEditPolicy {
+
+ private Polyline tether = null;
+
+ /**
+ * Creates the selection handles.
+ *
+ * @return the list
+ * @see org.eclipse.gef.editpolicies.NonResizableEditPolicy#createSelectionHandles()
+ */
+ @Override
+ protected List<MoveHandle> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+
+ /**
+ * Gets the move command.
+ *
+ * @param request
+ * the request
+ * @return the move command
+ * @see org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableLabelEditPolicy#getMoveCommand(org.eclipse.gef.requests.ChangeBoundsRequest)
+ */
+ @Override
+ protected Command getMoveCommand(ChangeBoundsRequest request) {
+ LabelEditPart editPart = (LabelEditPart) getHost();
+ // FeedBack - Port + Delta
+ Rectangle updatedRect = new Rectangle();
+ PrecisionRectangle initialRect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
+ updatedRect = initialRect.getTranslated(getHostFigure().getParent().getBounds().getLocation().getNegated());
+
+ // take into account the zoom
+ double zoomLevel = DiagramEditPartsUtil.getDiagramZoomLevel(editPart);
+ updatedRect = updatedRect.getTranslated(request.getMoveDelta().scale(1 / zoomLevel));
+
+ // translate according to the text alignments
+ if (editPart instanceof PapyrusLabelEditPart) {
+ switch (((PapyrusLabelEditPart) editPart).getTextAlignment()) {
+ case PositionConstants.LEFT:
+ break;
+ case PositionConstants.CENTER:
+ updatedRect.translate(getHostFigure().getBounds().width / 2, 0);
+ break;
+ case PositionConstants.RIGHT:
+ updatedRect.translate(getHostFigure().getBounds().width, 0);
+ break;
+ default:
+ break;
+ }
+ }
+
+ ICommand moveCommand = new SetBoundsCommand(editPart.getEditingDomain(), DiagramUIMessages.MoveLabelCommand_Label_Location, new EObjectAdapter((View) editPart.getModel()), updatedRect);
+ return new ICommandProxy(moveCommand);
+ }
+
+ /**
+ * Shows or updates feedback for a change bounds request.
+ *
+ * @param request
+ * the request
+ */
+ @Override
+ protected void showChangeBoundsFeedback(ChangeBoundsRequest request) {
+
+ IBorderItemEditPart borderItemEP = (IBorderItemEditPart) getHost();
+ IBorderItemLocator borderItemLocator = borderItemEP.getBorderItemLocator();
+
+ if (borderItemLocator != null) {
+ IFigure feedback = getDragSourceFeedbackFigure();
+ PrecisionRectangle rect = new PrecisionRectangle(getInitialFeedbackBounds().getCopy());
+ getHostFigure().translateToAbsolute(rect);
+ rect.translate(request.getMoveDelta());
+ rect.resize(request.getSizeDelta());
+ getHostFigure().translateToRelative(rect);
+ Rectangle realLocation = borderItemLocator.getValidLocation(rect.getCopy(), borderItemEP.getFigure());
+ getHostFigure().translateToAbsolute(realLocation);
+ feedback.translateToRelative(realLocation);
+ feedback.setBounds(realLocation);
+ }
+
+ drawTether(request);
+ }
+
+ protected IFigure createDragSourceFeedbackFigure() {
+ IFigure feedback = super.createDragSourceFeedbackFigure();
+ tether = new Polyline();
+ tether.setLineStyle(Graphics.LINE_DASH);
+ tether.setForegroundColor(((IGraphicalEditPart) getHost()).getFigure()
+ .getForegroundColor());
+ addFeedback(tether);
+ return feedback;
+ }
+
+ /**
+ * @param request
+ */
+ private void drawTether(ChangeBoundsRequest request) {
+ IFigure p = getDragSourceFeedbackFigure();
+ Point refPoint = ((LabelEditPart) getHost()).getReferencePoint();
+
+ Rectangle centerMain = null;
+ if (((IGraphicalEditPart) getHost().getParent()).getFigure() instanceof Connection) {
+ centerMain = new Rectangle(refPoint.x, refPoint.y, 0, 0);
+ getHostFigure().translateToAbsolute(centerMain);
+ p.translateToRelative(centerMain);
+ } else {
+ centerMain = ((IGraphicalEditPart) getHost().getParent()).getFigure().getBounds().getCopy();
+ getHostFigure().translateToAbsolute(centerMain);
+ centerMain.translate(centerMain.width / 2, centerMain.height / 2);
+ p.translateToRelative(centerMain);
+ }
+
+ PrecisionRectangle ref = new PrecisionRectangle(centerMain);
+ Rectangle r = p.getBounds();
+ Point midTop = new Point(r.x + r.width / 2, r.y);
+ Point midBottom = new Point(r.x + r.width / 2, r.y + r.height);
+ Point midLeft = new Point(r.x, r.y + r.height / 2);
+ Point midRight = new Point(r.x + r.width, r.y + r.height / 2);
+
+ Point startPoint = midTop;
+
+ int x = r.x + r.width / 2 - refPoint.x;
+ int y = r.y + r.height / 2 - refPoint.y;
+
+ if (y > 0 && y > x && y > -x)
+ startPoint = midTop;
+ else if (y < 0 && y < x && y < -x)
+ startPoint = midBottom;
+ else if (x < 0 && y > x && y < -x)
+ startPoint = midRight;
+ else
+ startPoint = midLeft;
+
+ tether.setStart(startPoint);
+ tether.setEnd(ref.getLocation());
+ }
+
+ protected void eraseChangeBoundsFeedback(ChangeBoundsRequest request) {
+ super.eraseChangeBoundsFeedback(request);
+ if (tether != null)
+ removeFeedback(tether);
+ tether = null;
+ }
+
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/GetChildLayoutEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/GetChildLayoutEditPolicy.java
new file mode 100644
index 00000000000..0509bf27748
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/GetChildLayoutEditPolicy.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.gmfdiag.common.editpolicies;
+
+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;
+
+/**
+ * This edit policy replaces the GMF generated edit policy for External Label.
+ * In particular it installs {@link ExternalLabelPrimaryDragRoleEditPolicy} on
+ * children that are external label.
+ */
+public class GetChildLayoutEditPolicy extends LayoutEditPolicy {
+
+ /**
+ * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#createChildEditPolicy(org.eclipse.gef.EditPart)
+ *
+ * @param child
+ * @return
+ */
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ // View childView = (View)child.getModel();
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if(result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#getMoveChildrenCommand(org.eclipse.gef.Request)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#getCreateCommand(org.eclipse.gef.requests.CreateRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/RefreshTextAlignmentEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/RefreshTextAlignmentEditPolicy.java
index 52e2be18b8b..d4692227a36 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/RefreshTextAlignmentEditPolicy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/RefreshTextAlignmentEditPolicy.java
@@ -98,16 +98,6 @@ public class RefreshTextAlignmentEditPolicy extends GraphicalEditPolicyEx implem
}
- // Save new location only on change
- // final Point offset = newOffset;
- // ChangeBoundsRequest req = new ChangeBoundsRequest(RequestConstants.REQ_MOVE);
- // req.setEditParts(editPart);
- // req.setLocation(offset);
- // Command command = editPart.getCommand(req);
- // if (command != null && command.canExecute() && !cachedIsConstrained) {
- // TransactionUtil.getEditingDomain(view).getCommandStack().execute(GEFtoEMFCommandWrapper.wrap(command));
- // }
-
getHost().refresh();
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/OneTopLineResizableBorder.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/OneTopLineResizableBorder.java
new file mode 100644
index 00000000000..459f865a96d
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/OneTopLineResizableBorder.java
@@ -0,0 +1,206 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.figure;
+
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.OneLineBorder;
+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SlidableRoundedRectangleAnchor;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.FigureUtils;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * The Class OneLineResizableBorder. A border set on the top which can be resize and positioned.
+ */
+public class OneTopLineResizableBorder extends OneLineBorder {
+
+ /** The forced length. */
+ private int forcedLength = -1;
+
+ /** The length ratio. */
+ private float lengthRatio = (float) 1.0;
+
+ /** The line position. */
+ private int linePosition = PositionConstants.CENTER;
+
+ /**
+ * Sets the line position.
+ *
+ * @param linePosition
+ * the linePosition to set
+ */
+ public void setLinePosition(int linePosition) {
+ this.linePosition = linePosition;
+ }
+
+ /**
+ * Sets the length ratio.
+ *
+ * @param lengthRatio
+ * the lengthRatio to set
+ */
+ public void setLengthRatio(float lengthRatio) {
+ this.lengthRatio = lengthRatio;
+ }
+
+ /**
+ * Constructor.
+ *
+ */
+ public OneTopLineResizableBorder() {
+ super();
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param color
+ * the color
+ */
+ public OneTopLineResizableBorder(Color color) {
+ super(color);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param width
+ * the width
+ */
+ public OneTopLineResizableBorder(int width) {
+ super(width, PositionConstants.TOP);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param length
+ * the length
+ * @param width
+ * the width
+ */
+ public OneTopLineResizableBorder(int length, int width) {
+ super(width, PositionConstants.TOP);
+ this.forcedLength = length;
+ }
+
+ /**
+ * Paints the oneTopBorder based on the inputs given.
+ *
+ * @param figure
+ * <code>IFigure</code> for which this is the border.
+ * @param graphics
+ * <code>Graphics</code> handle for drawing the border.
+ * @param insets
+ * Space to be taken up by this border.
+ */
+ @Override
+ public void paint(IFigure figure, Graphics graphics, Insets insets) {
+ tempRect.setBounds(getPaintRectangle(figure, insets));
+
+ // get the length of the line according to the corner
+ int length = getLineLength(figure);
+ tempRect.x += (tempRect.width - length - 2) / 2;
+ tempRect.width = (int) (length - 1);
+
+
+ // if the length is forced or a ratio is applied
+ if (forcedLength != -1) {
+ tempRect.width = forcedLength;
+ }
+ tempRect.width = (int) (tempRect.width * lengthRatio);
+
+
+ // Position the line
+ switch (linePosition) {
+ case PositionConstants.CENTER:
+ tempRect.x += (length - tempRect.width) / 2;
+ break;
+ case PositionConstants.LEFT:
+ break;
+ case PositionConstants.RIGHT:
+ tempRect.x += (length - tempRect.width);
+ break;
+ default:
+ tempRect.x += (length - tempRect.width) / 2;
+ break;
+ }
+
+ int one = MapModeUtil.getMapMode(figure).DPtoLP(1);
+ int widthInDP = getWidth() / one;
+
+ int halfWidthInLP = MapModeUtil.getMapMode(figure).DPtoLP(widthInDP / 2);
+
+ graphics.setLineWidth(getWidth());
+ graphics.setLineStyle(getStyle());
+
+ if (getColor() != null) {
+ graphics.setForegroundColor(getColor());
+ }
+ tempRect.y += halfWidthInLP;
+ tempRect.height -= getWidth();
+ graphics.drawLine(tempRect.getTopLeft(), tempRect.getTopRight());
+ }
+
+ /**
+ * Gets the line length.
+ *
+ * @param figure
+ * the figure
+ * @return the line length
+ */
+ private int getLineLength(IFigure figure) {
+ int length = tempRect.width;
+ // // if the length is forced
+ // if (forcedLength != -1) {
+ // length = forcedLength;
+ // } else {
+ SVGNodePlateFigure mainFigure = FigureUtils.findParentFigureInstance(figure, SVGNodePlateFigure.class);
+ // Get the connection anchor
+ ConnectionAnchor connectionAnchor = ((SVGNodePlateFigure) mainFigure).getConnectionAnchor("");
+ if (connectionAnchor instanceof SlidableRoundedRectangleAnchor && !(mainFigure.getBounds().equals(new Rectangle()))) {
+ // Calculate the length off the border thanks the SlidableRoundedRectangleAnchor
+ Rectangle rect = figure.getBounds().getCopy();
+ figure.translateToAbsolute(rect);
+
+ Point locationLeft = ((SlidableRoundedRectangleAnchor) connectionAnchor).getLocation(rect.getTopLeft().translate(rect.width / 2, 0), rect.getTopLeft());
+ Point locationRight = ((SlidableRoundedRectangleAnchor) connectionAnchor).getLocation(rect.getTopLeft().translate(rect.width / 2, 0), rect.getTopRight());
+
+ if (locationLeft != null && locationRight != null) {
+ rect.width = locationRight.x - locationLeft.x;
+ // translate the length according to the zoom
+ figure.translateToRelative(rect);
+ length = rect.width;
+ }
+ }
+ // }
+ return (int) (length);
+ }
+
+ /**
+ * Sets the length.
+ *
+ * @param length
+ * the new length
+ */
+ public void setLength(int length) {
+ this.forcedLength = length;
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/BorderedScalableImageFigure.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/BorderedScalableImageFigure.java
index 5a355603743..4a3f5585307 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/BorderedScalableImageFigure.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/BorderedScalableImageFigure.java
@@ -1,36 +1,195 @@
-/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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.infra.gmfdiag.common.figure.node;
-
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.gmf.runtime.draw2d.ui.render.RenderedImage;
-import org.eclipse.gmf.runtime.draw2d.ui.render.figures.ScalableImageFigure;
-
-/**
- * Scalable Image figure that will be aligned in the middle/center and keep its own ratio.
- *
- * It is also used to serve as specific implementation in Papyrus, as debug items can be easily added.
- */
-public class BorderedScalableImageFigure extends ScalableImageFigure {
-
- public BorderedScalableImageFigure(RenderedImage renderedImage, boolean useDefaultImageSize, boolean useOriginalColors, boolean antiAlias) {
- super(renderedImage, useDefaultImageSize, useOriginalColors, antiAlias);
- // setBorder(new LineBorder(ColorConstants.red, 2));
- setAlignment(PositionConstants.CENTER | PositionConstants.MIDDLE);
- setMaintainAspectRatio(true);
- // setBackgroundColor(ColorConstants.green);
- // setForegroundColor(ColorConstants.red);
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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
+ * Mickaël ADAM (ALL4TEC) - mickael.adam@all4tec.net - implementation of layout BorderedLayoutManager to provide maintain ratio and color set
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.figure.node;
+
+import org.eclipse.draw2d.AbstractLayout;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.ScrollPane;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PrecisionDimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.draw2d.ui.render.RenderedImage;
+import org.eclipse.gmf.runtime.draw2d.ui.render.figures.ScalableImageFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.FigureUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.svg.SVGAnimatedLength;
+import org.w3c.dom.svg.SVGLength;
+import org.w3c.dom.svg.SVGSVGElement;
+
+/**
+ * Scalable Image figure that will be aligned in the middle/center and keep its own ratio.
+ *
+ * It is also used to serve as specific implementation in Papyrus, as debug items can be easily added.
+ */
+public class BorderedScalableImageFigure extends ScalableImageFigure {
+
+ public BorderedScalableImageFigure(RenderedImage renderedImage, boolean useDefaultImageSize, boolean useOriginalColors, boolean antiAlias) {
+ super(renderedImage, useDefaultImageSize, useOriginalColors, antiAlias);
+
+ // setBorder(new LineBorder(ColorConstants.red, 1));
+
+ // set a layout manager to override maintain ratio behavior
+ setLayoutManager(new BorderedLayoutManager());
+ }
+
+ @Override
+ protected void paintFigure(Graphics graphics) {
+ // Get the parent bounds
+ Rectangle parentBounds = getParent().getBounds().getCopy();
+
+ // IRoundedRectangleFigure parentFigure = FigureUtils.findParentFigureInstance(this, IRoundedRectangleFigure.class);
+ // if (parentFigure != null) {
+ // // IRoundedRectangleFigure parentFigure = (IRoundedRectangleFigure) getParent();
+ // // manual management of use UseOriginalColors to permit to change
+ // if (!parentFigure.getUseOriginalColors()) {
+ // Set the color from the color of the parent
+ setBackgroundColor(getParent().getBackgroundColor());
+ setForegroundColor(getParent().getForegroundColor());
+ // } else {
+ // // Set the color to the original color
+ // setBackgroundColor(ColorConstants.yellow);
+ // setForegroundColor(ColorConstants.red);
+ // }
+ // }
+
+ // set the clip of the graphics to the parent clip
+ graphics.setClip(parentBounds);
+ super.paintFigure(graphics);
+ }
+
+ class BorderedLayoutManager extends AbstractLayout {
+
+ /**
+ * @see org.eclipse.draw2d.LayoutManager#layout(org.eclipse.draw2d.IFigure)
+ *
+ * @param container
+ */
+ @Override
+ public void layout(IFigure container) {
+
+ // if there is aspect ratio and only one figure is set
+ if (isMaintainAspectRatio() && container.getParent().getChildren().size() == 1) {
+ // If the ration is maintained
+ ScalableCompartmentFigure scalableCompartmentFigure = FigureUtils.findParentFigureInstance(container, ScalableCompartmentFigure.class);
+
+ // Get the svg document to calculate ratio
+ ScalableImageFigure scalableImage = FigureUtils.findChildFigureInstance(getParent(), ScalableImageFigure.class);
+ org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.SVGImage img = ((org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.SVGImage) scalableImage.getRenderedImage());
+ final PrecisionDimension svgDimension = getSvgDimension(img.getDocument());
+
+ Rectangle scalableCompartmentBounds = scalableCompartmentFigure != null ? scalableCompartmentBounds = scalableCompartmentFigure.getBounds() : container.getBounds();
+
+ // double scale = scalableCompartmentBounds.preciseWidth() / scalableCompartmentBounds.preciseHeight();
+ double ratio = svgDimension.preciseWidth() / svgDimension.preciseHeight();
+
+ Point center = new Point(scalableCompartmentBounds.x + scalableCompartmentBounds.width / 2, scalableCompartmentBounds.y + scalableCompartmentBounds.height / 2);
+
+ int width = 0;
+ int height = 0;
+ int y = 0;
+ int x = 0;
+
+ // Case width>height
+ if (scalableCompartmentBounds.width > scalableCompartmentBounds.height) {
+ if (scalableCompartmentBounds.width > scalableCompartmentBounds.height * ratio) {
+ width = (int) (scalableCompartmentBounds.height * ratio);
+ height = scalableCompartmentBounds.height;
+ } else {
+ width = scalableCompartmentBounds.width;
+ height = (int) (scalableCompartmentBounds.width / ratio);
+ }
+
+ } else {// Case height>width
+ if (scalableCompartmentBounds.height < scalableCompartmentBounds.width / ratio) {
+ width = (int) (scalableCompartmentBounds.height * ratio);
+ height = scalableCompartmentBounds.height;
+ } else {
+ width = scalableCompartmentBounds.width;
+ height = (int) (scalableCompartmentBounds.width / ratio);
+ }
+ }
+ y = center.y - height / 2;
+ x = center.x - width / 2;
+ container.setBounds(new Rectangle(x, y, width, height));
+ }
+ // Look for a ScrollBarPane to hide ScrollPane
+ IFigure parentFigure = container;
+ while (!(parentFigure instanceof ScrollPane) && parentFigure.getParent() != null) {
+ parentFigure = parentFigure.getParent();
+ }
+ // Hide the ScrollBar if a ScrollPan is found
+ if (parentFigure instanceof ScrollPane) {
+ ((ScrollPane) parentFigure).setScrollBarVisibility(org.eclipse.draw2d.ScrollPane.NEVER);
+ }
+
+ }
+
+ /**
+ * Transforms the given SVG animated length to a base value, assuming the units in the SVG are pixels
+ *
+ * @param length
+ * The SVG length
+ * @return The base value as a double
+ */
+ private double getValueOf(SVGAnimatedLength length) {
+ if (length == null) {
+ return 0;
+ }
+ SVGLength base = length.getBaseVal();
+ if (base == null) {
+ return 0;
+ }
+ return base.getValue();
+ }
+
+ /**
+ * Gets the dimension of the SVG document, assuming the units in the SVG are pixels
+ *
+ * @param document
+ * The SVG document
+ * @return The equivalent Draw2D dimension
+ */
+ private PrecisionDimension getSvgDimension(Document document) {
+ double svgWidth = 0;
+ double svgHeight = 0;
+ if (document.getDocumentElement() instanceof SVGSVGElement) {
+ SVGSVGElement svgElement = (SVGSVGElement) document.getDocumentElement();
+ if (svgElement != null) {
+ svgWidth = getValueOf(svgElement.getWidth());
+ svgHeight = getValueOf(svgElement.getHeight());
+ }
+ }
+ return new PrecisionDimension(svgWidth, svgHeight);
+ }
+
+ /**
+ * @see org.eclipse.draw2d.AbstractLayout#calculatePreferredSize(org.eclipse.draw2d.IFigure, int, int)
+ *
+ * @param container
+ * @param wHint
+ * @param hHint
+ * @return
+ */
+ @Override
+ protected Dimension calculatePreferredSize(IFigure container, int wHint, int hHint) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/IRoundedRectangleFigure.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/IRoundedRectangleFigure.java
new file mode 100644
index 00000000000..5760c7b2a5a
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/IRoundedRectangleFigure.java
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.figure.node;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+/**
+ * An interface for figures which have a rounded rectangle shape and need to
+ * provide a connection anchor and a floating Name.
+ *
+ */
+public interface IRoundedRectangleFigure extends IFigure {
+
+ /**
+ * Returns the rounded rectangles corner dimensions.
+ *
+ * @return the corner dimensions
+ */
+ Dimension getCornerDimensions();
+
+ /**
+ * Sets the rounded rectangles corner dimensions.
+ *
+ * @param CornerDimension
+ * the new corner dimensions
+ */
+ void setCornerDimensions(Dimension CornerDimension);
+
+ /**
+ * Returns the rounded rectangles bounds.
+ *
+ * @return the bounds
+ */
+ Rectangle getRoundedRectangleBounds();
+
+ /**
+ * Sets if the shape must be oval.
+ *
+ * @param isOval
+ * the new oval
+ */
+ void setOval(boolean isOval);
+
+ /**
+ * Returns true if the shape is forced to be oval.
+ *
+ * @return isOval
+ */
+ boolean isOval();
+
+ /**
+ * Sets true if the floating name must be constrained.
+ *
+ * @param isConstrained
+ * the new floating name constrained
+ */
+ void setFloatingNameConstrained(boolean isConstrained);
+
+ /**
+ * Returns true if the floating name is constrained.
+ *
+ * @return isAttached
+ */
+ boolean isFloatingNameConstrained();
+
+ /**
+ * Sets the floating Name offset for not constrained case.
+ *
+ * @param offset
+ * the new floating name offset
+ */
+ void setFloatingNameOffset(Dimension offset);
+
+
+ /**
+ * Returns the offset of the floating Name offset for not constrained case.
+ *
+ * @return the offset
+ */
+ Dimension getFloatingNameOffset();
+
+ /**
+ * Sets the border style.
+ *
+ * @param borderStyle
+ * the new border style
+ */
+ public void setBorderStyle(int borderStyle);
+
+ /** Set custom dash values */
+ public void setCustomDash(int[] dash);
+
+ /**
+ * Sets the checks for header.
+ *
+ * @param hasHeader
+ * the new checks for header
+ */
+ public void setHasHeader(boolean hasHeader);
+
+ /**
+ * Checks for header.
+ *
+ * @return true, if successful
+ */
+ public boolean hasHeader();
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RectangularShadowBorder.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RectangularShadowBorder.java
new file mode 100644
index 00000000000..100625b9212
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RectangularShadowBorder.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * Copyright (c) 2008 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.figure.node;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.LineBorder;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * Provide shadow border on Rectangular figure
+ *
+ * @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
+ */
+public class RectangularShadowBorder extends LineBorder {
+
+ int borderwidth;
+
+ public RectangularShadowBorder(int borderwidth, Color color) {
+ super(color);
+ this.borderwidth = borderwidth;
+ setWidth(1);
+ }
+
+ /**
+ * Method for determining the inset the border will take up on the shape.
+ *
+ * @param figure
+ * Figure that will be inset from the border
+ * @return Insets the Insets for the border on the given figure.
+ */
+ @Override
+ public Insets getInsets(IFigure figure) {
+ Insets insetsNew = super.getInsets(figure);
+ insetsNew.top = 0;
+ insetsNew.left = 0;
+ insetsNew.bottom = MapModeUtil.getMapMode(figure).DPtoLP(insetsNew.bottom + borderwidth);
+ insetsNew.right = MapModeUtil.getMapMode(figure).DPtoLP(insetsNew.right + borderwidth);
+ return insetsNew;
+ }
+
+ /**
+ * @see org.eclipse.draw2d.Border#paint(IFigure, Graphics, Insets)
+ */
+ @Override
+ public void paint(IFigure figure, Graphics graphics, Insets insets) {
+ graphics.pushState();
+ // draw the normal line border
+ tempRect.setBounds(getPaintRectangle(figure, insets));
+
+ if(getWidth() % 2 == 1) {
+ tempRect.width--;
+ tempRect.height--;
+ }
+
+ tempRect.shrink(getWidth() / 2, getWidth() / 2);
+ graphics.setLineWidth(getWidth());
+ if(getColor() != null)
+ graphics.setForegroundColor(getColor());
+ graphics.drawRectangle(tempRect);
+
+ // draw the shadow
+ // first expand the clip rectangle
+ Rectangle newRect = new Rectangle(tempRect);
+ newRect.width = newRect.width + borderwidth;
+ newRect.height = newRect.height + borderwidth;
+ graphics.setClip(newRect);
+ // paint the shadow
+ PointList plt = new PointList();
+ plt.addPoint(tempRect.x + tempRect.width, tempRect.y + borderwidth);
+ plt.addPoint(tempRect.x + tempRect.width, tempRect.y + tempRect.height);
+ plt.addPoint(tempRect.x + borderwidth, tempRect.y + tempRect.height);
+ plt.addPoint(tempRect.x + borderwidth, tempRect.y + tempRect.height + borderwidth);
+ plt.addPoint(tempRect.x + tempRect.width + borderwidth, tempRect.y + tempRect.height + borderwidth);
+ plt.addPoint(tempRect.x + tempRect.width + borderwidth, tempRect.y + borderwidth);
+ plt.addPoint(tempRect.x + tempRect.width, tempRect.y + borderwidth);
+ if(getColor() != null) {
+ graphics.setBackgroundColor(getColor());
+ } else {
+ graphics.setBackgroundColor(ColorConstants.black);
+ }
+ graphics.fillPolygon(plt);
+ graphics.popState();
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleNodePlateFigure.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleNodePlateFigure.java
new file mode 100644
index 00000000000..0e5e614cccb
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleNodePlateFigure.java
@@ -0,0 +1,260 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.figure.node;
+
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+
+/**
+ * this figure is used to display at the good position anchor on a
+ * Rounded Rectangle Figure.
+ */
+public class RoundedRectangleNodePlateFigure extends DefaultSizeNodeFigure implements IRoundedRectangleFigure, ICustomNodePlate {
+
+ /** The svg node plate figure. */
+ protected SVGNodePlateFigure svgNodePlateFigure = null;
+
+ // @unused
+ /**
+ * Instantiates a new rounded rectangle node plate figure.
+ *
+ * @param defSize
+ * the def size
+ */
+ public RoundedRectangleNodePlateFigure(Dimension defSize) {
+ super(defSize);
+ }
+
+ /**
+ * Instantiates a new rounded rectangle node plate figure.
+ *
+ * @param width
+ * the width
+ * @param height
+ * the height
+ */
+ public RoundedRectangleNodePlateFigure(int width, int height) {
+ super(width, height);
+ }
+
+ /**
+ * Gets the Rounded Compartment figure, it's a child of RoundedCompartmentNodePlateFigure.
+ *
+ * @return the RoundedCompartment figure
+ */
+ public IRoundedRectangleFigure getRoundedCompartmentFigure() {
+ if (getChildren().size() > 0 && getChildren().get(0) instanceof IRoundedRectangleFigure) {
+ return (IRoundedRectangleFigure) getChildren().get(0);
+ }
+ if (svgNodePlateFigure != null && svgNodePlateFigure.getChildren().size() > 0 && svgNodePlateFigure.getChildren().get(0) instanceof IRoundedRectangleFigure) {
+ return (IRoundedRectangleFigure) svgNodePlateFigure.getChildren().get(0);
+ }
+ return null;
+ }
+
+ /**
+ * Gets the corner dimensions.
+ *
+ * @return the corner dimensions
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#getCornerDimensions()
+ */
+ @Override
+ public Dimension getCornerDimensions() {
+ return getRoundedCompartmentFigure().getCornerDimensions();
+ }
+
+ /**
+ * Gets the rounded rectangle bounds.
+ *
+ * @return the rounded rectangle bounds
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#getRoundedRectangleBounds()
+ */
+ @Override
+ public Rectangle getRoundedRectangleBounds() {
+ return getRoundedCompartmentFigure().getBounds();
+ }
+
+ /**
+ * Sets the SVG node plate container.
+ *
+ * @param svgNodePlateFigure
+ * the new SVG node plate container
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.ICustomNodePlate#setSVGNodePlateContainer(org.eclipse.papyrus.uml.diagram.common.figure.node.SVGNodePlateFigure)
+ */
+ @Override
+ public void setSVGNodePlateContainer(SVGNodePlateFigure svgNodePlateFigure) {
+ this.svgNodePlateFigure = svgNodePlateFigure;
+ }
+
+ /**
+ * Gets the svg node plate container.
+ *
+ * @return the svg node plate container
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.ICustomNodePlate#getSvgNodePlateContainer()
+ */
+ @Override
+ public SVGNodePlateFigure getSvgNodePlateContainer() {
+ return this.svgNodePlateFigure;
+ }
+
+ /**
+ * Creates a slidable anchor at the specified point (from the ratio of the
+ * reference's coordinates and bounds of the figure.
+ *
+ * @param p
+ * - relative reference for the <Code>SlidableAnchor</Code>
+ * @return a <code>SlidableAnchor</code> for this figure with relative reference at p
+ */
+ @Override
+ protected ConnectionAnchor createAnchor(PrecisionPoint p) {
+ if (p == null)
+ // If the old terminal for the connection anchor cannot be resolved (by SlidableAnchor) a null
+ // PrecisionPoint will passed in - this is handled here
+ return createDefaultAnchor();
+ return new SlidableRoundedRectangleAnchor(this, p);
+ }
+
+ /**
+ * Creates the default Slidable anchor with a reference point at the center
+ * of the figure's bounds.
+ *
+ * @return - default SlidableAnchor, relative reference the center of the figure
+ */
+ @Override
+ protected ConnectionAnchor createDefaultAnchor() {
+ return new SlidableRoundedRectangleAnchor(this);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#setCornerDimensions(org.eclipse.draw2d.geometry.Dimension)
+ *
+ * @param dimension
+ */
+ @Override
+ // unused
+ public void setCornerDimensions(Dimension dimension) {
+ getRoundedCompartmentFigure().setCornerDimensions(dimension);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#setOval(boolean)
+ *
+ * @param booleanValue
+ */
+ @Override
+ // unused
+ public void setOval(boolean booleanValue) {
+ getRoundedCompartmentFigure().setOval(booleanValue);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#isOval()
+ *
+ * @return
+ */
+ @Override
+ // unused
+ public boolean isOval() {
+ return getRoundedCompartmentFigure().isOval();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#setFloatingNameConstrained(boolean)
+ *
+ * @param booleanValue
+ */
+ @Override
+ // unused
+ public void setFloatingNameConstrained(boolean booleanValue) {
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#isFloatingNameConstrained()
+ *
+ * @return
+ */
+ @Override
+ // unused
+ public boolean isFloatingNameConstrained() {
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#setFloatingNameOffset(org.eclipse.draw2d.geometry.Dimension)
+ *
+ * @param offset
+ */
+ @Override
+ // unused
+ public void setFloatingNameOffset(Dimension offset) {
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#getFloatingNameOffset()
+ *
+ * @return
+ */
+ @Override
+ // unused
+ public Dimension getFloatingNameOffset() {
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#setBorderStyle(int)
+ *
+ * @param borderStyle
+ */
+ @Override
+ // unused
+ public void setBorderStyle(int borderStyle) {
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#setCustomDash(int[])
+ *
+ * @param dash
+ */
+ @Override
+ // unused
+ public void setCustomDash(int[] dash) {
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#setHasHeader(boolean)
+ *
+ * @param hasHeader
+ */
+ @Override
+ public void setHasHeader(boolean hasHeader) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#hasHeader()
+ *
+ * @return
+ */
+ @Override
+ public boolean hasHeader() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleShadowBorder.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleShadowBorder.java
new file mode 100644
index 00000000000..8d50ff6531f
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/RoundedRectangleShadowBorder.java
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.figure.node;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * Rounded shadow border, extends RectangularShadowBorder otherwise problem in
+ * hierarchy of figures Works with borderwidth of 3.
+ */
+public class RoundedRectangleShadowBorder extends RectangularShadowBorder {
+
+ /** The borderwidth. */
+ int borderwidth;
+
+ /** The corner dimension. */
+ Dimension cornerDimension;
+
+ /**
+ * Instantiates a new rounded rectangle shadow border.
+ *
+ * @param color
+ * the color
+ * @param cornerDimension
+ * the corner dimension
+ */
+ public RoundedRectangleShadowBorder(Color color, Dimension cornerDimension) {
+ super(3, color);
+ this.borderwidth = 3;
+ this.cornerDimension = cornerDimension;
+ setWidth(1);
+ }
+
+ /**
+ * Method for determining the inset the border will take up on the shape.
+ *
+ * @param figure
+ * Figure that will be inset from the border
+ * @return Insets the Insets for the border on the given figure.
+ */
+ @Override
+ public Insets getInsets(IFigure figure) {
+ Insets insetsNew = super.getInsets(figure);
+ insetsNew.top = 0;
+ insetsNew.left = 0;
+ insetsNew.bottom = MapModeUtil.getMapMode(figure).DPtoLP(insetsNew.bottom + borderwidth);
+ insetsNew.right = MapModeUtil.getMapMode(figure).DPtoLP(insetsNew.right + borderwidth);
+ return insetsNew;
+ }
+
+ /**
+ * Paint the figure on the graphics.
+ *
+ * @param figure
+ * the figure
+ * @param graphics
+ * the graphics
+ * @param insets
+ * the insets
+ * @see org.eclipse.draw2d.Border#paint(IFigure, Graphics, Insets)
+ */
+ @Override
+ public void paint(IFigure figure, Graphics graphics, Insets insets) {
+ graphics.pushState();
+
+ // draw the normal line border
+ tempRect.setBounds(getPaintRectangle(figure, insets));
+ // Take into account the line width
+ tempRect.x += getWidth() / 2;
+ tempRect.y += getWidth() / 2;
+ tempRect.width -= getWidth();
+ tempRect.height -= getWidth();
+ // Set the arc dimension from the corner dimension of the figure
+ if (figure instanceof IRoundedRectangleFigure) {
+ cornerDimension.width = ((IRoundedRectangleFigure) figure).getCornerDimensions().width;
+ cornerDimension.height = ((IRoundedRectangleFigure) figure).getCornerDimensions().height;
+ }
+ graphics.setLineWidth(getWidth());
+ // Set the color of the shadow
+ if (getColor() != null) {
+ graphics.setBackgroundColor(getColor());
+ } else {
+ graphics.setBackgroundColor(ColorConstants.black);
+ }
+ graphics.setLineStyle(getStyle());
+ graphics.drawRoundRectangle(tempRect, cornerDimension.width, cornerDimension.height);
+ graphics.setLineStyle(Graphics.LINE_SOLID);
+ // draw the shadow
+ // first expand the clip rectangle
+ Rectangle newRect = new Rectangle(tempRect);
+ newRect.width = newRect.width + borderwidth;
+ newRect.height = newRect.height + borderwidth;
+ newRect.x += borderwidth;
+ newRect.y += borderwidth;
+ graphics.setClip(newRect);
+ if (cornerDimension.width != 0 || cornerDimension.height != 0) {
+ // Adapt arc width
+ if (cornerDimension.width > tempRect.width)
+ cornerDimension.width = tempRect.width;
+ // Adapt arc height
+ if (cornerDimension.height > tempRect.height)
+ cornerDimension.height = tempRect.height;
+ // Right Top corner
+ graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y, cornerDimension.width - 1, cornerDimension.height, -5, 45); // -5,70);
+ graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y, cornerDimension.width - 2, cornerDimension.height, -5, 45); // -5,70);
+ graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y, cornerDimension.width - 3, cornerDimension.height, -5, 45); // -5,70);
+ // Left Bottom corner
+ graphics.drawArc(tempRect.x, tempRect.y + borderwidth + tempRect.height - cornerDimension.height, cornerDimension.width, cornerDimension.height - 1, 210, 65); // 210, 65);
+ graphics.drawArc(tempRect.x, tempRect.y + borderwidth + tempRect.height - cornerDimension.height, cornerDimension.width, cornerDimension.height - 2, 210, 65); // 210, 65);
+ graphics.drawArc(tempRect.x, tempRect.y + borderwidth + tempRect.height - cornerDimension.height, cornerDimension.width, cornerDimension.height - 3, 210, 65); // 210, 65);
+ // Right bottom corner
+ int tmpWidth = getWidth();
+ graphics.setLineWidthFloat((float) (borderwidth - 0.5));
+ // graphics.drawArc(tempRect.x + tempRect.width - arc.width + borderwidth, tempRect.y + borderwidth + tempRect.height - arc.height, arc.width - 1, arc.height - 1, 270, 90);
+ graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y + borderwidth + tempRect.height - cornerDimension.height + getWidth() / 2, cornerDimension.width - 2 + getWidth() / 2, cornerDimension.height - 2, 270,
+ 95);
+ graphics.setLineWidth(tmpWidth);
+ graphics.drawArc(tempRect.x + tempRect.width - cornerDimension.width + borderwidth, tempRect.y + borderwidth + tempRect.height - cornerDimension.height + getWidth() / 2, cornerDimension.width - 3 + getWidth() / 2, cornerDimension.height - 3, 270,
+ 95);
+ // Right rectangle shadow
+ if ((tempRect.height - cornerDimension.height) > 0)
+ graphics.fillRectangle(tempRect.x + tempRect.width + getWidth() / 2, tempRect.y + cornerDimension.height / 2, borderwidth, tempRect.height - cornerDimension.height + borderwidth);
+ // Bottom rectangle shadow
+ if ((tempRect.width - cornerDimension.width) > 0)
+ graphics.fillRectangle(tempRect.x + cornerDimension.width / 2, tempRect.y + tempRect.height + getWidth() / 2, tempRect.width - cornerDimension.width + borderwidth, borderwidth);
+ } else {
+ // If there is no rounded corner
+ PointList plt = new PointList();
+ plt.addPoint(tempRect.x + tempRect.width, tempRect.y + borderwidth);
+ plt.addPoint(tempRect.x + tempRect.width, tempRect.y + tempRect.height);
+ plt.addPoint(tempRect.x + borderwidth, tempRect.y + tempRect.height);
+ plt.addPoint(tempRect.x + borderwidth, tempRect.y + tempRect.height + borderwidth);
+ plt.addPoint(tempRect.x + tempRect.width + borderwidth, tempRect.y + tempRect.height + borderwidth);
+ plt.addPoint(tempRect.x + tempRect.width + borderwidth, tempRect.y + borderwidth);
+ plt.addPoint(tempRect.x + tempRect.width, tempRect.y + borderwidth);
+ graphics.fillPolygon(plt);
+ }
+ graphics.popState();
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java
index 420f256f6eb..d44afe8393b 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java
@@ -1,409 +1,475 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Refactoring, cleanup, added support for PapyrusLabel element
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common.figure.node;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.batik.dom.svg.AbstractSVGPathSegList.SVGPathSegMovetoLinetoItem;
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.draw2d.geometry.PrecisionDimension;
-import org.eclipse.draw2d.geometry.PrecisionPoint;
-import org.eclipse.draw2d.geometry.PrecisionRectangle;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.IOvalAnchorableFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.SlidableEllipseAnchor;
-import org.w3c.dom.Element;
-import org.w3c.dom.svg.SVGAnimatedLength;
-import org.w3c.dom.svg.SVGDocument;
-import org.w3c.dom.svg.SVGLength;
-import org.w3c.dom.svg.SVGPathElement;
-import org.w3c.dom.svg.SVGPathSeg;
-import org.w3c.dom.svg.SVGPathSegList;
-import org.w3c.dom.svg.SVGRectElement;
-import org.w3c.dom.svg.SVGSVGElement;
-
-/**
- * This figure is used to make links following SVG shape
- */
-public class SVGNodePlateFigure extends DefaultSizeNodeFigure {
-
- /**
- * Represents a transformation from SVG to Draw2D coordinates.
- * This class replaces the Draw2D Transform class which can only operate over Draw2D points.
- * This class always defines a transformation that is composed of a scaling operation followed by a translation operation.
- *
- * @author Laurent Wouters
- */
- private static class SvgToDraw2DTransform {
-
- private double scaleX;
-
- private double scaleY;
-
- private double translationX;
-
- private double translationY;
-
- /**
- * Initializes this transformation
- *
- * @param scaleX
- * Scale on the X axis
- * @param scaleY
- * Scale on the Y axis
- * @param translationX
- * Translation on the X axis
- * @param translationY
- * Translation on the Y axis
- */
- public SvgToDraw2DTransform(double scaleX, double scaleY, double translationX, double translationY) {
- this.scaleX = scaleX;
- this.scaleY = scaleY;
- this.translationX = translationX;
- this.translationY = translationY;
- }
-
- /**
- * Transforms the given points in the target frame of reference
- *
- * @param point
- * The point to transform
- * @return The transformed point in the target frame of reference
- */
- public PrecisionPoint transform(PrecisionPoint point) {
- return new PrecisionPoint(point.preciseX() * scaleX + translationX, point.preciseY() * scaleY + translationY);
- }
-
- /**
- * Transforms the given rectangle in the target frame of reference
- *
- * @param rectangle
- * The rectangle to transform
- * @return The transformed rectangle in the target frame of reference
- */
- public PrecisionRectangle transform(PrecisionRectangle rectangle) {
- return new PrecisionRectangle(rectangle.preciseX() * scaleX + translationX, rectangle.preciseY() * scaleY + translationY, rectangle.preciseWidth() * scaleX, rectangle.preciseHeight() * scaleY);
- }
- }
-
- protected SVGDocument svgDocument = null;
-
- private PrecisionDimension svgDimension = null;
-
- private List<PrecisionPoint> outlinePoints = null;
-
- private PrecisionDimension outlineDimension = null;
-
- private PrecisionRectangle labelBounds = null;
-
- protected DefaultSizeNodeFigure defaultNodePlate;
-
-
- /**
- * Initializes the figure.
- *
- * @param width
- * The figure's original width
- * @param height
- * The figure's original height
- */
- public SVGNodePlateFigure(int width, int height) {
- super(width, height);
- }
-
-
- /**
- * Associates the given SVG document to this figure
- *
- * @param svgDocument
- * the SVG document
- */
- public void setSVGDocument(SVGDocument svgDocument) {
- this.svgDocument = svgDocument;
- if (svgDocument != null) {
- this.svgDimension = getSvgDimension(svgDocument);
- Element element = svgDocument.getElementById("PapyrusPath");
- if (element != null) {
- outlinePoints = toDraw2DPoints(((SVGPathElement) element).getPathSegList());
- outlineDimension = getDimensionOf(outlinePoints);
- }
- element = svgDocument.getElementById("PapyrusLabel");
- if (element != null) {
- labelBounds = toDraw2DRectangle((SVGRectElement) element);
- }
- } else {
- this.svgDimension = null;
- this.outlinePoints = null;
- this.outlineDimension = null;
- this.labelBounds = null;
- }
- }
-
- /**
- * Transforms the given SVG animated length to a base value, assuming the units in the SVG are pixels
- *
- * @param length
- * The SVG length
- * @return The base value as a double
- */
- private double getValueOf(SVGAnimatedLength length) {
- if (length == null) {
- return 0;
- }
- SVGLength base = length.getBaseVal();
- if (base == null) {
- return 0;
- }
- return base.getValue();
- }
-
- /**
- * Gets the dimension of the SVG document, assuming the units in the SVG are pixels
- *
- * @param svgDocument
- * The SVG document
- * @return The equivalent Draw2D dimension
- */
- private PrecisionDimension getSvgDimension(SVGDocument svgDocument) {
- double svgWidth = 0;
- double svgHeight = 0;
- SVGSVGElement svgElement = svgDocument.getRootElement();
- if (svgElement != null) {
- svgWidth = getValueOf(svgElement.getWidth());
- svgHeight = getValueOf(svgElement.getHeight());
- }
- return new PrecisionDimension(svgWidth, svgHeight);
- }
-
- /**
- * Transforms the given SVG path to a list of Draw2D precision points, assuming the units in the SVG are pixels
- *
- * @param segments
- * The SVG path as a list of segments
- * @return The list of the corresponding Draw2D points
- */
- private List<PrecisionPoint> toDraw2DPoints(SVGPathSegList segments) {
- ArrayList<PrecisionPoint> pointList = new ArrayList<PrecisionPoint>();
-
- // current coordinates
- double currentX = 0;
- double currentY = 0;
- for (int i = 0; i < segments.getNumberOfItems(); i++) {
- SVGPathSeg seg = segments.getItem(i);
- if (seg instanceof SVGPathSegMovetoLinetoItem) {
- SVGPathSegMovetoLinetoItem linetoItem = (SVGPathSegMovetoLinetoItem) seg;
- String letter = linetoItem.getPathSegTypeAsLetter();
- double x = linetoItem.getX();
- double y = linetoItem.getY();
- if (letter.equals("M")) {
- currentX = x;
- currentY = y;
- pointList.add(new PrecisionPoint(currentX, currentY));
- } else if (letter.equals("m")) {
- currentX = currentX + x;
- currentY = currentY + y;
- pointList.add(new PrecisionPoint(currentX, currentY));
- } else if (letter.equals("L")) {
- currentX = x;
- currentY = y;
- pointList.add(new PrecisionPoint(currentX, currentY));
- } else if (letter.equals("l")) {
- currentX = currentX + x;
- currentY = currentY + y;
- pointList.add(new PrecisionPoint(currentX, currentY));
- }
- } else {
- System.err.println("Unsupported SVG segment in PapyrusPath at index " + i + " in SVG document");
- }
- }
-
- return pointList;
- }
-
- /**
- * Gets the dimension of the given collection of points
- *
- * @param points
- * A list of points
- * @return The dimension of the points
- */
- private PrecisionDimension getDimensionOf(Collection<PrecisionPoint> points) {
- double maxWidth = 0;
- double maxHeight = 0;
- for (PrecisionPoint point : points) {
- maxWidth = Math.max(maxWidth, point.preciseX());
- maxHeight = Math.max(maxHeight, point.preciseY());
- }
- return new PrecisionDimension(maxWidth, maxHeight);
- }
-
- /**
- * Transforms the given SVG rectangle to a Draw2D rectangle, assuming the units in the SVG are pixels
- *
- * @param element
- * The SVG rectangle
- * @return The equivalent Draw2D rectangle
- */
- private PrecisionRectangle toDraw2DRectangle(SVGRectElement element) {
- return new PrecisionRectangle(
- getValueOf(element.getX()),
- getValueOf(element.getY()),
- getValueOf(element.getWidth()),
- getValueOf(element.getHeight()));
- }
-
-
-
- /**
- * Sets the node plate that is wrapped by it.
- *
- * @param defaultNodePlate
- */
- public void setDefaultNodePlate(IFigure defaultNodePlate) {
- if (defaultNodePlate instanceof DefaultSizeNodeFigure) {
- this.defaultNodePlate = (DefaultSizeNodeFigure) defaultNodePlate;
- this.setDefaultSize(((DefaultSizeNodeFigure) defaultNodePlate).getDefaultSize());
- }
- if (defaultNodePlate instanceof ICustomNodePlate) {
- ((ICustomNodePlate) this.defaultNodePlate).setSVGNodePlateContainer(this);
- }
- }
-
- /**
- * Gets the transformation from SVG to Draw2D positions
- *
- * @param innerWidth
- * Maximum width of the elements to transform
- * @param innerHeight
- * Maximum height of the elements to transform
- * @param anchor
- * The Draw2D rectangle anchoring the SVG figure
- * @return The transformation
- */
- private SvgToDraw2DTransform getTransform(double innerWidth, double innerHeight, Rectangle anchor) {
- PrecisionDimension maxDim = new PrecisionDimension(Math.max(svgDimension.preciseWidth(), innerWidth), Math.max(svgDimension.preciseHeight(), innerHeight));
- return new SvgToDraw2DTransform(
- anchor.width / maxDim.preciseWidth(),
- anchor.height / maxDim.preciseHeight(),
- anchor.x,
- anchor.y);
- }
-
- /**
- * Gets the current Draw2D anchor for the SVG figure
- *
- * @return The Draw2D anchor as a Rectangle
- */
- private Rectangle getDraw2DAnchor() {
- if (this.getChildren().size() > 0 && this.getChildren().get(0) instanceof IFigure) {
- IFigure primaryShape = (IFigure) this.getChildren().get(0);
- for (Object subFigure : primaryShape.getChildren()) {
- if (subFigure instanceof ScalableCompartmentFigure) {
- return ((IFigure) subFigure).getBounds();
- }
- }
- }
- return getHandleBounds();
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#createAnchor(org.eclipse.draw2d.geometry.PrecisionPoint)
- */
- @Override
- protected ConnectionAnchor createAnchor(PrecisionPoint p) {
- if (this.outlinePoints == null) {
- if (defaultNodePlate instanceof IOvalAnchorableFigure) {
- defaultNodePlate.setBounds(this.getBounds());
- if (p != null) {
- // If the old terminal for the connection anchor cannot be resolved (by SlidableAnchor) a null
- // PrecisionPoint will passed in - this is handled here
- return new SlidableEllipseAnchor(this, p);
- }
- }
- return super.createAnchor(p);
- }
-
- return super.createAnchor(p);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#createDefaultAnchor()
- */
- @Override
- protected ConnectionAnchor createDefaultAnchor() {
- if (this.outlinePoints == null) {
- if (defaultNodePlate instanceof IOvalAnchorableFigure) {
- defaultNodePlate.setBounds(this.getBounds());
- return new SlidableEllipseAnchor(this);
- }
- }
- return super.createDefaultAnchor();
- }
-
-
- /**
- * @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#getPolygonPoints()
- */
- @Override
- public PointList getPolygonPoints() {
- if (this.outlinePoints == null) {
- if (defaultNodePlate != null) {
- defaultNodePlate.setBounds(this.getBounds());
- return defaultNodePlate.getPolygonPoints();
- }
- return super.getPolygonPoints();
- }
-
- SvgToDraw2DTransform transform = getTransform(outlineDimension.preciseWidth(), outlineDimension.preciseHeight(), getDraw2DAnchor());
- PointList points = new PointList(5);
- for (PrecisionPoint point : outlinePoints) {
- points.addPoint(transform.transform(point));
- }
- return points;
- }
-
- /**
- * Determines whether this figure defines the bounds of a possible label
- *
- * @return <code>true</code> if this figures defines the bounds of the label
- */
- public boolean hasLabelBounds() {
- return (labelBounds != null);
- }
-
- /**
- * Gets the bounds of the label, if they are defined
- *
- * @param anchor
- * The Draw2D rectangle anchoring the SVG figure
- * @return The label's bounds, or <code>null</code> if they are not defined
- */
- public Rectangle getLabelBounds(Rectangle anchor) {
- if (labelBounds == null) {
- return null;
- }
- SvgToDraw2DTransform transform = getTransform(labelBounds.preciseRight(), labelBounds.preciseBottom(), anchor);
- return transform.transform(labelBounds);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Refactoring, cleanup, added support for PapyrusLabel element
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Add IRoundedRectangleFigure use case(436547)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.figure.node;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.batik.dom.svg.AbstractSVGPathSegList.SVGPathSegMovetoLinetoItem;
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.PrecisionDimension;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.IOvalAnchorableFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.render.figures.ScalableImageFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.SlidableEllipseAnchor;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.FigureUtils;
+import org.w3c.dom.Element;
+import org.w3c.dom.svg.SVGAnimatedLength;
+import org.w3c.dom.svg.SVGDocument;
+import org.w3c.dom.svg.SVGLength;
+import org.w3c.dom.svg.SVGPathElement;
+import org.w3c.dom.svg.SVGPathSeg;
+import org.w3c.dom.svg.SVGPathSegList;
+import org.w3c.dom.svg.SVGRectElement;
+import org.w3c.dom.svg.SVGSVGElement;
+
+/**
+ * This figure is used to make links following SVG shape
+ */
+public class SVGNodePlateFigure extends DefaultSizeNodeFigure {
+
+ /**
+ * Represents a transformation from SVG to Draw2D coordinates.
+ * This class replaces the Draw2D Transform class which can only operate over Draw2D points.
+ * This class always defines a transformation that is composed of a scaling operation followed by a translation operation.
+ *
+ * @author Laurent Wouters
+ */
+ private static class SvgToDraw2DTransform {
+
+ private double scaleX;
+
+ private double scaleY;
+
+ private double translationX;
+
+ private double translationY;
+
+ /**
+ * Initializes this transformation
+ *
+ * @param scaleX
+ * Scale on the X axis
+ * @param scaleY
+ * Scale on the Y axis
+ * @param translationX
+ * Translation on the X axis
+ * @param translationY
+ * Translation on the Y axis
+ */
+ public SvgToDraw2DTransform(double scaleX, double scaleY, double translationX, double translationY) {
+ this.scaleX = scaleX;
+ this.scaleY = scaleY;
+ this.translationX = translationX;
+ this.translationY = translationY;
+ }
+
+ /**
+ * Transforms the given points in the target frame of reference
+ *
+ * @param point
+ * The point to transform
+ * @return The transformed point in the target frame of reference
+ */
+ public PrecisionPoint transform(PrecisionPoint point) {
+ return new PrecisionPoint(point.preciseX() * scaleX + translationX, point.preciseY() * scaleY + translationY);
+ }
+
+ /**
+ * Transforms the given rectangle in the target frame of reference
+ *
+ * @param rectangle
+ * The rectangle to transform
+ * @return The transformed rectangle in the target frame of reference
+ */
+ public PrecisionRectangle transform(PrecisionRectangle rectangle) {
+ return new PrecisionRectangle(rectangle.preciseX() * scaleX + translationX, rectangle.preciseY() * scaleY + translationY, rectangle.preciseWidth() * scaleX, rectangle.preciseHeight() * scaleY);
+ }
+ }
+
+ protected SVGDocument svgDocument = null;
+
+ private PrecisionDimension svgDimension = null;
+
+ private List<PrecisionPoint> outlinePoints = null;
+
+ private PrecisionDimension outlineDimension = null;
+
+ private PrecisionRectangle labelBounds = null;
+
+ protected DefaultSizeNodeFigure defaultNodePlate;
+
+
+ /**
+ * Initializes the figure.
+ *
+ * @param width
+ * The figure's original width
+ * @param height
+ * The figure's original height
+ */
+ public SVGNodePlateFigure(int width, int height) {
+ super(width, height);
+ }
+
+
+ /**
+ * Associates the given SVG document to this figure
+ *
+ * @param svgDocument
+ * the SVG document
+ */
+ public void setSVGDocument(SVGDocument svgDocument) {
+ this.svgDocument = svgDocument;
+ if (svgDocument != null) {
+ this.svgDimension = getSvgDimension(svgDocument);
+ Element element = svgDocument.getElementById("PapyrusPath");
+ if (element != null) {
+ outlinePoints = toDraw2DPoints(((SVGPathElement) element).getPathSegList());
+ outlineDimension = getDimensionOf(outlinePoints);
+ }
+ element = svgDocument.getElementById("PapyrusLabel");
+ if (element != null) {
+ labelBounds = toDraw2DRectangle((SVGRectElement) element);
+ }
+ } else {
+ this.svgDimension = null;
+ this.outlinePoints = null;
+ this.outlineDimension = null;
+ this.labelBounds = null;
+ }
+ }
+
+ /**
+ * Transforms the given SVG animated length to a base value, assuming the units in the SVG are pixels
+ *
+ * @param length
+ * The SVG length
+ * @return The base value as a double
+ */
+ private double getValueOf(SVGAnimatedLength length) {
+ if (length == null) {
+ return 0;
+ }
+ SVGLength base = length.getBaseVal();
+ if (base == null) {
+ return 0;
+ }
+ return base.getValue();
+ }
+
+ /**
+ * Gets the dimension of the SVG document, assuming the units in the SVG are pixels
+ *
+ * @param svgDocument
+ * The SVG document
+ * @return The equivalent Draw2D dimension
+ */
+ private PrecisionDimension getSvgDimension(SVGDocument svgDocument) {
+ double svgWidth = 0;
+ double svgHeight = 0;
+ SVGSVGElement svgElement = svgDocument.getRootElement();
+ if (svgElement != null) {
+ svgWidth = getValueOf(svgElement.getWidth());
+ svgHeight = getValueOf(svgElement.getHeight());
+ }
+ return new PrecisionDimension(svgWidth, svgHeight);
+ }
+
+ /**
+ * Transforms the given SVG path to a list of Draw2D precision points, assuming the units in the SVG are pixels
+ *
+ * @param segments
+ * The SVG path as a list of segments
+ * @return The list of the corresponding Draw2D points
+ */
+ private List<PrecisionPoint> toDraw2DPoints(SVGPathSegList segments) {
+ ArrayList<PrecisionPoint> pointList = new ArrayList<PrecisionPoint>();
+
+ // current coordinates
+ double currentX = 0;
+ double currentY = 0;
+ PrecisionPoint firstPoint = new PrecisionPoint();
+ Boolean firstPointAbsolue = true;
+ for (int i = 0; i < segments.getNumberOfItems(); i++) {
+ SVGPathSeg seg = segments.getItem(i);
+ if (seg instanceof SVGPathSegMovetoLinetoItem) {
+ SVGPathSegMovetoLinetoItem linetoItem = (SVGPathSegMovetoLinetoItem) seg;
+ String letter = linetoItem.getPathSegTypeAsLetter();
+ double x = linetoItem.getX();
+ double y = linetoItem.getY();
+ if (letter.equals("M")) {
+ currentX = x;
+ currentY = y;
+ firstPoint.setPreciseLocation(currentX, currentY);
+ firstPointAbsolue = true;
+ pointList.add(new PrecisionPoint(currentX, currentY));
+ } else if (letter.equals("m")) {
+ currentX = currentX + x;
+ currentY = currentY + y;
+ firstPoint.setPreciseLocation(currentX, currentY);
+ firstPointAbsolue = false;
+ pointList.add(new PrecisionPoint(currentX, currentY));
+ } else if (letter.equals("L")) {
+ currentX = x;
+ currentY = y;
+ pointList.add(new PrecisionPoint(currentX, currentY));
+ } else if (letter.equals("l")) {
+ currentX = currentX + x;
+ currentY = currentY + y;
+ pointList.add(new PrecisionPoint(currentX, currentY));
+ }
+ } else if (seg instanceof SVGPathSeg) {
+ // Take into account the z letter
+ String letter = seg.getPathSegTypeAsLetter();
+ if (letter.equals("z")) {
+ if (firstPointAbsolue) {
+ pointList.add(firstPoint);
+ } else {
+ currentX = currentX + firstPoint.preciseX();
+ currentY = currentY + firstPoint.preciseY();
+ pointList.add(new PrecisionPoint(currentX, currentY));
+ }
+ }
+ } else {
+ System.err.println("Unsupported SVG segment in PapyrusPath at index " + i + " in SVG document");
+ }
+ }
+
+ return pointList;
+ }
+
+ /**
+ * Gets the dimension of the given collection of points
+ *
+ * @param points
+ * A list of points
+ * @return The dimension of the points
+ */
+ private PrecisionDimension getDimensionOf(Collection<PrecisionPoint> points) {
+ double maxWidth = 0;
+ double maxHeight = 0;
+ for (PrecisionPoint point : points) {
+ maxWidth = Math.max(maxWidth, point.preciseX());
+ maxHeight = Math.max(maxHeight, point.preciseY());
+ }
+ return new PrecisionDimension(maxWidth, maxHeight);
+ }
+
+ /**
+ * Transforms the given SVG rectangle to a Draw2D rectangle, assuming the units in the SVG are pixels
+ *
+ * @param element
+ * The SVG rectangle
+ * @return The equivalent Draw2D rectangle
+ */
+ private PrecisionRectangle toDraw2DRectangle(SVGRectElement element) {
+ return new PrecisionRectangle(getValueOf(element.getX()), getValueOf(element.getY()), getValueOf(element.getWidth()), getValueOf(element.getHeight()));
+ }
+
+
+
+ /**
+ * Sets the node plate that is wrapped by it.
+ *
+ * @param defaultNodePlate
+ */
+ public void setDefaultNodePlate(IFigure defaultNodePlate) {
+ if (defaultNodePlate instanceof DefaultSizeNodeFigure) {
+ this.defaultNodePlate = (DefaultSizeNodeFigure) defaultNodePlate;
+ this.setDefaultSize(((DefaultSizeNodeFigure) defaultNodePlate).getDefaultSize());
+ }
+ if (defaultNodePlate instanceof ICustomNodePlate) {
+ ((ICustomNodePlate) this.defaultNodePlate).setSVGNodePlateContainer(this);
+ }
+ }
+
+ /**
+ * Gets the transformation from SVG to Draw2D positions
+ *
+ * @param innerWidth
+ * Maximum width of the elements to transform
+ * @param innerHeight
+ * Maximum height of the elements to transform
+ * @param anchor
+ * The Draw2D rectangle anchoring the SVG figure
+ * @return The transformation
+ */
+ private SvgToDraw2DTransform getTransform(double innerWidth, double innerHeight, Rectangle anchor) {
+ PrecisionDimension maxDim = new PrecisionDimension(Math.max(svgDimension.preciseWidth(), innerWidth), Math.max(svgDimension.preciseHeight(), innerHeight));
+
+ // Look for the ScalableImage to know if the ration is maintain
+ boolean isRatioMaintained = false;
+ ScalableImageFigure scalableImage = FigureUtils.findChildFigureInstance(getParent(), ScalableImageFigure.class);
+ if (scalableImage != null) {
+ isRatioMaintained = scalableImage.isMaintainAspectRatio();
+ }
+ if (isRatioMaintained) {
+ // Calculate Transform if we want to keep the ratio of the Figure.
+ double ratio = svgDimension.preciseWidth() / svgDimension.preciseHeight();
+ // double ratio = scalableImage.getBounds().preciseWidth() / scalableImage.getBounds().preciseHeight();
+ double scaleX = 0;
+ double scaleY = 0;
+ double tranlationX = anchor.x;
+ double tranlationY = anchor.y;
+
+ if (anchor.height < anchor.width) {
+ if (anchor.height * ratio < anchor.width) {
+ scaleX = (anchor.height / maxDim.preciseHeight());
+ scaleY = (anchor.height / maxDim.preciseHeight());
+ tranlationX = anchor.x + (anchor.preciseWidth() / 2 - (anchor.preciseHeight() * ratio) / 2);
+ } else {
+ scaleX = (anchor.width / maxDim.preciseWidth());
+ scaleY = (anchor.width / maxDim.preciseWidth());
+ tranlationY = anchor.y + (anchor.preciseHeight() / 2 - (anchor.preciseWidth() / ratio) / 2);
+ }
+ } else {
+ if (anchor.height > anchor.width / ratio) {
+ scaleX = (anchor.width / maxDim.preciseWidth());
+ scaleY = (anchor.width / maxDim.preciseWidth());
+ tranlationY = anchor.y + (anchor.preciseHeight() / 2 - (anchor.preciseWidth() / ratio) / 2);
+ } else {
+ scaleX = (anchor.height / maxDim.preciseHeight());
+ scaleY = (anchor.height / maxDim.preciseHeight());
+ tranlationX = anchor.x + (anchor.preciseWidth() / 2 - (anchor.preciseHeight() * ratio) / 2);
+ }
+ }
+
+ return new SvgToDraw2DTransform(scaleX, scaleY, tranlationX, tranlationY);
+ } else {
+ return new SvgToDraw2DTransform(anchor.width / maxDim.preciseWidth(), anchor.height / maxDim.preciseHeight(), anchor.x, anchor.y);
+ }
+ }
+
+ /**
+ * Gets the current Draw2D anchor for the SVG figure
+ *
+ * @return The Draw2D anchor as a Rectangle
+ */
+ private Rectangle getDraw2DAnchor() {
+ if (this.getChildren().size() > 0 && this.getChildren().get(0) instanceof IFigure) {
+ IFigure primaryShape = (IFigure) this.getChildren().get(0);
+ for (Object subFigure : primaryShape.getChildren()) {
+ if (subFigure instanceof ScalableCompartmentFigure) {
+ return ((IFigure) subFigure).getBounds();
+ }
+ }
+ }
+ return getHandleBounds();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#createAnchor(org.eclipse.draw2d.geometry.PrecisionPoint)
+ */
+ @Override
+ protected ConnectionAnchor createAnchor(PrecisionPoint p) {
+ if (this.outlinePoints == null) {
+ if (defaultNodePlate instanceof IOvalAnchorableFigure) {
+ defaultNodePlate.setBounds(this.getBounds());
+ if (p != null) {
+ // If the old terminal for the connection anchor cannot be resolved (by SlidableAnchor) a null
+ // PrecisionPoint will passed in - this is handled here
+ return new SlidableEllipseAnchor(this, p);
+ }
+ }
+ if (defaultNodePlate instanceof IRoundedRectangleFigure) {
+ defaultNodePlate.setBounds(this.getBounds());
+ if (p != null) {
+ // If the old terminal for the connection anchor cannot be resolved (by SlidableAnchor) a null
+ // PrecisionPoint will passed in - this is handled here
+ return new SlidableRoundedRectangleAnchor(this, p);
+ }
+ }
+ return super.createAnchor(p);
+ }
+
+ return super.createAnchor(p);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#createDefaultAnchor()
+ */
+ @Override
+ protected ConnectionAnchor createDefaultAnchor() {
+ if (this.outlinePoints == null) {
+ if (defaultNodePlate instanceof IOvalAnchorableFigure) {
+ defaultNodePlate.setBounds(this.getBounds());
+ return new SlidableEllipseAnchor(this);
+ }
+ if (defaultNodePlate instanceof IRoundedRectangleFigure) {
+ defaultNodePlate.setBounds(this.getBounds());
+ return new SlidableRoundedRectangleAnchor(this);
+ }
+ }
+ return super.createDefaultAnchor();
+ }
+
+
+ /**
+ * @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#getPolygonPoints()
+ */
+ @Override
+ public PointList getPolygonPoints() {
+ if (this.outlinePoints == null) {
+ if (defaultNodePlate != null) {
+ defaultNodePlate.setBounds(this.getBounds());
+ return defaultNodePlate.getPolygonPoints();
+ }
+ return super.getPolygonPoints();
+ }
+
+ SvgToDraw2DTransform transform = getTransform(outlineDimension.preciseWidth(), outlineDimension.preciseHeight(), getDraw2DAnchor());
+ PointList points = new PointList(5);
+ for (PrecisionPoint point : outlinePoints) {
+ points.addPoint(transform.transform(point));
+ }
+ return points;
+ }
+
+ /**
+ * Determines whether this figure defines the bounds of a possible label
+ *
+ * @return <code>true</code> if this figures defines the bounds of the label
+ */
+ public boolean hasLabelBounds() {
+ return (labelBounds != null);
+ }
+
+ /**
+ * Gets the bounds of the label, if they are defined
+ *
+ * @param anchor
+ * The Draw2D rectangle anchoring the SVG figure
+ * @return The label's bounds, or <code>null</code> if they are not defined
+ */
+ public Rectangle getLabelBounds(Rectangle anchor) {
+ if (labelBounds == null) {
+ return null;
+ }
+ SvgToDraw2DTransform transform = getTransform(labelBounds.preciseRight(), labelBounds.preciseBottom(), anchor);
+ return transform.transform(labelBounds);
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SlidableRoundedRectangleAnchor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SlidableRoundedRectangleAnchor.java
new file mode 100644
index 00000000000..69a2e154d16
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SlidableRoundedRectangleAnchor.java
@@ -0,0 +1,221 @@
+/*
+ * KIELER - Kiel Integrated Environment for Layout Eclipse RichClient
+ *
+ * http://www.informatik.uni-kiel.de/rtsys/kieler/
+ *
+ * Copyright 2010 by
+ * + Christian-Albrechts-University of Kiel
+ * + Department of Computer Science
+ * + Real-Time and Embedded Systems Group
+ *
+ * This code is provided under the terms of the Eclipse Public License (EPL).
+ * See the file epl-v10.html for the license text.
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.figure.node;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.PrecisionPoint;
+import org.eclipse.draw2d.geometry.PrecisionRectangle;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.draw2d.ui.geometry.LineSeg;
+import org.eclipse.gmf.runtime.gef.ui.figures.SlidableAnchor;
+
+/**
+ * A slideable anchor for rounded rectangle figures.
+ *
+ * @author mri
+ * @author Mickael ADAM - ALL4TEC - mickael.adam@all4tec.net - Integration and adaptation for Papyrus API
+ */
+public class SlidableRoundedRectangleAnchor extends SlidableAnchor {
+ /** the offset applied to the size of the rectangle*/
+ private Dimension offset = new Dimension();
+
+ /**
+ * Constructs a SlidableRoundedRectangleAnchor without a desired anchor
+ * point.
+ *
+ * @param figure
+ * the anchorable figure
+ */
+ public SlidableRoundedRectangleAnchor(final IFigure figure) {
+ super(figure);
+ }
+
+ /**
+ * Constructs a SlidableRoundedRectangleAnchor with a desired anchor
+ * point.
+ *
+ * @param figure
+ * the anchorable figure
+ * @param p
+ * the anchor precision point
+ */
+ public SlidableRoundedRectangleAnchor(final IFigure figure, final PrecisionPoint p) {
+ super(figure, p);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected Rectangle getBox() {
+ PrecisionRectangle rBox = null;
+ if ((getOwner().getChildren().get(0)) instanceof IRoundedRectangleFigure) {
+ rBox = new PrecisionRectangle(((IRoundedRectangleFigure) ((IFigure) getOwner().getChildren().get(0))).getRoundedRectangleBounds());
+ } else if ((getOwner().getChildren().get(0)) instanceof IFigure) {
+ rBox = new PrecisionRectangle(((IFigure) getOwner()).getBounds());
+ }
+ ((IFigure) getOwner().getChildren().get(0)).translateToAbsolute(rBox);
+ return rBox;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected PointList getIntersectionPoints(final Point ownReference, final Point foreignReference) {
+ Rectangle rect = getBox().expand(offset.width, offset.height);
+ Dimension dimension = null;
+ // Get the dimension of the owner figure
+ if (getOwner().getChildren().size() > 0 && getOwner().getChildren().get(0) instanceof IRoundedRectangleFigure) {
+ // Force the Refresh of the Corner Dimension in case of resize(figure.paintFigure called after)
+ ((IRoundedRectangleFigure) getOwner().getChildren().get(0)).setOval(((IRoundedRectangleFigure) getOwner().getChildren().get(0)).isOval());
+ // Get the Dimension of the figure
+ dimension = ((IRoundedRectangleFigure) getOwner().getChildren().get(0)).getCornerDimensions().getCopy();
+ } else {
+ dimension = new Dimension();
+ }
+ // Adapt dimension according to the rectangle
+ if (rect.height < dimension.height)
+ dimension.height = rect.height;
+ if (rect.width < dimension.width)
+ dimension.width = rect.width;
+ PrecisionRectangle corner = new PrecisionRectangle(new Rectangle(0, 0, dimension.width, dimension.height));
+ ((IFigure) getOwner().getChildren().get(0)).translateToAbsolute(corner);
+
+ return getLineIntersectionsWithRoundedRectangle(new LineSeg(ownReference, foreignReference), rect.x, rect.y, rect.width, rect.height, corner.width, corner.height);
+ }
+
+ /**
+ * Computes the intersections of a line segment with a rounded rectangle.
+ *
+ * @param line
+ * the line segment
+ * @param rectX
+ * the x-coordinate of the rounded rectangle
+ * @param rectY
+ * the y-coordinate of the rounded rectangle
+ * @param rectW
+ * the width of the rounded rectangle
+ * @param rectH
+ * the height of the rounded rectangle
+ * @param arcW
+ * the arc width of the rounded rectangle
+ * @param arcH
+ * the arc height of the rounded rectangle
+ * @return the intersections
+ */
+ private PointList getLineIntersectionsWithRoundedRectangle(final LineSeg line, final int rectX, final int rectY, final int rectW, final int rectH, final int arcW, final int arcH) {
+ PointList intersections = new PointList();
+ PointList rect;
+ PointList rectIntersections;
+ // intersection with top line segment
+ rect = new PointList();
+ rect.addPoint(new PrecisionPoint(rectX + arcW / 2, rectY));
+ rect.addPoint(new PrecisionPoint(rectX + rectW - arcW / 2, rectY));
+ rectIntersections = line.getLineIntersectionsWithLineSegs(rect);
+ if (rectIntersections.size() > 0) {
+ intersections.addPoint(rectIntersections.getFirstPoint());
+ }
+ // intersection with bottom line segment
+ rect = new PointList();
+ rect.addPoint(new PrecisionPoint(rectX + arcW / 2, rectY + rectH));
+ rect.addPoint(new PrecisionPoint(rectX + rectW - arcW / 2, rectY + rectH));
+ rectIntersections = line.getLineIntersectionsWithLineSegs(rect);
+ if (rectIntersections.size() > 0) {
+ intersections.addPoint(rectIntersections.getFirstPoint());
+ }
+ // intersection with left line segment
+ rect = new PointList();
+ rect.addPoint(new PrecisionPoint(rectX, rectY + arcH / 2));
+ rect.addPoint(new PrecisionPoint(rectX, rectY + rectH - arcH / 2));
+ rectIntersections = line.getLineIntersectionsWithLineSegs(rect);
+ if (rectIntersections.size() > 0) {
+ intersections.addPoint(rectIntersections.getFirstPoint());
+ }
+ // intersection with right line segment
+ rect = new PointList();
+ rect.addPoint(new PrecisionPoint(rectX + rectW, rectY + arcH / 2));
+ rect.addPoint(new PrecisionPoint(rectX + rectW, rectY + rectH - arcH / 2));
+ rectIntersections = line.getLineIntersectionsWithLineSegs(rect);
+ if (rectIntersections.size() > 0) {
+ intersections.addPoint(rectIntersections.getFirstPoint());
+ }
+ PointList ellipseIntersections;
+ // intersection with top left ellipse
+ ellipseIntersections = line.getLineIntersectionsWithEllipse(new Rectangle(rectX, rectY, arcW, arcH));
+ for (int i = 0; i < ellipseIntersections.size(); ++i) {
+ Point point = ellipseIntersections.getPoint(i);
+ if (point.x <= rectX + arcW / 2 && point.y <= rectY + arcH / 2) {
+ intersections.addPoint(point);
+ }
+ }
+ // intersection with top right ellipse
+ ellipseIntersections = line.getLineIntersectionsWithEllipse(new Rectangle(rectX + rectW - arcW, rectY, arcW, arcH));
+ for (int i = 0; i < ellipseIntersections.size(); ++i) {
+ Point point = ellipseIntersections.getPoint(i);
+ if (point.x >= rectX + rectW - arcW / 2 && point.y <= rectY + arcH / 2) {
+ intersections.addPoint(point);
+ }
+ }
+ // intersection with bottom left ellipse
+ ellipseIntersections = line.getLineIntersectionsWithEllipse(new Rectangle(rectX, rectY + rectH - arcH, arcW, arcH));
+ for (int i = 0; i < ellipseIntersections.size(); ++i) {
+ Point point = ellipseIntersections.getPoint(i);
+ if (point.x <= rectX + arcW / 2 && point.y >= rectY + rectH - arcH / 2) {
+ intersections.addPoint(point);
+ }
+ }
+ // intersection with bottom right ellipse
+ ellipseIntersections = line.getLineIntersectionsWithEllipse(new Rectangle(rectX + rectW - arcW, rectY + rectH - arcH, arcW, arcH));
+ for (int i = 0; i < ellipseIntersections.size(); ++i) {
+ Point point = ellipseIntersections.getPoint(i);
+ if (point.x >= rectX + rectW - arcW / 2 && point.y >= rectY + rectH - arcH / 2) {
+ intersections.addPoint(point);
+ }
+ }
+ // this should always be true
+ if (intersections.size() == 2) {
+ // order the list so the point that is closer to the origin comes
+ // first
+ Point point1 = intersections.getLastPoint();
+ Point point2 = intersections.getFirstPoint();
+ int deltaX1 = point1.x - line.getTerminus().x;
+ int deltaY1 = point1.y - line.getTerminus().y;
+ int deltaX2 = point2.x - line.getTerminus().x;
+ int deltaY2 = point2.y - line.getTerminus().y;
+ if (deltaX1 * deltaX1 + deltaY1 * deltaY1 < deltaX2 * deltaX2 + deltaY2 * deltaY2) {
+ intersections.removePoint(0);
+ } else {
+ intersections.removePoint(1);
+ }
+ }
+ return intersections;
+ }
+
+ // get the location on the border with a specific ownReference point
+ // Used for the PortEditPart
+ public Point getLocation(Point refParent, Point refPort) {
+ return super.getLocation(refParent, refPort);
+ }
+
+ /**
+ * @param portOffset
+ */
+ public void setOffset(Dimension portOffset) {
+ offset.height = portOffset.height;
+ offset.width = portOffset.width;
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/PapyrusRoundedEditPartHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/PapyrusRoundedEditPartHelper.java
new file mode 100644
index 00000000000..599cdf4af8f
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/PapyrusRoundedEditPartHelper.java
@@ -0,0 +1,227 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.helper;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.gef.editparts.AbstractEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.StringValueStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ShapeDisplayCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+
+/**
+ * The Class RoundedCompartmentEditPart provides refresh method to apply notation properties specific to roundedRectangleFigure
+ */
+public abstract class PapyrusRoundedEditPartHelper {
+
+ /** The Constant HAS_HEADER. */
+ public static final String HAS_HEADER = "diplayHeader";
+
+ /** The Constant USE_ORIGINAL_COLORS. */
+ private static final String USE_ORIGINAL_COLORS = "useOriginalColors";//$NON-NLS-N$
+
+ /** The Constant BORDER_STYLE. */
+ protected static final String BORDER_STYLE = "borderStyle"; //$NON-NLS-N$
+
+ /** CSS boolean property controlling whether label should be constrained. */
+ public static final String FLOATING_LABEL_CONSTRAINED = "isFloatingLabelConstrained";//$NON-NLS-N$
+
+ /** The Constant FLOATING_NAME_OFFSET_HEIGHT. */
+ public static final String FLOATING_LABEL_OFFSET_HEIGHT = "floatingLabelOffsetHeight";//$NON-NLS-N$
+
+ /** The Constant FLOATING_NAME_OFFSET_WIDTH. */
+ public static final String FLOATING_LABEL_OFFSET_WIDTH = "floatingLabelOffsetWidth";//$NON-NLS-N$
+
+ /** CSS boolean property controlling whether. */
+ public static final String IS_OVAL = "isOval";//$NON-NLS-N$
+
+ /** CSS boolean property controlling whether. */
+ public static final String RADIUS_HEIGHT = "radiusHeight";//$NON-NLS-N$
+
+ /** CSS boolean property controlling whether. */
+ public static final String RADIUS_WIDTH = "radiusWidth";//$NON-NLS-N$
+
+ private static final String LINE_CUSTOM_VALUE = "customDash";//$NON-NLS-N$
+
+ /**
+ * Refresh border style.
+ */
+ public static void refreshBorderStyle(IPapyrusEditPart editpart, int defaultBorderStyle, int[] defaultLineCustomValue) {
+ // get the Figure
+ if (editpart.getPrimaryShape() instanceof IRoundedRectangleFigure) {
+ IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) editpart.getPrimaryShape();
+
+ EClass stringValueStyle = NotationPackage.eINSTANCE.getStringValueStyle();
+
+ int borderStyle = defaultBorderStyle;
+
+ if (stringValueStyle != null) {
+
+ if (((GraphicalEditPart) editpart).getModel() instanceof View) {
+ // Get the border style on notation
+ NamedStyle borderValueStyle = ((View) ((GraphicalEditPart) editpart).getModel()).getNamedStyle(stringValueStyle, BORDER_STYLE);
+ // convert the string style name in integer
+ if (borderValueStyle instanceof StringValueStyle) {
+ String value = ((StringValueStyle) borderValueStyle).getStringValue();
+
+ if ("dash".equals(value)) {
+ borderStyle = Graphics.LINE_DASH;
+ }
+ if ("dashDot".equals(value)) {
+ borderStyle = Graphics.LINE_DASHDOT;
+ }
+ if ("dashDotDot".equals(value)) {
+ borderStyle = Graphics.LINE_DASHDOTDOT;
+ }
+ if ("dot".equals(value)) {
+ borderStyle = Graphics.LINE_DOT;
+ }
+ if ("solid".equals(value)) {
+ borderStyle = Graphics.LINE_SOLID;
+ }
+ if ("custom".equals(value)) {
+ borderStyle = Graphics.LINE_CUSTOM;
+ }
+ }
+ }
+ }
+ // set the border style of the figure
+ roundedRectangleFigure.setBorderStyle(borderStyle);
+
+ // get/set the custom dash value
+ int[] customDash = NotationUtils.getIntListValue((View) ((GraphicalEditPart) editpart).getModel(), LINE_CUSTOM_VALUE, defaultLineCustomValue);
+ roundedRectangleFigure.setCustomDash(customDash);
+
+ }
+ }
+
+ /**
+ * Refresh floating name.
+ */
+ public static void refreshFloatingName(IPapyrusEditPart editpart, boolean defaultIsFloatingNameConstrained, int defaultFloatingLabelOffsetWidth, int defaultFloatingLabelOffsetHeight) {
+ if (editpart.getPrimaryShape() instanceof IRoundedRectangleFigure) {
+ // The figure
+ IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) editpart.getPrimaryShape();
+
+ if (((GraphicalEditPart) editpart).getModel() instanceof View) {
+ // Get CSS value for the name attached properties
+ boolean isNameConstrained = NotationUtils.getBooleanValue((View) ((GraphicalEditPart) editpart).getModel(), FLOATING_LABEL_CONSTRAINED, defaultIsFloatingNameConstrained);
+
+ // get CSS the value of offset width and height
+ int width = NotationUtils.getIntValue((View) ((GraphicalEditPart) editpart).getModel(), FLOATING_LABEL_OFFSET_WIDTH, defaultFloatingLabelOffsetWidth);
+ int height = NotationUtils.getIntValue((View) ((GraphicalEditPart) editpart).getModel(), FLOATING_LABEL_OFFSET_HEIGHT, defaultFloatingLabelOffsetHeight);
+
+ // Set the name attached properties in figure
+ roundedRectangleFigure.setFloatingNameConstrained(isNameConstrained);
+
+ // Set the floating name offset
+ roundedRectangleFigure.setFloatingNameOffset(new Dimension(width, height));
+ }
+ }
+ }
+
+ /**
+ * Refresh oval.
+ */
+ public static void refreshOval(IPapyrusEditPart editpart, boolean defaultIsOvalValue) {
+ if (editpart.getPrimaryShape() instanceof IRoundedRectangleFigure) {
+ if (((GraphicalEditPart) editpart).getModel() instanceof View) {
+ // The figure
+ IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) editpart.getPrimaryShape();
+
+ // get the CSS value of isOval
+ boolean isOval = NotationUtils.getBooleanValue((View) ((GraphicalEditPart) editpart).getModel(), IS_OVAL, defaultIsOvalValue);
+
+ // Set isOval
+ roundedRectangleFigure.setOval(isOval);
+ }
+ }
+ }
+
+ /**
+ * Refresh radius.
+ */
+ public static void refreshRadius(IPapyrusEditPart editpart, int defaultCornerWidth, int defaultCornerHeight) {
+ if (editpart.getPrimaryShape() instanceof IRoundedRectangleFigure) {
+ // The figure
+ IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) editpart.getPrimaryShape();
+
+ if (((GraphicalEditPart) editpart).getModel() instanceof View) {
+ // get CSS the value of radius Width
+ int width = NotationUtils.getIntValue((View) ((GraphicalEditPart) editpart).getModel(), RADIUS_WIDTH, defaultCornerWidth);
+
+ // get CSS the value of radius Height
+ int height = NotationUtils.getIntValue((View) ((GraphicalEditPart) editpart).getModel(), RADIUS_HEIGHT, defaultCornerHeight);
+
+ // Set the corner dimension
+ roundedRectangleFigure.setCornerDimensions(new Dimension(width, height));
+ }
+ }
+ }
+
+ /**
+ * Refresh svg original colors.
+ */
+ public static void refreshSVGOriginalColors(IPapyrusEditPart editpart, boolean defaultUseOriginalColors) {
+ if (editpart.getPrimaryShape() instanceof IRoundedRectangleFigure) {
+ if (((GraphicalEditPart) editpart).getModel() instanceof View) {
+
+ // get the CSS value if SVG use original colors
+ boolean useOriginalColors = NotationUtils.getBooleanValue((View) ((AbstractEditPart) editpart).getModel(), USE_ORIGINAL_COLORS, defaultUseOriginalColors);
+
+ if (((AbstractEditPart) editpart).getChildren() != null) {
+ for (Object object : ((AbstractEditPart) editpart).getChildren()) {
+ if (object instanceof ShapeDisplayCompartmentEditPart) {
+ ShapeDisplayCompartmentEditPart shapeCompartment = (ShapeDisplayCompartmentEditPart) object;
+ // Set useOriginalColors to the figure
+ shapeCompartment.setUseOriginalColors(useOriginalColors);
+ }
+ }
+ }
+ }
+ }
+
+ }
+
+ /**
+ * Refresh has header.
+ *
+ * @param editpart
+ * the editpart
+ * @param defaultHasHeader
+ * the default has header
+ */
+ public static void refreshHasHeader(IPapyrusEditPart editpart, boolean defaultHasHeader) {
+ if (editpart.getPrimaryShape() instanceof IRoundedRectangleFigure) {
+ if (((GraphicalEditPart) editpart).getModel() instanceof View) {
+ // The figure
+ IRoundedRectangleFigure roundedRectangleFigure = (IRoundedRectangleFigure) editpart.getPrimaryShape();
+
+ // get the CSS value of hasHeader
+ boolean hasHeader = NotationUtils.getBooleanValue((View) ((GraphicalEditPart) editpart).getModel(), HAS_HEADER, defaultHasHeader);
+
+ // Set hasHeader
+ roundedRectangleFigure.setHasHeader(hasHeader);
+ }
+ }
+
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java
index 699f3575b31..3333b7bafc6 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java
@@ -13,9 +13,11 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.model;
+import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
@@ -27,6 +29,7 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.IntValueStyle;
import org.eclipse.gmf.runtime.notation.NamedStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.StringListValueStyle;
import org.eclipse.gmf.runtime.notation.StringValueStyle;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.core.resource.IModel;
@@ -254,8 +257,7 @@ public class NotationUtils {
throw new RuntimeException("Resource Set is not a ModelSet or is null"); //$NON-NLS-1$
}
}
-
-
+
/**
* @param view
* @param property
@@ -265,23 +267,21 @@ public class NotationUtils {
public static int getIntValue(View view, String property, int defaultInt) {
int value = defaultInt;
EClass intValueStyle = NotationPackage.eINSTANCE.getIntValueStyle();
- NamedStyle style ;
+ NamedStyle style;
- if (intValueStyle != null){
+ if (intValueStyle != null) {
style = view.getNamedStyle(intValueStyle, property);
- if (style != null){
- if (style instanceof IntValueStyle){
- value = ((IntValueStyle) style).getIntValue();
- }
+ if (style instanceof IntValueStyle) {
+ value = ((IntValueStyle) style).getIntValue();
}
}
return value;
}
-
-
+
+
/**
* @param view
@@ -292,23 +292,21 @@ public class NotationUtils {
public static boolean getBooleanValue(View view, String property, boolean defaultValue) {
boolean value = defaultValue;
EClass booleanValueStyle = NotationPackage.eINSTANCE.getBooleanValueStyle();
- NamedStyle style ;
+ NamedStyle style;
- if (booleanValueStyle != null){
+ if (booleanValueStyle != null) {
style = view.getNamedStyle(booleanValueStyle, property);
- if (style != null){
- if (style instanceof BooleanValueStyle){
- value = ((BooleanValueStyle) style).isBooleanValue();
- }
+ if (style instanceof BooleanValueStyle) {
+ value = ((BooleanValueStyle) style).isBooleanValue();
}
}
return value;
}
-
-
+
+
/**
* @param view
* @param property
@@ -318,21 +316,51 @@ public class NotationUtils {
public static String getStringValue(View view, String property, String defaultValue) {
String value = defaultValue;
EClass stringValueStyle = NotationPackage.eINSTANCE.getStringValueStyle();
- NamedStyle style ;
+ NamedStyle style;
- if (stringValueStyle != null){
+ if (stringValueStyle != null) {
style = view.getNamedStyle(stringValueStyle, property);
- if (style != null){
- if (style instanceof StringValueStyle){
- value = ((StringValueStyle) style).getStringValue();
- }
+ if (style instanceof StringValueStyle) {
+ value = ((StringValueStyle) style).getStringValue();
}
}
return value;
}
-
+ /**
+ * Get the list as a String list and convert it to Int list
+ *
+ * @param model
+ * @param floatingLabelOffsetWidth
+ * @param defaultCustomStyle
+ * @return
+ *
+ */
+ public static int[] getIntListValue(View view, String property, int[] defaultIntList) {
+ int[] value = defaultIntList;
+ EClass intValueStyle = NotationPackage.eINSTANCE.getStringListValueStyle();
+ NamedStyle style;
+
+ if (intValueStyle != null) {
+
+ style = view.getNamedStyle(intValueStyle, property);
+
+ if (style instanceof StringListValueStyle) {
+ // Get the string list
+ EList<String> valueList = ((StringListValueStyle) style).getStringListValue();
+ int i = 0;
+ value = new int[valueList.size()];
+ // Convert list in int array
+ for (Iterator iterator = valueList.iterator(); iterator.hasNext();) {
+ String string = (String) iterator.next();
+ value[i++] = Integer.parseInt(string);
+ }
+ }
+ }
+
+ return value;
+ }
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/shape/ShapeService.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/shape/ShapeService.java
index 7f6510aa6a8..06bb5b64f7a 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/shape/ShapeService.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/shape/ShapeService.java
@@ -1,247 +1,282 @@
-/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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.infra.gmfdiag.common.service.shape;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.service.ExecutionStrategy;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.common.core.service.IProvider;
-import org.eclipse.gmf.runtime.common.core.service.Service;
-import org.eclipse.gmf.runtime.common.ui.services.util.ActivityFilterProviderDescriptor;
-import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
-import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
-import org.eclipse.gmf.runtime.draw2d.ui.render.RenderedImage;
-import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
-import org.w3c.dom.svg.SVGDocument;
-
-/**
- * Service that manages shape.
- */
-public class ShapeService extends org.eclipse.gmf.runtime.common.core.service.Service {
-
- /** singleton instance */
- private static ShapeService instance;
-
- /**
- * Constructor (hidden: singleton instance).
- */
- protected ShapeService() {
-
- }
-
- /**
- * Checks if the given element should display a shape.
- *
- * @return <code>true</code> if a shape should be displayed
- */
- public boolean hasShapeToDisplay(EObject view) {
- @SuppressWarnings("unchecked")
- List<RenderedImage> images = execute(ExecutionStrategy.REVERSE, new GetShapesForViewOperation(view));
- return images != null && images.size() > 0;
- }
-
- /**
- * Returns the shape to be displayed
- *
- * @param view
- * the EObject for which the shape is computed
- * @return the shape to be displayed
- */
- public List<RenderedImage> getShapesToDisplay(EObject view) {
- @SuppressWarnings("unchecked")
- List<List<RenderedImage>> listOfListOfImages = execute(ExecutionStrategy.REVERSE, new GetShapesForViewOperation(view));
- List<RenderedImage> images = new ArrayList<RenderedImage>();
- for (List<RenderedImage> listOfImages : listOfListOfImages) {
- if (listOfImages != null && !listOfImages.isEmpty()) {
- images.addAll(listOfImages);
- }
- }
- return images;
- }
-
-
- /**
- * Returns the shape to be displayed
- *
- * @param view
- * the EObject for which the shape is computed
- * @return the shape to be displayed
- */
- public List<SVGDocument> getSVGDocumentToDisplay(EObject view) {
- @SuppressWarnings("unchecked")
- List<List<SVGDocument>> listOfListOfImages = execute(ExecutionStrategy.REVERSE, new GetSVGDocumentForViewOperation(view));
- List<SVGDocument> images = new ArrayList<SVGDocument>();
- for (List<SVGDocument> listOfImages : listOfListOfImages) {
- if (listOfImages != null && !listOfImages.isEmpty()) {
- images.addAll(listOfImages);
- }
- }
- return images;
- }
-
- /**
- * Ask all the shape providers to add their required notification listeners to the diagram event broker.
- *
- * @param diagramEventBroker
- * the diagram event broker used to manage notifications
- * @param view
- * view on which required listened elements are retrieved
- * @param notificationListener
- * notification listener that should be notified when there are modifications susceptible to change the shapes
- */
- protected List<ProviderNotificationManager> createProviderNotificationManagers(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener notificationListener) {
- @SuppressWarnings("unchecked")
- List<ProviderNotificationManager> providerNotificationManagers = execute(ExecutionStrategy.REVERSE, new CreateProviderNotificationManagersOperation(diagramEventBroker, view, notificationListener));
- return providerNotificationManagers;
- }
-
- /**
- * gets the singleton instance
- *
- * @return <code>PaletteService</code>
- */
- public static synchronized ShapeService getInstance() {
- if (instance == null) {
- instance = new ShapeService();
- configureProviders();
- }
- return instance;
- }
-
- /**
- * configure the extensions for this service.
- */
- private static void configureProviders() {
- getInstance().configureProviders(Activator.ID, "shapeProvider"); //$NON-NLS-1$
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Service.ProviderDescriptor newProviderDescriptor(IConfigurationElement element) {
- return new ProviderDescriptor(element);
- }
-
- /**
- * @{inheritDoc
- */
- public List<IShapeProvider> getProviders() {
- List<IShapeProvider> providers = new ArrayList<IShapeProvider>();
- execute(ExecutionStrategy.REVERSE, new GetAllShapeProvidersOperation(providers));
- return providers;
- }
-
- /**
- * @{inheritDoc
- */
- public IShapeProvider getProvider(String id) {
- @SuppressWarnings("unchecked")
- List<IShapeProvider> providers = execute(ExecutionStrategy.REVERSE, new GetShapeProviderByIdentifierOperation(id));
- if (providers == null) {
- return null;
- }
- Iterator<IShapeProvider> it = providers.iterator();
- while (it.hasNext()) {
- IShapeProvider aspectActionProvider = it.next();
- if (aspectActionProvider != null) {
- return aspectActionProvider;
- }
- }
- return null;
- }
-
- /**
- * A descriptor for aspect tool providers defined by a configuration
- * element.
- */
- protected static class ProviderDescriptor extends ActivityFilterProviderDescriptor {
-
- /** the provider configuration parsed from XML */
- protected ShapeProviderConfiguration providerConfiguration;
-
- /**
- * Constructs a <code>ISemanticProvider</code> descriptor for the
- * specified configuration element.
- *
- * @param element
- * The configuration element describing the provider.
- */
- public ProviderDescriptor(IConfigurationElement element) {
- super(element);
- this.providerConfiguration = ShapeProviderConfiguration.parse(element);
- Assert.isNotNull(providerConfiguration);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean provides(IOperation operation) {
- if (!super.provides(operation)) {
- return false;
- }
-
- if (!(operation instanceof IShapeProviderOperation)) {
- return false;
- }
-
- if (operation instanceof GetShapeProviderByIdentifierOperation) {
- return providerConfiguration.getId().equals(((GetShapeProviderByIdentifierOperation) operation).getIdentifier());
- }
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IProvider getProvider() {
- if (provider == null) {
- IProvider newProvider = super.getProvider();
- if (provider instanceof IShapeProvider) {
- IShapeProvider defaultProvider = (IShapeProvider) newProvider;
- defaultProvider.setConfiguration(getElement());
- }
- return newProvider;
- }
- return super.getProvider();
- }
- }
-
- /**
- * Creates the notification manager, initializes it with all managers provided by the service providers, and returns it for the given view
- *
- * @param diagramEventBroker
- * event broker on which provider managers register themselves.
- * @param view
- * the view in charge of the display of the shapes
- * @param notificationListener
- * the listener notified when the event broker fires a notification
- * @return the created notification provider
- */
- public NotificationManager createNotificationManager(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener notificationListener) {
- NotificationManager manager = new NotificationManager(view);
- List<ProviderNotificationManager> providerNotificationManagers = createProviderNotificationManagers(diagramEventBroker, view, notificationListener);
- manager.getProviderNotificationManagers().addAll(providerNotificationManagers);
- return manager;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms 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.infra.gmfdiag.common.service.shape;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.service.ExecutionStrategy;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.common.core.service.IProvider;
+import org.eclipse.gmf.runtime.common.core.service.Service;
+import org.eclipse.gmf.runtime.common.ui.services.util.ActivityFilterProviderDescriptor;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.draw2d.ui.render.RenderedImage;
+import org.eclipse.gmf.runtime.notation.IntValueStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.w3c.dom.svg.SVGDocument;
+
+/**
+ * Service that manages shape.
+ */
+public class ShapeService extends org.eclipse.gmf.runtime.common.core.service.Service {
+
+ /**
+ *
+ */
+ private static final String MAX_NUMBER_OF_SYMBOL = "maxNumberOfSymbol";
+
+ /** singleton instance */
+ private static ShapeService instance;
+
+ /**
+ * Constructor (hidden: singleton instance).
+ */
+ protected ShapeService() {
+
+ }
+
+ /**
+ * Checks if the given element should display a shape.
+ *
+ * @return <code>true</code> if a shape should be displayed
+ */
+ public boolean hasShapeToDisplay(EObject view) {
+ @SuppressWarnings("unchecked")
+ List<RenderedImage> images = execute(ExecutionStrategy.REVERSE, new GetShapesForViewOperation(view));
+ return images != null && images.size() > 0;
+ }
+
+ /**
+ * Returns the shape to be displayed
+ *
+ * @param view
+ * the EObject for which the shape is computed
+ * @return the shape to be displayed
+ */
+ public List<RenderedImage> getShapesToDisplay(EObject view) {
+ @SuppressWarnings("unchecked")
+ List<List<RenderedImage>> listOfListOfImages = execute(ExecutionStrategy.FORWARD, new GetShapesForViewOperation(view));
+ List<RenderedImage> images = new ArrayList<RenderedImage>();
+ for (List<RenderedImage> listOfImages : listOfListOfImages) {
+ if (listOfImages != null && !listOfImages.isEmpty()) {
+ images.addAll(listOfImages);
+ }
+ }
+ // Get the number of images to display
+ int nbImagesToDisplay = NotationUtils.getIntValue((View) view, MAX_NUMBER_OF_SYMBOL, getDefaultMaxNumberOfSymbol());
+
+ return images.subList(0, Math.min(nbImagesToDisplay, images.size()));
+ }
+
+ /**
+ * Returns the shape to be displayed
+ *
+ * @param view
+ * the EObject for which the shape is computed
+ * @return the shape to be displayed
+ */
+ public List<SVGDocument> getSVGDocumentToDisplay(EObject view) {
+ @SuppressWarnings("unchecked")
+ List<List<SVGDocument>> listOfListOfImages = execute(ExecutionStrategy.FORWARD, new GetSVGDocumentForViewOperation(view));
+ // lists of images are sort by priority from the highest to the lowest
+ List<SVGDocument> images = new ArrayList<SVGDocument>();
+ for (List<SVGDocument> listOfImages : listOfListOfImages) {
+ if (listOfImages != null && !listOfImages.isEmpty()) {
+ images.addAll(listOfImages);
+ }
+ }
+ // Get the number of images to display
+ int nbImagesToDisplay = NotationUtils.getIntValue((View) view, MAX_NUMBER_OF_SYMBOL, getDefaultMaxNumberOfSymbol());
+
+ return images.subList(0, Math.min(nbImagesToDisplay, images.size()));
+ }
+
+ /**
+ * Get the maximum number of images to be displayed
+ *
+ * @param view
+ * @return
+ */
+ private int getMaxNumberOfSymbolToDisplay(EObject view) {
+ // get the nbImagesToDisplay highest images from the list
+ IntValueStyle maxNbImages = (IntValueStyle) ((View) view).getNamedStyle(NotationPackage.eINSTANCE.getIntValueStyle(), MAX_NUMBER_OF_SYMBOL);
+ int nbImagesToDisplay = maxNbImages != null ? maxNbImages.getIntValue() : getDefaultMaxNumberOfSymbol();
+ return nbImagesToDisplay;
+ }
+
+ /**
+ * @return
+ */
+ private int getDefaultMaxNumberOfSymbol() {
+ return 10;
+ }
+
+ /**
+ * Ask all the shape providers to add their required notification listeners to the diagram event broker.
+ *
+ * @param diagramEventBroker
+ * the diagram event broker used to manage notifications
+ * @param view
+ * view on which required listened elements are retrieved
+ * @param notificationListener
+ * notification listener that should be notified when there are modifications susceptible to change the shapes
+ */
+ protected List<ProviderNotificationManager> createProviderNotificationManagers(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener notificationListener) {
+ @SuppressWarnings("unchecked")
+ List<ProviderNotificationManager> providerNotificationManagers = execute(ExecutionStrategy.REVERSE, new CreateProviderNotificationManagersOperation(diagramEventBroker, view, notificationListener));
+ return providerNotificationManagers;
+ }
+
+ /**
+ * gets the singleton instance
+ *
+ * @return <code>PaletteService</code>
+ */
+ public static synchronized ShapeService getInstance() {
+ if (instance == null) {
+ instance = new ShapeService();
+ configureProviders();
+ }
+ return instance;
+ }
+
+ /**
+ * configure the extensions for this service.
+ */
+ private static void configureProviders() {
+ getInstance().configureProviders(Activator.ID, "shapeProvider"); //$NON-NLS-1$
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Service.ProviderDescriptor newProviderDescriptor(IConfigurationElement element) {
+ return new ProviderDescriptor(element);
+ }
+
+ /**
+ * @{inheritDoc
+ */
+ public List<IShapeProvider> getProviders() {
+ List<IShapeProvider> providers = new ArrayList<IShapeProvider>();
+ execute(ExecutionStrategy.REVERSE, new GetAllShapeProvidersOperation(providers));
+ return providers;
+ }
+
+ /**
+ * @{inheritDoc
+ */
+ public IShapeProvider getProvider(String id) {
+ @SuppressWarnings("unchecked")
+ List<IShapeProvider> providers = execute(ExecutionStrategy.REVERSE, new GetShapeProviderByIdentifierOperation(id));
+ if (providers == null) {
+ return null;
+ }
+ Iterator<IShapeProvider> it = providers.iterator();
+ while (it.hasNext()) {
+ IShapeProvider aspectActionProvider = it.next();
+ if (aspectActionProvider != null) {
+ return aspectActionProvider;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * A descriptor for aspect tool providers defined by a configuration
+ * element.
+ */
+ protected static class ProviderDescriptor extends ActivityFilterProviderDescriptor {
+
+ /** the provider configuration parsed from XML */
+ protected ShapeProviderConfiguration providerConfiguration;
+
+ /**
+ * Constructs a <code>ISemanticProvider</code> descriptor for the
+ * specified configuration element.
+ *
+ * @param element
+ * The configuration element describing the provider.
+ */
+ public ProviderDescriptor(IConfigurationElement element) {
+ super(element);
+ this.providerConfiguration = ShapeProviderConfiguration.parse(element);
+ Assert.isNotNull(providerConfiguration);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean provides(IOperation operation) {
+ if (!super.provides(operation)) {
+ return false;
+ }
+
+ if (!(operation instanceof IShapeProviderOperation)) {
+ return false;
+ }
+
+ if (operation instanceof GetShapeProviderByIdentifierOperation) {
+ return providerConfiguration.getId().equals(((GetShapeProviderByIdentifierOperation) operation).getIdentifier());
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IProvider getProvider() {
+ if (provider == null) {
+ IProvider newProvider = super.getProvider();
+ if (provider instanceof IShapeProvider) {
+ IShapeProvider defaultProvider = (IShapeProvider) newProvider;
+ defaultProvider.setConfiguration(getElement());
+ }
+ return newProvider;
+ }
+ return super.getProvider();
+ }
+ }
+
+ /**
+ * Creates the notification manager, initializes it with all managers provided by the service providers, and returns it for the given view
+ *
+ * @param diagramEventBroker
+ * event broker on which provider managers register themselves.
+ * @param view
+ * the view in charge of the display of the shapes
+ * @param notificationListener
+ * the listener notified when the event broker fires a notification
+ * @return the created notification provider
+ */
+ public NotificationManager createNotificationManager(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener notificationListener) {
+ NotificationManager manager = new NotificationManager(view);
+ List<ProviderNotificationManager> providerNotificationManagers = createProviderNotificationManagers(diagramEventBroker, view, notificationListener);
+ manager.getProviderNotificationManagers().addAll(providerNotificationManagers);
+ return manager;
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java
index 7320fe5b90c..03b75a122af 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramEditPartsUtil.java
@@ -21,6 +21,7 @@ import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartViewer;
import org.eclipse.gef.RootEditPart;
import org.eclipse.gef.editparts.AbstractConnectionEditPart;
+import org.eclipse.gef.editparts.ZoomManager;
import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
@@ -227,28 +228,48 @@ public class DiagramEditPartsUtil {
}
return -1.0;
}
-
+
/**
* This Method return the Graphical container of an EditPart.
* Depending on the type of EditPart, the container can be the Direct Parent or the grand parent.
+ *
* @param currentEP
* @return
*/
public static final EditPart getContainerEditPart(GraphicalEditPart currentEP) {
-
+
EditPart container;
EditPart parent = currentEP.getParent();
- if (parent instanceof AbstractConnectionEditPart){
- container = parent.getParent();
- }else if (parent instanceof AbstractBorderItemEditPart){
- container = parent.getParent().getParent();
- }else if (currentEP instanceof AbstractBorderItemEditPart){
- container = parent.getParent();
- }else {
+ if (parent instanceof AbstractConnectionEditPart) {
+ container = parent.getParent();
+ } else if (parent instanceof AbstractBorderItemEditPart) {
+ container = parent.getParent().getParent();
+ } else if (currentEP instanceof AbstractBorderItemEditPart) {
+ container = parent.getParent();
+ } else {
container = parent;
}
return container;
}
+ /*
+ * @param anEditPart
+ * an edit part
+ *
+ * @return
+ * the zoom level in the diagram or 1.0 when {@link ZoomManager} has not been found
+ */
+
+ public static final double getDiagramZoomLevel(final EditPart anEditPart) {
+
+ final RootEditPart rootEP = anEditPart.getRoot();
+ if (rootEP instanceof DiagramRootEditPart) {
+ final ZoomManager zoomManager = ((DiagramRootEditPart) rootEP).getZoomManager();
+ if (zoomManager != null) {
+ return zoomManager.getZoom();
+ }
+ }
+ return 1.0;
+ }
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/figure/CustomRequirementFigure.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/figure/CustomRequirementFigure.java
index 0403a285a73..663628fda0e 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/figure/CustomRequirementFigure.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/figure/CustomRequirementFigure.java
@@ -1,56 +1,57 @@
-/*****************************************************************************
- * Copyright (c) 2012 ATOS.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Olivier Mélois (ATOS) - Initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.papyrus.sysml.diagram.requirement.figure;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
-
-public class CustomRequirementFigure extends ClassifierFigure {
-
- /** The Attribute Compartment */
- private final static String ATTRIBUTE_COMPARTMENT = "attributeCompartment";
-
- /** The Operation Compartment */
- private final static String OPERATION_COMPARTMENT = "operationCompartment";
-
- /** The NestedClassifier Compartment */
- private final static String NESTEDCLASSIFIER_COMPARTMENT = "nestedClassifierCompartment";
-
- /** The RequirementIdInformation Compartment */
- private final static String REQUIREMENT_ID_INFO_COMPARTMENT = "requirementIdInformationCompartment";
-
- /** The List of Compartment */
- private final static List<String> COMPARTMENT = new ArrayList<String>() {
-
- private static final long serialVersionUID = 1L;
- {
- add(ATTRIBUTE_COMPARTMENT);
- add(OPERATION_COMPARTMENT);
- add(NESTEDCLASSIFIER_COMPARTMENT);
- add(REQUIREMENT_ID_INFO_COMPARTMENT);
- }
- };
-
- public CustomRequirementFigure() {
- super();
- createContentPane(COMPARTMENT);
- }
-
- public IFigure getRequirementIdInformationCompartmentFigure() {
- return getCompartment(REQUIREMENT_ID_INFO_COMPARTMENT);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2012 ATOS.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Olivier Mélois (ATOS) - Initial API and implementation
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.figure;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+public class CustomRequirementFigure extends ClassFigure {
+
+ /** The Attribute Compartment */
+ private final static String ATTRIBUTE_COMPARTMENT = "attributeCompartment";
+
+ /** The Operation Compartment */
+ private final static String OPERATION_COMPARTMENT = "operationCompartment";
+
+ /** The NestedClassifier Compartment */
+ private final static String NESTEDCLASSIFIER_COMPARTMENT = "nestedClassifierCompartment";
+
+ /** The RequirementIdInformation Compartment */
+ private final static String REQUIREMENT_ID_INFO_COMPARTMENT = "requirementIdInformationCompartment";
+
+ /** The List of Compartment */
+ private final static List<String> COMPARTMENT = new ArrayList<String>() {
+
+ private static final long serialVersionUID = 1L;
+ {
+ add(ATTRIBUTE_COMPARTMENT);
+ add(OPERATION_COMPARTMENT);
+ add(NESTEDCLASSIFIER_COMPARTMENT);
+ add(REQUIREMENT_ID_INFO_COMPARTMENT);
+ }
+ };
+
+ public CustomRequirementFigure() {
+ super();
+ createContentPane(COMPARTMENT);
+ }
+
+ public IFigure getRequirementIdInformationCompartmentFigure() {
+ return getCompartment(REQUIREMENT_ID_INFO_COMPARTMENT);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/draw2d/StructuredActivityNodeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/draw2d/StructuredActivityNodeFigure.java
index ceecbffc4bf..bfb5df5e0f2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/draw2d/StructuredActivityNodeFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/draw2d/StructuredActivityNodeFigure.java
@@ -1,186 +1,146 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.draw2d;
-
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.LayoutManager;
-import org.eclipse.draw2d.OrderedLayout;
-import org.eclipse.draw2d.RoundedRectangle;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.GravityConstrainedFlowLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.GravityDirectionType;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode;
-import org.eclipse.gmf.runtime.notation.MeasurementUnit;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.preferences.IActivityPreferenceConstants;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.RoundedRectangleDashedBorder;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * Figure for structured activity node and its derived element
- *
- * @author arthur daussy
- *
- */
-public class StructuredActivityNodeFigure extends PapyrusRoundedNodeFigure {
-
- /**
- * Since the Activity diagram is using Pixel unit we can use this as constant
- */
- private static IMapMode mapNode = MeasurementUnitHelper.getMapMode(MeasurementUnit.PIXEL_LITERAL);
-
- /**
- * Compartment for activity node
- */
- private RoundedRectangle fStructuredActivityNodeCompartment;
-
- /**
- * Compartment for label
- */
- private RoundedRectangle fFigureCompartmentLabelStructuredActivityNode;
-
- /**
- * Preferences Store
- */
- protected IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
-
- /**
- * Constructor
- */
- public StructuredActivityNodeFigure() {
- super();
- corner = 8;
- this.shadowborder = createBorder0();
- setBorder(getBorderedFigure(), this.shadowborder);
- createContentPane();
- }
-
- @Override
- protected Border getDefaultBorder(Color borderColor) {
- return createBorder0();
- }
-
- /**
- * Custom border (Used to avoid the alpha setting affect the border)
- *
- * @return
- */
- private org.eclipse.draw2d.LineBorder createBorder0() {
- RoundedRectangleDashedBorder result = new RoundedRectangleDashedBorder(8, 8);
- result.setWidth(1);
- result.setStyle(Graphics.LINE_DASH);
- return result;
- }
-
- @Override
- public LayoutManager getLayoutManager() {
- FlowLayoutAdvanced layoutThis = new FlowLayoutAdvanced();
- layoutThis.setStretchMinorAxis(true);
- layoutThis.setMinorAlignment(OrderedLayout.ALIGN_CENTER);
- layoutThis.setMajorAlignment(OrderedLayout.ALIGN_TOPLEFT);
- layoutThis.setMajorSpacing(0);
- layoutThis.setMinorSpacing(0);
- layoutThis.setHorizontal(false);
- return layoutThis;
- }
-
- /**
- * Create compartment for activity node
- */
- protected void createContentPane() {
- /*
- * Compartment
- */
- this.setLayoutManager(getLayoutManager());
- fStructuredActivityNodeCompartment = new RoundedRectangle();
- fStructuredActivityNodeCompartment.setCornerDimensions(new Dimension(mapNode.DPtoLP(8), mapNode.DPtoLP(8)));
- fStructuredActivityNodeCompartment.setFill(false);
- fStructuredActivityNodeCompartment.setOutline(false);
- fStructuredActivityNodeCompartment.setLineWidth(0);
- FlowLayoutAdvancedConstraint constraintFStructuredActivityNodeCompartment = new FlowLayoutAdvancedConstraint();
- constraintFStructuredActivityNodeCompartment.setFull(true);
- this.add(fStructuredActivityNodeCompartment, constraintFStructuredActivityNodeCompartment);
- }
-
- @Override
- protected Object getDefaultLabelsConstraint() {
- GravityConstrainedFlowLayout layoutFFigureCompartmentLabelStructuredActivityNode = new GravityConstrainedFlowLayout();
- layoutFFigureCompartmentLabelStructuredActivityNode.setGravity(GravityDirectionType.WEST);
- fFigureCompartmentLabelStructuredActivityNode.setLayoutManager(layoutFFigureCompartmentLabelStructuredActivityNode);
- return super.getDefaultLabelsConstraint();
- }
-
- @Override
- protected Object getNameLabelConstraint() {
- GravityConstrainedFlowLayoutConstraint constraintFKeyword = new GravityConstrainedFlowLayoutConstraint();
- constraintFKeyword.setAlign(OrderedLayout.ALIGN_TOPLEFT);
- return constraintFKeyword;
- }
-
- @Override
- protected IFigure getDefaultLabelsContainer() {
- if (fFigureCompartmentLabelStructuredActivityNode == null) {
- fFigureCompartmentLabelStructuredActivityNode = new RoundedRectangle();
- fFigureCompartmentLabelStructuredActivityNode.setCornerDimensions(new Dimension(mapNode.DPtoLP(8), mapNode.DPtoLP(8)));
- fFigureCompartmentLabelStructuredActivityNode.setFill(false);
- fFigureCompartmentLabelStructuredActivityNode.setOutline(false);
- fFigureCompartmentLabelStructuredActivityNode.setLineWidth(0);
- FlowLayoutAdvancedConstraint constraintFFigureCompartmentLabelStructuredActivityNode = new FlowLayoutAdvancedConstraint();
- constraintFFigureCompartmentLabelStructuredActivityNode.setHasMinsize(true);
- this.add(fFigureCompartmentLabelStructuredActivityNode, constraintFFigureCompartmentLabelStructuredActivityNode);
- GravityConstrainedFlowLayout layoutFFigureCompartmentLabelStructuredActivityNode = new GravityConstrainedFlowLayout();
- layoutFFigureCompartmentLabelStructuredActivityNode.setGravity(GravityDirectionType.WEST);
- layoutFFigureCompartmentLabelStructuredActivityNode.setSpacing(10);
- fFigureCompartmentLabelStructuredActivityNode.setLayoutManager(layoutFFigureCompartmentLabelStructuredActivityNode);
- }
- return fFigureCompartmentLabelStructuredActivityNode;
- }
-
- /**
- * Override in order to use alpha component
- */
- @Override
- public void paintFigure(Graphics graphics) {
- int transparency = getTransparency();
- if (transparency == 0) {
- transparency = UMLDiagramEditorPlugin.getInstance().getPreferenceStore().getInt(IActivityPreferenceConstants.PREF_STRUCTURED_NODE_ALPHA);
- } else {
- transparency = 100 - getTransparency();
- }
- graphics.setAlpha(transparency);
- super.paintFigure(graphics);
- }
-
- /**
- * Compartment for activity node
- */
- public RoundedRectangle getStructuredActivityNodeCompartment() {
- return fStructuredActivityNodeCompartment;
- }
-
- /**
- * Get the keywork compartment
- *
- * @return
- */
- public WrappingLabel getKeyword() {
- return getNameLabel();
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.draw2d;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.LayoutManager;
+import org.eclipse.draw2d.OrderedLayout;
+import org.eclipse.draw2d.RoundedRectangle;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gmf.runtime.diagram.ui.util.MeasurementUnitHelper;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.GravityConstrainedFlowLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.GravityDirectionType;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode;
+import org.eclipse.gmf.runtime.notation.MeasurementUnit;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+
+/**
+ * Figure for structured activity node and its derived element
+ *
+ * @author arthur daussy
+ *
+ */
+public class StructuredActivityNodeFigure extends RoundedCompartmentFigure {
+
+ /**
+ * Since the Activity diagram is using Pixel unit we can use this as constant
+ */
+ private static IMapMode mapNode = MeasurementUnitHelper.getMapMode(MeasurementUnit.PIXEL_LITERAL);
+
+ /**
+ * Compartment for activity node
+ */
+ private RoundedRectangle fStructuredActivityNodeCompartment;
+
+ /**
+ * Compartment for label
+ */
+ private RoundedRectangle fFigureCompartmentLabelStructuredActivityNode;
+
+ /**
+ * Preferences Store
+ */
+ protected IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
+
+ /**
+ * Constructor
+ */
+ public StructuredActivityNodeFigure() {
+ super();
+ createContentPane();
+ }
+
+ @Override
+ public LayoutManager getLayoutManager() {
+ FlowLayoutAdvanced layoutThis = new FlowLayoutAdvanced();
+ layoutThis.setStretchMinorAxis(true);
+ layoutThis.setMinorAlignment(OrderedLayout.ALIGN_CENTER);
+ layoutThis.setMajorAlignment(OrderedLayout.ALIGN_TOPLEFT);
+ layoutThis.setMajorSpacing(0);
+ layoutThis.setMinorSpacing(0);
+ layoutThis.setHorizontal(false);
+ return layoutThis;
+ }
+
+ /**
+ * Create compartment for activity node
+ */
+ protected void createContentPane() {
+ /*
+ * Compartment
+ */
+ this.setLayoutManager(getLayoutManager());
+ fStructuredActivityNodeCompartment = new RoundedRectangle();
+ fStructuredActivityNodeCompartment.setCornerDimensions(new Dimension(mapNode.DPtoLP(8), mapNode.DPtoLP(8)));
+ fStructuredActivityNodeCompartment.setFill(false);
+ fStructuredActivityNodeCompartment.setOutline(false);
+ fStructuredActivityNodeCompartment.setLineWidth(0);
+ FlowLayoutAdvancedConstraint constraintFStructuredActivityNodeCompartment = new FlowLayoutAdvancedConstraint();
+ constraintFStructuredActivityNodeCompartment.setFull(true);
+ this.add(fStructuredActivityNodeCompartment, constraintFStructuredActivityNodeCompartment);
+ }
+
+ @Override
+ protected Object getDefaultLabelsConstraint() {
+ GravityConstrainedFlowLayout layoutFFigureCompartmentLabelStructuredActivityNode = new GravityConstrainedFlowLayout();
+ layoutFFigureCompartmentLabelStructuredActivityNode.setGravity(GravityDirectionType.WEST);
+ fFigureCompartmentLabelStructuredActivityNode.setLayoutManager(layoutFFigureCompartmentLabelStructuredActivityNode);
+ return super.getDefaultLabelsConstraint();
+ }
+
+ @Override
+ protected Object getNameLabelConstraint() {
+ GravityConstrainedFlowLayoutConstraint constraintFKeyword = new GravityConstrainedFlowLayoutConstraint();
+ constraintFKeyword.setAlign(OrderedLayout.ALIGN_TOPLEFT);
+ return constraintFKeyword;
+ }
+
+ @Override
+ protected IFigure getDefaultLabelsContainer() {
+ if (fFigureCompartmentLabelStructuredActivityNode == null) {
+ fFigureCompartmentLabelStructuredActivityNode = new RoundedRectangle();
+ fFigureCompartmentLabelStructuredActivityNode.setCornerDimensions(new Dimension(mapNode.DPtoLP(8), mapNode.DPtoLP(8)));
+ fFigureCompartmentLabelStructuredActivityNode.setFill(false);
+ fFigureCompartmentLabelStructuredActivityNode.setOutline(false);
+ fFigureCompartmentLabelStructuredActivityNode.setLineWidth(0);
+ FlowLayoutAdvancedConstraint constraintFFigureCompartmentLabelStructuredActivityNode = new FlowLayoutAdvancedConstraint();
+ constraintFFigureCompartmentLabelStructuredActivityNode.setHasMinsize(true);
+ this.add(fFigureCompartmentLabelStructuredActivityNode, constraintFFigureCompartmentLabelStructuredActivityNode);
+ GravityConstrainedFlowLayout layoutFFigureCompartmentLabelStructuredActivityNode = new GravityConstrainedFlowLayout();
+ layoutFFigureCompartmentLabelStructuredActivityNode.setGravity(GravityDirectionType.WEST);
+ layoutFFigureCompartmentLabelStructuredActivityNode.setSpacing(10);
+ fFigureCompartmentLabelStructuredActivityNode.setLayoutManager(layoutFFigureCompartmentLabelStructuredActivityNode);
+ }
+ return fFigureCompartmentLabelStructuredActivityNode;
+ }
+
+ /**
+ * Compartment for activity node
+ */
+ public RoundedRectangle getStructuredActivityNodeCompartment() {
+ return fStructuredActivityNodeCompartment;
+ }
+
+ /**
+ * Get the keywork compartment
+ *
+ * @return
+ */
+ public WrappingLabel getKeyword() {
+ return getNameLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAcceptEventActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAcceptEventActionEditPart.java
index ee008514200..9cd21b2e137 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAcceptEventActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAcceptEventActionEditPart.java
@@ -1,78 +1,176 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.part;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.helper.AcceptEventActionSwitchHelper;
-import org.eclipse.uml2.uml.AcceptEventAction;
-
-
-/**
- * This editpart extends the generated controller in order to add specific behavior
- *
- */
-public class CustomAcceptEventActionEditPart extends AcceptEventActionEditPart {
-
- public CustomAcceptEventActionEditPart(View view) {
- super(view);
- }
-
- /**
- * Notifier for listening and stop listening model element.
- *
- */
- private AcceptEventActionSwitchHelper notifier = new AcceptEventActionSwitchHelper(this);
-
-
- /**
- * Deactivate listeners to handle notification in the message occurence
- * specification
- *
- */
- @Override
- public void deactivate() {
- notifier.unlistenAll();
- super.deactivate();
- }
-
- /**
- * Remove listeners to handle notification in the message occurence specification
- *
- */
- @Override
- public void removeNotify() {
- notifier.unlistenAll();
- super.removeNotify();
- }
-
-
-
- /**
- * Activate a listener for to Handle notification for new owned YYY
- *
- */
- @Override
- public void activate() {
- super.activate();
- EObject action = resolveSemanticElement();
- if (action instanceof AcceptEventAction) {
- notifier.listenObject(action);
- // ensure representation is correctly initialized.
- boolean useHourglassFigure = org.eclipse.papyrus.uml.diagram.activity.helper.CustomAcceptEventActionEditHelper.isAcceptTimeEventAction((AcceptEventAction) action);
- getPrimaryShape().useTemplateForAcceptTimeEventAction(useHourglassFigure);
- }
- }
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.helper.AcceptEventActionSwitchHelper;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+import org.eclipse.uml2.uml.AcceptEventAction;
+
+
+/**
+ * This editpart extends the generated controller in order to add specific behavior
+ *
+ */
+public class CustomAcceptEventActionEditPart extends AcceptEventActionEditPart {
+
+ public CustomAcceptEventActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Notifier for listening and stop listening model element.
+ *
+ */
+ private AcceptEventActionSwitchHelper notifier = new AcceptEventActionSwitchHelper(this);
+
+
+ /**
+ * Deactivate listeners to handle notification in the message occurence
+ * specification
+ *
+ */
+ @Override
+ public void deactivate() {
+ notifier.unlistenAll();
+ super.deactivate();
+ }
+
+ /**
+ * Remove listeners to handle notification in the message occurence specification
+ *
+ */
+ @Override
+ public void removeNotify() {
+ notifier.unlistenAll();
+ super.removeNotify();
+ }
+
+
+
+ /**
+ * Activate a listener for to Handle notification for new owned YYY
+ *
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ EObject action = resolveSemanticElement();
+ if (action instanceof AcceptEventAction) {
+ notifier.listenObject(action);
+ // ensure representation is correctly initialized.
+ // boolean useHourglassFigure = org.eclipse.papyrus.uml.diagram.activity.helper.CustomAcceptEventActionEditHelper.isAcceptTimeEventAction((AcceptEventAction) action);
+ // getPrimaryShape().useTemplateForAcceptTimeEventAction(useHourglassFigure);
+ }
+ }
+
+ /** The Constant USE_ORIGINAL_COLORS_VALUE. */
+ private static final boolean USE_ORIGINAL_COLORS_VALUE = false;
+
+ /** The Constant FLOATING_LABEL_OFFSET_WIDTH_VALUE. */
+ private static final int FLOATING_LABEL_OFFSET_WIDTH_VALUE = 10;
+
+ /** The Constant FLOATING_LABEL_OFFSET_HEIGHT_VALUE. */
+ private static final int FLOATING_LABEL_OFFSET_HEIGHT_VALUE = 10;
+
+ /**
+ * Creates the default edit policies.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * Creates the node plate.
+ *
+ * @return the node figure
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(125, 45);
+ return result;
+ }
+
+ /**
+ * Adds the border item.
+ *
+ * @param borderItemContainer
+ * the border item container
+ * @param borderItemEditPart
+ * the border item edit part
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default floating label offset height.
+ *
+ * @return the default floating label offset height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetHeight()
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetHeight() {
+ return FLOATING_LABEL_OFFSET_HEIGHT_VALUE;
+ }
+
+ /**
+ * Gets the default floating label offset width.
+ *
+ * @return the default floating label offset width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetWidth()
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return FLOATING_LABEL_OFFSET_WIDTH_VALUE;
+ }
+
+ /**
+ * Gets the default use original colors.
+ *
+ * @return the default use original colors
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultUseOriginalColors()
+ */
+ @Override
+ protected boolean getDefaultUseOriginalColors() {
+ return USE_ORIGINAL_COLORS_VALUE;
+ }
} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPart.java
new file mode 100644
index 00000000000..98625cd6a4b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPart.java
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomActivityEditPart extends ActivityEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomActivityEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "Activity";
+ IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
+ String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
+ String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
+
+ // DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, -20);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPartCN.java
new file mode 100644
index 00000000000..17f3e5b1535
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityEditPartCN.java
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityEditPartCN;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomActivityEditPartCN extends ActivityEditPartCN {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomActivityEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "Activity";
+ IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
+ String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
+ String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
+
+ // DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, -20);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityFinalNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityFinalNodeEditPart.java
new file mode 100644
index 00000000000..acff7441046
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityFinalNodeEditPart.java
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityFinalNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomSendSignalActionEditPart.
+ */
+public class CustomActivityFinalNodeEditPart extends ActivityFinalNodeEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomActivityFinalNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Creates the default edit policies.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * Creates the node plate.
+ *
+ * @return the node figure
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(20, 20);
+ return result;
+ }
+
+ /**
+ * Adds the border item.
+ *
+ * @param borderItemContainer
+ * the border item container
+ * @param borderItemEditPart
+ * the border item edit part
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /** The Constant FLOATING_LABEL_DEFAULT_WIDTH. */
+ private static final int FLOATING_LABEL_DEFAULT_WIDTH = 20;
+
+ /**
+ * Gets the default floating label offset width.
+ *
+ * @return the default floating label offset width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetWidth()
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return FLOATING_LABEL_DEFAULT_WIDTH;
+ }
+
+ /** The Constant USE_ORIGINAL_COLORS_VALUE. */
+ private static final boolean USE_ORIGINAL_COLORS_DEFAULT_VALUE = false;
+
+ /**
+ * Gets the default use original colors.
+ *
+ * @return the default use original colors
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultUseOriginalColors()
+ */
+ @Override
+ protected boolean getDefaultUseOriginalColors() {
+ return USE_ORIGINAL_COLORS_DEFAULT_VALUE;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityParameterNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityParameterNodeEditPart.java
new file mode 100644
index 00000000000..a7fc3664a8c
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityParameterNodeEditPart.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityParameterNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomActivityParameterNodeEditPart extends ActivityParameterNodeEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomActivityParameterNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ // installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return super.createNodePlate();// result;
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityPartitionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityPartitionEditPart.java
new file mode 100644
index 00000000000..d7376e09729
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomActivityPartitionEditPart.java
@@ -0,0 +1,41 @@
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.gef.EditPolicy;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityPartitionEditPart;
+
+public class CustomActivityPartitionEditPart extends ActivityPartitionEditPart {
+
+ public CustomActivityPartitionEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, -20);
+ return result;
+ }
+
+ // @Override
+ // protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ // if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // // Create specific locator
+ // RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // // Offset from the parent for the attached case
+ // locator.setBorderItemOffset(new Dimension(-20, -20));
+ // borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ // } else {
+ // super.addBorderItem(borderItemContainer, borderItemEditPart);
+ // }
+ // }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddStructuralFeatureValueActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddStructuralFeatureValueActionEditPart.java
new file mode 100644
index 00000000000..dd3f1638c08
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddStructuralFeatureValueActionEditPart.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddStructuralFeatureValueActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomAddStructuralFeatureValueActionEditPart extends AddStructuralFeatureValueActionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomAddStructuralFeatureValueActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddVariableValueActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddVariableValueActionEditPart.java
new file mode 100644
index 00000000000..a2ac6d04a57
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomAddVariableValueActionEditPart.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomAddVariableValueActionEditPart.
+ */
+public class CustomAddVariableValueActionEditPart extends AddVariableValueActionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomAddVariableValueActionEditPart(View view) {
+ super(view);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomBroadcastSignalActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomBroadcastSignalActionEditPart.java
new file mode 100644
index 00000000000..ec350b04a54
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomBroadcastSignalActionEditPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomBroadcastSignalActionEditPart extends BroadcastSignalActionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomBroadcastSignalActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallBehaviorActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallBehaviorActionEditPart.java
new file mode 100644
index 00000000000..2ac34349a57
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallBehaviorActionEditPart.java
@@ -0,0 +1,83 @@
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallBehaviorActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomCallBehaviorActionEditPart extends CallBehaviorActionEditPart {
+
+ /**
+ *
+ */
+ private static final int CORNER_HEIGHT = 15;
+
+ /**
+ *
+ */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public CustomCallBehaviorActionEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallOperationActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallOperationActionEditPart.java
new file mode 100644
index 00000000000..b689d6e1f75
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCallOperationActionEditPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallOperationActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomCallOperationActionEditPart extends CallOperationActionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomCallOperationActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCentralBufferNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCentralBufferNodeEditPart.java
new file mode 100644
index 00000000000..6a5a051a45b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCentralBufferNodeEditPart.java
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeSelectionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomCentralBufferNodeEditPart extends CentralBufferNodeEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomCentralBufferNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#refreshLabelDisplay()
+ *
+ */
+ @Override
+ protected void refreshLabelDisplay() {
+ // TODO Auto-generated method stub
+ super.refreshLabelDisplay();
+ // Allow multiline
+ getPrimaryShape().getNameLabel().setTextWrap(true);
+ // Center text
+ getPrimaryShape().getNameLabel().setTextJustification(PositionConstants.CENTER);
+ getPrimaryShape().getNameLabel().setAlignment(PositionConstants.CENTER);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(40, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof CentralBufferNodeSelectionEditPart) {
+ // use custom locator
+ BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH);
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomConditionalNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomConditionalNodeEditPart.java
new file mode 100644
index 00000000000..c00795412c5
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomConditionalNodeEditPart.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomConditionalNodeEditPart.
+ */
+public class CustomConditionalNodeEditPart extends ConditionalNodeEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 8;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 8;
+
+ /** The Constant DEFAULT_BORDER_STYLE. */
+ private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_DASH;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomConditionalNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+ /**
+ * Gets the default border style.
+ *
+ * @return the default border style
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultBorderStyle()
+ */
+ @Override
+ protected int getDefaultBorderStyle() {
+ return DEFAULT_BORDER_STYLE;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCreateObjectActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCreateObjectActionEditPart.java
new file mode 100644
index 00000000000..870f79cdd96
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomCreateObjectActionEditPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CreateObjectActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomCreateObjectActionEditPart extends CreateObjectActionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomCreateObjectActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDataStoreNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDataStoreNodeEditPart.java
new file mode 100644
index 00000000000..6a82a7ec139
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDataStoreNodeEditPart.java
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreSelectionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomDataStoreNodeEditPart extends DataStoreNodeEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomDataStoreNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#refreshLabelDisplay()
+ *
+ */
+ @Override
+ protected void refreshLabelDisplay() {
+ // TODO Auto-generated method stub
+ super.refreshLabelDisplay();
+ // Allow multiline
+ getPrimaryShape().getNameLabel().setTextWrap(true);
+ // Center text
+ getPrimaryShape().getNameLabel().setTextJustification(PositionConstants.CENTER);
+ getPrimaryShape().getNameLabel().setAlignment(PositionConstants.CENTER);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(40, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof DataStoreSelectionEditPart) {
+ // use custom locator
+ BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH);
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDecisionNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDecisionNodeEditPart.java
new file mode 100644
index 00000000000..d864cfb0a73
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDecisionNodeEditPart.java
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.DecisionNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomDecisionNodeEditPart.
+ */
+public class CustomDecisionNodeEditPart extends DecisionNodeEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomDecisionNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Creates the default edit policies.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * Creates the node plate.
+ *
+ * @return the node figure
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(20, 20);
+ return result;
+ }
+
+ /**
+ * Adds the border item.
+ *
+ * @param borderItemContainer
+ * the border item container
+ * @param borderItemEditPart
+ * the border item edit part
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /** The Constant FLOATING_LABEL_DEFAULT_WIDTH. */
+ private static final int FLOATING_LABEL_DEFAULT_WIDTH = 20;
+
+ /**
+ * Gets the default floating label offset width.
+ *
+ * @return the default floating label offset width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetWidth()
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return FLOATING_LABEL_DEFAULT_WIDTH;
+ }
+
+ /** The Constant USE_ORIGINAL_COLORS_VALUE. */
+ private static final boolean USE_ORIGINAL_COLORS_VALUE = false;
+
+ /**
+ * Gets the default use original colors.
+ *
+ * @return the default use original colors
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultUseOriginalColors()
+ */
+ @Override
+ protected boolean getDefaultUseOriginalColors() {
+ return USE_ORIGINAL_COLORS_VALUE;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDestroyObjectActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDestroyObjectActionEditPart.java
new file mode 100644
index 00000000000..aa4c1cb7bff
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomDestroyObjectActionEditPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.DestroyObjectActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomDestroyObjectActionEditPart extends DestroyObjectActionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomDestroyObjectActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomExpansionRegionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomExpansionRegionEditPart.java
new file mode 100644
index 00000000000..e4b0b7c202b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomExpansionRegionEditPart.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomExpansionRegionEditPart.
+ */
+public class CustomExpansionRegionEditPart extends ExpansionRegionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 8;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 8;
+
+ /** The Constant DEFAULT_BORDER_STYLE. */
+ private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_DASH;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomExpansionRegionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+ /**
+ * Gets the default border style.
+ *
+ * @return the default border style
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultBorderStyle()
+ */
+ @Override
+ protected int getDefaultBorderStyle() {
+ return DEFAULT_BORDER_STYLE;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomFlowFinalNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomFlowFinalNodeEditPart.java
new file mode 100644
index 00000000000..fe5fbbfbba5
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomFlowFinalNodeEditPart.java
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.FlowFinalNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomFlowFinalNodeEditPart.
+ */
+public class CustomFlowFinalNodeEditPart extends FlowFinalNodeEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomFlowFinalNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Creates the default edit policies.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * Creates the node plate.
+ *
+ * @return the node figure
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(20, 20);
+ return result;
+ }
+
+ /**
+ * Adds the border item.
+ *
+ * @param borderItemContainer
+ * the border item container
+ * @param borderItemEditPart
+ * the border item edit part
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /** The Constant FLOATING_LABEL_DEFAULT_WIDTH. */
+ private static final int FLOATING_LABEL_DEFAULT_WIDTH = 20;
+
+ /**
+ * Gets the default floating label offset width.
+ *
+ * @return the default floating label offset width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetWidth()
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return FLOATING_LABEL_DEFAULT_WIDTH;
+ }
+
+ /** The Constant USE_ORIGINAL_COLORS_VALUE. */
+ private static final boolean USE_ORIGINAL_COLORS_VALUE = false;
+
+ /**
+ * Gets the default use original colors.
+ *
+ * @return the default use original colors
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultUseOriginalColors()
+ */
+ @Override
+ protected boolean getDefaultUseOriginalColors() {
+ return USE_ORIGINAL_COLORS_VALUE;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomForkNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomForkNodeEditPart.java
new file mode 100644
index 00000000000..5e037296a13
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomForkNodeEditPart.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ForkNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomFlowFinalNodeEditPart.
+ */
+public class CustomForkNodeEditPart extends ForkNodeEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomForkNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Creates the default edit policies.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * Creates the node plate.
+ *
+ * @return the node figure
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(10, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultUseOriginalColors()
+ *
+ * @return
+ */
+ @Override
+ protected boolean getDefaultUseOriginalColors() {
+ return false;
+ }
+
+ /**
+ * Adds the border item.
+ *
+ * @param borderItemContainer
+ * the border item container
+ * @param borderItemEditPart
+ * the border item edit part
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /** The Constant FLOATING_LABEL_DEFAULT_WIDTH. */
+ private static final int FLOATING_LABEL_DEFAULT_WIDTH = 20;
+
+ /**
+ * Gets the default floating label offset width.
+ *
+ * @return the default floating label offset width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetWidth()
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return FLOATING_LABEL_DEFAULT_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomInitialNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomInitialNodeEditPart.java
new file mode 100644
index 00000000000..af58787d39e
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomInitialNodeEditPart.java
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.InitialNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomInitialNodeEditPart.
+ */
+public class CustomInitialNodeEditPart extends InitialNodeEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomInitialNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Creates the default edit policies.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * Creates the node plate.
+ *
+ * @return the node figure
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(20, 20);
+ return result;
+ }
+
+ /**
+ * Adds the border item.
+ *
+ * @param borderItemContainer
+ * the border item container
+ * @param borderItemEditPart
+ * the border item edit part
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /** The Constant FLOATING_LABEL_DEFAULT_WIDTH. */
+ private static final int FLOATING_LABEL_DEFAULT_WIDTH = 20;
+
+ /**
+ * Gets the default floating label offset width.
+ *
+ * @return the default floating label offset width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetWidth()
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return FLOATING_LABEL_DEFAULT_WIDTH;
+ }
+
+ /** The Constant USE_ORIGINAL_COLORS_VALUE. */
+ private static final boolean USE_ORIGINAL_COLORS_VALUE = false;
+
+ /**
+ * Gets the default use original colors.
+ *
+ * @return the default use original colors
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultUseOriginalColors()
+ */
+ @Override
+ protected boolean getDefaultUseOriginalColors() {
+ return USE_ORIGINAL_COLORS_VALUE;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomInterruptibleActivityRegionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomInterruptibleActivityRegionEditPart.java
new file mode 100644
index 00000000000..7419634519e
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomInterruptibleActivityRegionEditPart.java
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.gef.EditPolicy;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionEditPart;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class CustomInterruptibleActivityRegionEditPart.
+ */
+public class CustomInterruptibleActivityRegionEditPart extends InterruptibleActivityRegionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 8;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 8;
+
+ /** The Constant DEFAULT_BORDER_STYLE. */
+ private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_DASH;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomInterruptibleActivityRegionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(40, 40);
+ return result;
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionEditPart#createNodeFigure()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodeFigure() {
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+ /**
+ * Gets the default border style.
+ *
+ * @return the default border style
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultBorderStyle()
+ */
+ @Override
+ protected int getDefaultBorderStyle() {
+ return DEFAULT_BORDER_STYLE;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomJoinNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomJoinNodeEditPart.java
new file mode 100644
index 00000000000..7afc3a957ff
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomJoinNodeEditPart.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.JoinNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomFlowFinalNodeEditPart.
+ */
+public class CustomJoinNodeEditPart extends JoinNodeEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomJoinNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Creates the default edit policies.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * Creates the node plate.
+ *
+ * @return the node figure
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultUseOriginalColors()
+ *
+ * @return
+ */
+ @Override
+ protected boolean getDefaultUseOriginalColors() {
+ return false;
+ }
+
+ /**
+ * Adds the border item.
+ *
+ * @param borderItemContainer
+ * the border item container
+ * @param borderItemEditPart
+ * the border item edit part
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /** The Constant FLOATING_LABEL_DEFAULT_WIDTH. */
+ private static final int FLOATING_LABEL_DEFAULT_WIDTH = 20;
+
+ /**
+ * Gets the default floating label offset width.
+ *
+ * @return the default floating label offset width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetWidth()
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return FLOATING_LABEL_DEFAULT_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomLoopNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomLoopNodeEditPart.java
new file mode 100644
index 00000000000..29e0ddf8606
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomLoopNodeEditPart.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomLoopNodeEditPart.
+ */
+public class CustomLoopNodeEditPart extends LoopNodeEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 8;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 8;
+
+ /** The Constant DEFAULT_BORDER_STYLE. */
+ private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_DASH;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomLoopNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+ /**
+ * Gets the default border style.
+ *
+ * @return the default border style
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultBorderStyle()
+ */
+ @Override
+ protected int getDefaultBorderStyle() {
+ return DEFAULT_BORDER_STYLE;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomMergeNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomMergeNodeEditPart.java
new file mode 100644
index 00000000000..409a71023c5
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomMergeNodeEditPart.java
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.MergeNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomMergeNodeEditPart.
+ */
+public class CustomMergeNodeEditPart extends MergeNodeEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomMergeNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Creates the default edit policies.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * Creates the node plate.
+ *
+ * @return the node figure
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(20, 20);
+ return result;
+ }
+
+ /**
+ * Adds the border item.
+ *
+ * @param borderItemContainer
+ * the border item container
+ * @param borderItemEditPart
+ * the border item edit part
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /** The Constant FLOATING_LABEL_DEFAULT_WIDTH. */
+ private static final int FLOATING_LABEL_DEFAULT_WIDTH = 20;
+
+ /**
+ * Gets the default floating label offset width.
+ *
+ * @return the default floating label offset width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetWidth()
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return FLOATING_LABEL_DEFAULT_WIDTH;
+ }
+
+ /** The Constant USE_ORIGINAL_COLORS_VALUE. */
+ private static final boolean USE_ORIGINAL_COLORS_VALUE = false;
+
+ /**
+ * Gets the default use original colors.
+ *
+ * @return the default use original colors
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultUseOriginalColors()
+ */
+ @Override
+ protected boolean getDefaultUseOriginalColors() {
+ return USE_ORIGINAL_COLORS_VALUE;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomOpaqueActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomOpaqueActionEditPart.java
new file mode 100644
index 00000000000..23edcf9740d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomOpaqueActionEditPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.OpaqueActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomOpaqueActionEditPart extends OpaqueActionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomOpaqueActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadSelfActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadSelfActionEditPart.java
new file mode 100644
index 00000000000..be9b2358a3a
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadSelfActionEditPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadSelfActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomReadSelfActionEditPart extends ReadSelfActionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomReadSelfActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadStructuralFeatureActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadStructuralFeatureActionEditPart.java
new file mode 100644
index 00000000000..c66d9247b64
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadStructuralFeatureActionEditPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadStructuralFeatureActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomReadStructuralFeatureActionEditPart extends ReadStructuralFeatureActionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomReadStructuralFeatureActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadVariableActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadVariableActionEditPart.java
new file mode 100644
index 00000000000..f3a09cd46d3
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomReadVariableActionEditPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadVariableActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomReadVariableActionEditPart extends ReadVariableActionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomReadVariableActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSendObjectActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSendObjectActionEditPart.java
new file mode 100644
index 00000000000..328e32b477d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSendObjectActionEditPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendObjectActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomSendObjectActionEditPart extends SendObjectActionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomSendObjectActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSendSignalActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSendSignalActionEditPart.java
new file mode 100644
index 00000000000..cc47c74ba92
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSendSignalActionEditPart.java
@@ -0,0 +1,130 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendSignalActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomSendSignalActionEditPart.
+ */
+public class CustomSendSignalActionEditPart extends SendSignalActionEditPart {
+
+ /** The Constant USE_ORIGINAL_COLORS_VALUE. */
+ private static final boolean USE_ORIGINAL_COLORS_VALUE = false;
+
+ /** The Constant FLOATING_LABEL_OFFSET_WIDTH_VALUE. */
+ private static final int FLOATING_LABEL_OFFSET_WIDTH_VALUE = 10;
+
+ /** The Constant FLOATING_LABEL_OFFSET_HEIGHT_VALUE. */
+ private static final int FLOATING_LABEL_OFFSET_HEIGHT_VALUE = 10;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomSendSignalActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Creates the default edit policies.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * Creates the node plate.
+ *
+ * @return the node figure
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(125, 45);
+ return result;
+ }
+
+ /**
+ * Adds the border item.
+ *
+ * @param borderItemContainer
+ * the border item container
+ * @param borderItemEditPart
+ * the border item edit part
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default floating label offset height.
+ *
+ * @return the default floating label offset height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetHeight()
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetHeight() {
+ return FLOATING_LABEL_OFFSET_HEIGHT_VALUE;
+ }
+
+ /**
+ * Gets the default floating label offset width.
+ *
+ * @return the default floating label offset width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetWidth()
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return FLOATING_LABEL_OFFSET_WIDTH_VALUE;
+ }
+
+ /**
+ * Gets the default use original colors.
+ *
+ * @return the default use original colors
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultUseOriginalColors()
+ */
+ @Override
+ protected boolean getDefaultUseOriginalColors() {
+ return USE_ORIGINAL_COLORS_VALUE;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSequenceNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSequenceNodeEditPart.java
new file mode 100644
index 00000000000..b557ab91114
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomSequenceNodeEditPart.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomSequenceNodeEditPart.
+ */
+public class CustomSequenceNodeEditPart extends SequenceNodeEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 8;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 8;
+
+ /** The Constant DEFAULT_BORDER_STYLE. */
+ private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_DASH;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomSequenceNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+ /**
+ * Gets the default border style.
+ *
+ * @return the default border style
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultBorderStyle()
+ */
+ @Override
+ protected int getDefaultBorderStyle() {
+ return DEFAULT_BORDER_STYLE;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomStructuredActivityNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomStructuredActivityNodeEditPart.java
new file mode 100644
index 00000000000..bf53aea18e7
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomStructuredActivityNodeEditPart.java
@@ -0,0 +1,127 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomStructuredActivityNodeEditPart.
+ */
+public class CustomStructuredActivityNodeEditPart extends StructuredActivityNodeEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 8;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 8;
+
+ /** The Constant DEFAULT_BORDER_STYLE. */
+ private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_DASH;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomStructuredActivityNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+ /**
+ * Gets the default border style.
+ *
+ * @return the default border style
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultBorderStyle()
+ */
+ @Override
+ protected int getDefaultBorderStyle() {
+ return DEFAULT_BORDER_STYLE;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomUMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomUMLEditPartFactory.java
index 68ea69629e4..682cb09e659 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomUMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomUMLEditPartFactory.java
@@ -1,148 +1,246 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos - Initial API and implementation
- * Arthur Daussy Bug 366026 - [ActivityDiagram] Refactoring in order to try respect Generation Gap Pattern
- * Bug 366159 - [ActivityDiagram] Activity Diagram should be able to handle correctly Interruptible Edge
- * Bug 367279 - [Activity Diagram] Activity Diagram should be able to handle correctly Exception Handler element
- * Bug 368932 - [ActivitiyDiagram] Prevent Compartment of Activity group to be selected
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.part;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomActivityPartitionActivityPartitionContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomConditionalNodeStructuredActivityNodeContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomExpansionRegionStructuredActivityNodeContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomInterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomLoopNodeStructuredActivityNodeContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomSequenceNodeStructuredActivityNodeContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomStructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptTimeEventActionAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityActivityContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityPartitionActivityPartitionContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeStructuredActivityNodeContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ControlFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ControlFlowInterruptibleIconEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExceptionHandlerIconEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionStructuredActivityNodeContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeStructuredActivityNodeContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowInterruptibleIconEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowSelectionEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowTransformationEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeStructuredActivityNodeContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.UMLEditPartFactory;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-
-public class CustomUMLEditPartFactory extends UMLEditPartFactory {
-
- @Override
- public EditPart createEditPart(EditPart context, Object model) {
- if (model instanceof View) {
- View view = (View) model;
- switch (UMLVisualIDRegistry.getVisualID(view)) {
- case ControlFlowEditPart.VISUAL_ID:
- /*
- * To implement InterruptibleEdge interface
- */
- return new CustomControlFlowEditPart(view);
- case ObjectFlowSelectionEditPart.VISUAL_ID:
- /*
- * Customization to handle special image label
- */
- return new CustomObjectFlowSelectionEditPart(view);
- case ObjectFlowTransformationEditPart.VISUAL_ID:
- /*
- * Customization to handle special image label
- */
- return new CustomObjectFlowTransformationEditPart(view);
- case ControlFlowInterruptibleIconEditPart.VISUAL_ID:
- /*
- * Customization to handle special image label
- */
- return new CustomControlFlowInterruptibleIconEditPart(view);
- case ObjectFlowEditPart.VISUAL_ID:
- /*
- * To implement InterruptibleEdge interface
- */
- return new CustomObjectFlowEditPart(view);
- case ObjectFlowInterruptibleIconEditPart.VISUAL_ID:
- /*
- * Customization to handle special image label
- */
- return new CustomObjectFlowInterruptibleIconEditPart(view);
- case ExceptionHandlerIconEditPart.VISUAL_ID:
- /*
- * Customization to handle special image label
- */
- return new CustomExceptionHandlerIconEditPart(view);
- case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID:
- /*
- * Customization in order to make this compartment not selectable
- * Custom figure
- */
- return new CustomActivityPartitionActivityPartitionContentCompartmentEditPart(view);
- case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- /*
- * Customization in order to make this compartment not selectable
- * Custom figure
- */
- return new CustomStructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart(view);
- case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- /*
- * Customization in order to make this compartment not selectable
- * Custom figure
- */
- return new CustomExpansionRegionStructuredActivityNodeContentCompartmentEditPart(view);
- case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- /*
- * Customization in order to make this compartment not selectable
- * Custom figure
- */
- return new CustomLoopNodeStructuredActivityNodeContentCompartmentEditPart(view);
- case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- /*
- * Customization in order to make this compartment not selectable
- * Custom figure
- */
- return new CustomSequenceNodeStructuredActivityNodeContentCompartmentEditPart(view);
- case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- /*
- * Customization in order to make this compartment not selectable
- * Custom figure
- */
- return new CustomConditionalNodeStructuredActivityNodeContentCompartmentEditPart(view);
- case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID:
- /*
- * Customization in order to make this compartment not selectable
- * Custom figure
- */
- return new CustomInterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart(view);
- case ActivityActivityContentCompartmentEditPart.VISUAL_ID:
- /*
- * Customization in order to make this compartment not selectable
- * Custom figure
- */
- return new CustomActivityActivityContentCompartmentEditPart(view);
- case AcceptEventActionEditPart.VISUAL_ID:
- return new CustomAcceptEventActionEditPart(view);
- case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID:
- return new CustomAcceptTimeEventActionAppliedStereotypeEditPart(view);
-
- }
- }
- return super.createEditPart(context, model);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011 Atos.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos - Initial API and implementation
+ * Arthur Daussy Bug 366026 - [ActivityDiagram] Refactoring in order to try respect Generation Gap Pattern
+ * Bug 366159 - [ActivityDiagram] Activity Diagram should be able to handle correctly Interruptible Edge
+ * Bug 367279 - [Activity Diagram] Activity Diagram should be able to handle correctly Exception Handler element
+ * Bug 368932 - [ActivitiyDiagram] Prevent Compartment of Activity group to be selected
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomActivityPartitionActivityPartitionContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomConditionalNodeStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomExpansionRegionStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomInterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomLoopNodeStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomSequenceNodeStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup.CustomStructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptTimeEventActionAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityActivityContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityEditPartCN;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityFinalNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityParameterNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityPartitionActivityPartitionContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityPartitionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddStructuralFeatureValueActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallBehaviorActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallOperationActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ControlFlowEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ControlFlowInterruptibleIconEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.CreateObjectActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.DecisionNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.DestroyObjectActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExceptionHandlerIconEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.FlowFinalNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ForkNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.InitialNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.JoinNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.MergeNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowInterruptibleIconEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowSelectionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ObjectFlowTransformationEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.OpaqueActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadSelfActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadStructuralFeatureActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadVariableActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendObjectActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendSignalActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.UMLEditPartFactory;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ValueSpecificationActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+
+public class CustomUMLEditPartFactory extends UMLEditPartFactory {
+
+ @Override
+ public EditPart createEditPart(EditPart context, Object model) {
+ if (model instanceof View) {
+ View view = (View) model;
+ switch (UMLVisualIDRegistry.getVisualID(view)) {
+ case ControlFlowEditPart.VISUAL_ID:
+ /*
+ * To implement InterruptibleEdge interface
+ */
+ return new CustomControlFlowEditPart(view);
+ case ObjectFlowSelectionEditPart.VISUAL_ID:
+ /*
+ * Customization to handle special image label
+ */
+ return new CustomObjectFlowSelectionEditPart(view);
+ case ObjectFlowTransformationEditPart.VISUAL_ID:
+ /*
+ * Customization to handle special image label
+ */
+ return new CustomObjectFlowTransformationEditPart(view);
+ case ControlFlowInterruptibleIconEditPart.VISUAL_ID:
+ /*
+ * Customization to handle special image label
+ */
+ return new CustomControlFlowInterruptibleIconEditPart(view);
+ case ObjectFlowEditPart.VISUAL_ID:
+ /*
+ * To implement InterruptibleEdge interface
+ */
+ return new CustomObjectFlowEditPart(view);
+ case ObjectFlowInterruptibleIconEditPart.VISUAL_ID:
+ /*
+ * Customization to handle special image label
+ */
+ return new CustomObjectFlowInterruptibleIconEditPart(view);
+ case ExceptionHandlerIconEditPart.VISUAL_ID:
+ /*
+ * Customization to handle special image label
+ */
+ return new CustomExceptionHandlerIconEditPart(view);
+ case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID:
+ /*
+ * Customization in order to make this compartment not selectable
+ * Custom figure
+ */
+ return new CustomActivityPartitionActivityPartitionContentCompartmentEditPart(view);
+ case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ /*
+ * Customization in order to make this compartment not selectable
+ * Custom figure
+ */
+ return new CustomStructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart(view);
+ case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ /*
+ * Customization in order to make this compartment not selectable
+ * Custom figure
+ */
+ return new CustomExpansionRegionStructuredActivityNodeContentCompartmentEditPart(view);
+ case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ /*
+ * Customization in order to make this compartment not selectable
+ * Custom figure
+ */
+ return new CustomLoopNodeStructuredActivityNodeContentCompartmentEditPart(view);
+ case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ /*
+ * Customization in order to make this compartment not selectable
+ * Custom figure
+ */
+ return new CustomSequenceNodeStructuredActivityNodeContentCompartmentEditPart(view);
+ case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ /*
+ * Customization in order to make this compartment not selectable
+ * Custom figure
+ */
+ return new CustomConditionalNodeStructuredActivityNodeContentCompartmentEditPart(view);
+ case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID:
+ /*
+ * Customization in order to make this compartment not selectable
+ * Custom figure
+ */
+ return new CustomInterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart(view);
+ case ActivityActivityContentCompartmentEditPart.VISUAL_ID:
+ /*
+ * Customization in order to make this compartment not selectable
+ * Custom figure
+ */
+ return new CustomActivityActivityContentCompartmentEditPart(view);
+ case AcceptEventActionEditPart.VISUAL_ID:
+ return new CustomAcceptEventActionEditPart(view);
+ case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID:
+ return new CustomAcceptTimeEventActionAppliedStereotypeEditPart(view);
+ case ActivityPartitionEditPart.VISUAL_ID:
+ return new CustomActivityPartitionEditPart(view);
+ case BroadcastSignalActionEditPart.VISUAL_ID:
+ return new CustomBroadcastSignalActionEditPart(view);
+ case AddVariableValueActionEditPart.VISUAL_ID:
+ return new CustomAddVariableValueActionEditPart(view);
+ case InterruptibleActivityRegionEditPart.VISUAL_ID:
+ return new CustomInterruptibleActivityRegionEditPart(view);
+ case ExpansionRegionEditPart.VISUAL_ID:
+ return new CustomExpansionRegionEditPart(view);
+ case ConditionalNodeEditPart.VISUAL_ID:
+ return new CustomConditionalNodeEditPart(view);
+ case LoopNodeEditPart.VISUAL_ID:
+ return new CustomLoopNodeEditPart(view);
+ case SequenceNodeEditPart.VISUAL_ID:
+ return new CustomSequenceNodeEditPart(view);
+ case StructuredActivityNodeEditPart.VISUAL_ID:
+ return new CustomStructuredActivityNodeEditPart(view);
+ case CallBehaviorActionEditPart.VISUAL_ID:
+ return new CustomCallBehaviorActionEditPart(view);
+ case AddStructuralFeatureValueActionEditPart.VISUAL_ID:
+ return new CustomAddStructuralFeatureValueActionEditPart(view);
+ case CallOperationActionEditPart.VISUAL_ID:
+ return new CustomCallOperationActionEditPart(view);
+ case CreateObjectActionEditPart.VISUAL_ID:
+ return new CustomCreateObjectActionEditPart(view);
+ case DestroyObjectActionEditPart.VISUAL_ID:
+ return new CustomDestroyObjectActionEditPart(view);
+ case OpaqueActionEditPart.VISUAL_ID:
+ return new CustomOpaqueActionEditPart(view);
+ case ReadSelfActionEditPart.VISUAL_ID:
+ return new CustomReadSelfActionEditPart(view);
+ case ReadStructuralFeatureActionEditPart.VISUAL_ID:
+ return new CustomReadStructuralFeatureActionEditPart(view);
+ case ReadVariableActionEditPart.VISUAL_ID:
+ return new CustomReadVariableActionEditPart(view);
+ case SendObjectActionEditPart.VISUAL_ID:
+ return new CustomSendObjectActionEditPart(view);
+ case ValueSpecificationActionEditPart.VISUAL_ID:
+ return new CustomValueSpecificationActionEditPart(view);
+ case CentralBufferNodeEditPart.VISUAL_ID:
+ return new CustomCentralBufferNodeEditPart(view);
+ case DataStoreNodeEditPart.VISUAL_ID:
+ return new CustomDataStoreNodeEditPart(view);
+ case ActivityParameterNodeEditPart.VISUAL_ID:
+ return new CustomActivityParameterNodeEditPart(view);
+ case ActivityEditPart.VISUAL_ID:
+ return new CustomActivityEditPart(view);
+ case ActivityEditPartCN.VISUAL_ID:
+ return new CustomActivityEditPartCN(view);
+ case SendSignalActionEditPart.VISUAL_ID:
+ return new CustomSendSignalActionEditPart(view);
+ case ActivityFinalNodeEditPart.VISUAL_ID:
+ return new CustomActivityFinalNodeEditPart(view);
+ case DecisionNodeEditPart.VISUAL_ID:
+ return new CustomDecisionNodeEditPart(view);
+ case InitialNodeEditPart.VISUAL_ID:
+ return new CustomInitialNodeEditPart(view);
+ case FlowFinalNodeEditPart.VISUAL_ID:
+ return new CustomFlowFinalNodeEditPart(view);
+ case MergeNodeEditPart.VISUAL_ID:
+ return new CustomMergeNodeEditPart(view);
+ case ForkNodeEditPart.VISUAL_ID:
+ return new CustomForkNodeEditPart(view);
+ case JoinNodeEditPart.VISUAL_ID:
+ return new CustomJoinNodeEditPart(view);
+ }
+ }
+ return super.createEditPart(context, model);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomValueSpecificationActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomValueSpecificationActionEditPart.java
new file mode 100644
index 00000000000..0f0cf848e4a
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/CustomValueSpecificationActionEditPart.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ValueSpecificationActionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomValueSpecificationActionEditPart extends ValueSpecificationActionEditPart {
+
+ /** The Constant CORNER_HEIGHT. */
+ private static final int CORNER_HEIGHT = 15;
+
+ /** The Constant CORNER_WIDTH. */
+ private static final int CORNER_WIDTH = 15;
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ * the view
+ */
+ public CustomValueSpecificationActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#createNodePlate()
+ *
+ * @return
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(-20, 40);
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ *
+ * @param borderItemContainer
+ * @param borderItemEditPart
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * Gets the default corner height.
+ *
+ * @return the default corner height
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width.
+ *
+ * @return the default corner width
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return CORNER_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/RoundedUMLNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/RoundedUMLNodeEditPart.java
new file mode 100644
index 00000000000..e4b28a7691f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/part/RoundedUMLNodeEditPart.java
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.part;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.PapyrusRoundedEditPartHelper;
+import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+
+/**
+ * The Class RoundedCompartmentEditPart.
+ */
+public abstract class RoundedUMLNodeEditPart extends UMLNodeEditPart {
+
+ /** The Constant DEFAULT_BORDER_STYLE. */
+ private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_SOLID;
+
+ /** The Constant DEFAULT_CORNER_HEIGHT. */
+ private static final int DEFAULT_CORNER_HEIGHT = 0;
+
+ /** The Constant DEFAULT_CORNER_WIDTH. */
+ private static final int DEFAULT_CORNER_WIDTH = 0;
+
+ private static final int[] DEFAULT_CUTOM_DASH = new int[] { 5, 5 };
+
+ /** The Constant DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT. */
+ private static final int DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT = 0;
+
+ /** The Constant DEFAULT_FLOATING_LABEL_OFFSET_WIDTH. */
+ private static final int DEFAULT_FLOATING_LABEL_OFFSET_WIDTH = 0;
+
+ /** The Constant DEFAULT_IS_FLOATING_LABEL_CONSTRAINED. */
+ private static final boolean DEFAULT_IS_FLOATING_LABEL_CONSTRAINED = false;
+
+ /** The Constant DEFAULT_IS_OVAL. */
+ private static final boolean DEFAULT_IS_OVAL = false;
+
+ private static final boolean DEFAULT_HAS_HEADER = false;
+
+ /**
+ * Instantiates a new rounded compartment edit part.
+ *
+ * @param view
+ * the view
+ */
+ public RoundedUMLNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ // Install Edit Policy to Hide/show compartment, in particular for the symbol compartment
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ }
+
+ /**
+ * Gets the default border style.
+ *
+ * @return the default border style
+ */
+ protected int getDefaultBorderStyle() {
+ return DEFAULT_BORDER_STYLE;
+ }
+
+ /**
+ * Gets the default corner height value.
+ *
+ * @return the default corner height value
+ */
+ protected int getDefaultCornerHeight() {
+ return DEFAULT_CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width value.
+ *
+ * @return the default corner width value
+ */
+ protected int getDefaultCornerWidth() {
+ return DEFAULT_CORNER_WIDTH;
+ }
+
+ /**
+ * @return
+ */
+ private int[] getDefaultCutomDash() {
+ return DEFAULT_CUTOM_DASH;
+ }
+
+ /**
+ * Gets the default floating name offset height.
+ *
+ * @return the default floating name offset height
+ */
+ protected int getDefaultFloatingLabelOffsetHeight() {
+ return DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT;
+ }
+
+ /**
+ * Gets the default floating name offset width.
+ *
+ * @return the default floating name offset width
+ */
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return DEFAULT_FLOATING_LABEL_OFFSET_WIDTH;
+ }
+
+ /**
+ * Gets the default is name constrained.
+ *
+ * @return the default is name constrained
+ */
+ protected boolean getDefaultIsFloatingNameConstrained() {
+ return DEFAULT_IS_FLOATING_LABEL_CONSTRAINED;
+ }
+
+ /**
+ * Gets the default is oval value.
+ *
+ * @return the default is oval value
+ */
+ protected boolean getDefaultIsOvalValue() {
+ return DEFAULT_IS_OVAL;
+ }
+
+ /**
+ * @return
+ */
+ private boolean getDefaultUseOriginalColors() {
+ return true;
+ }
+
+ /**
+ * Refresh visuals.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#refreshVisuals()
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ PapyrusRoundedEditPartHelper.refreshRadius(this, getDefaultCornerWidth(), getDefaultCornerHeight());
+ PapyrusRoundedEditPartHelper.refreshOval(this, getDefaultIsOvalValue());
+ PapyrusRoundedEditPartHelper.refreshFloatingName(this, getDefaultIsFloatingNameConstrained(), getDefaultFloatingLabelOffsetWidth(), getDefaultFloatingLabelOffsetHeight());
+ PapyrusRoundedEditPartHelper.refreshBorderStyle(this, getDefaultBorderStyle(), getDefaultCutomDash());
+ PapyrusRoundedEditPartHelper.refreshHasHeader(this, getDefaultHasHeader());
+ super.refreshVisuals();
+ }
+
+ /**
+ * @return
+ */
+ protected boolean getDefaultHasHeader() {
+ return DEFAULT_HAS_HEADER;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/AcceptEventActionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/AcceptEventActionFigure.java
index 8a467c7061a..391c21754ba 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/AcceptEventActionFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/AcceptEventActionFigure.java
@@ -1,388 +1,378 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.Tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.activity.figures;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.ScalablePolygonShape;
-import org.eclipse.draw2d.geometry.Insets;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.uml.diagram.activity.draw2d.CenteredColumnConstraint;
-import org.eclipse.papyrus.uml.diagram.activity.draw2d.CenteredColumnLayout;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.CenterLayout;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.StereotypeFigureHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * add time template, make margin border relative, use StereotypeFigureHelper
- */
-
-public class AcceptEventActionFigure extends ScalablePolygonShape implements IPapyrusNodeUMLElementFigure, IPapyrusNodeFigure {
-
- /**
- * this label is internal to the figure and represents the name of the acceptEventAction
- */
- private CenteredWrappedLabel fAcceptEventActionLabel;
-
- private final Insets marginTemplate;
-
- /** The helper which handles stereotype aspects */
- private StereotypeFigureHelper stereotypeHelper;
-
- public AcceptEventActionFigure() {
- CenteredColumnLayout layoutThis = new CenteredColumnLayout();
- this.setLayoutManager(layoutThis);
- this.addPoint(new Point(0, 0));
- this.addPoint(new Point(200, 0));
- this.addPoint(new Point(200, 50));
- this.addPoint(new Point(0, 50));
- this.addPoint(new Point(50, 25));
- // add time template
- this.addTimePoint(new Point(0, 0));
- this.addTimePoint(new Point(100, 0));
- this.addTimePoint(new Point(50, 25));
- this.addTimePoint(new Point(100, 50));
- this.addTimePoint(new Point(0, 50));
- this.addTimePoint(new Point(50, 25));
- this.setFill(true);
- this.setLineWidth(1);
- // make margin border relative
- marginTemplate = new Insets(0, 50, 0, 0);
- this.setBorder(new MarginBorder(marginTemplate));
- createContents();
- // use StereotypeFigureHelper
- stereotypeHelper = new StereotypeFigureHelper(this) {
-
- @Override
- public Object getStereotypeRectangleConstraint() {
- CenteredColumnConstraint constraintStereotypeRect0 = new CenteredColumnConstraint(false);
- return constraintStereotypeRect0;
- }
- };
- }
-
- /**
- * This method is used to create the content into the figure, in our case this is the label of the acceptEventAction
- */
- private void createContents() {
- RectangleFigure labelRect0 = new RectangleFigure();
- labelRect0.setFill(false);
- labelRect0.setOutline(false);
- labelRect0.setLineWidth(1);
- // use CenteredColumnConstraint
- CenteredColumnConstraint constraintLabelRect0 = new CenteredColumnConstraint(true);
- this.add(labelRect0, constraintLabelRect0);
- CenterLayout layoutLabelRect0 = new CenterLayout();
- labelRect0.setLayoutManager(layoutLabelRect0);
- fAcceptEventActionLabel = new CenteredWrappedLabel();
- // fAcceptEventActionLabel.setBorder(new MarginBorder(5, 5, 5, 5));
- labelRect0.add(fAcceptEventActionLabel);
- }
-
-
- private final PointList myTemplate = new PointList();
-
-
- private Rectangle myTemplateBounds;
-
-
- @Override
- public void addPoint(Point point) {
- myTemplate.addPoint(point);
- myTemplateBounds = null;
- }
-
- /**
- * Refresh the layout of the figure
- */
- protected void refreshLayout() {
- }
-
- /** The value to display as stereotype display when available */
- String stereotypeDisplayText = null;
-
- /** The value to display as stereotype display when available */
- Image stereotypeDisplayImg = null;
-
- /**
- * Sets the stereotypes for this figure.
- *
- * @param stereotypes
- * the string representing the stereotypes to be displayed
- * @param image
- * the image representing the stereotypes to be displayed
- * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure#setStereotypeDisplay(java.lang.String, org.eclipse.swt.graphics.Image)
- */
- @Override
- public void setStereotypeDisplay(String stereotypes, Image image) {
- if (!isTemplateForAcceptTimeEventActionUsed()) {
- stereotypeHelper.setStereotypeDisplay(stereotypes, image);
- refreshLayout();
- }
- // record values in case figure changes
- stereotypeDisplayText = stereotypes;
- stereotypeDisplayImg = image;
- }
-
- /** The value to display as stereotype in brace when available */
- String stereotypePropertiesInBrace = null;
-
- /**
- * Sets the stereotypes properties for this figure.
- *
- * @param stereotypeProperties
- * the string representing the stereotype properties to be displayed
- */
- @Override
- public void setStereotypePropertiesInBrace(String stereotypeProperties) {
- if (!isTemplateForAcceptTimeEventActionUsed()) {
- stereotypeHelper.setStereotypePropertiesInBrace(stereotypeProperties);
- refreshLayout();
- }
- // record values in case figure changes
- stereotypePropertiesInBrace = stereotypeProperties;
- }
-
- /** The value to display as stereotype in brace when available */
- String stereotypePropertiesInCompartment = null;
-
- /**
- * displays the new string corresponding to the list of stereotypes.
- *
- * @param stereotypeProperties
- * the string to be displayed.
- */
- @Override
- public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
- if (!isTemplateForAcceptTimeEventActionUsed()) {
- stereotypeHelper.setStereotypePropertiesInCompartment(stereotypeProperties);
- refreshLayout();
- }
- // record values in case figure changes
- stereotypePropertiesInCompartment = stereotypeProperties;
- }
-
- /**
- * Gets the stereotype label.
- *
- * @return the stereotype label
- * @unused
- * @deprecated
- */
- @Override
- @Deprecated
- public Label getStereotypesLabel() {
- return null;// fActionStereotypeLabel;
- }
-
- /**
- * @generated
- */
- private final PointList myTemplateTime = new PointList();
-
- /**
- * @generated
- */
- private boolean useTemplateTime = false;
-
- /**
- * Set whether the figure must use the classic concave pentagon template for AcceptEventAction or the hourglass template for
- * AcceptTimeEventAction
- *
- * @param useAcceptTimeEventActionTemplate
- * true if the hourglass template must be used, false for default template
- */
- public void useTemplateForAcceptTimeEventAction(boolean useAcceptTimeEventActionTemplate) {
- if (useAcceptTimeEventActionTemplate) {
- // erase stereotypes representation in block
- stereotypeHelper.setStereotypeDisplay(null, null);
- stereotypeHelper.setStereotypePropertiesInBrace(null);
- stereotypeHelper.setStereotypePropertiesInCompartment(null);
- } else {
- // restore stereotypes representation in block
- stereotypeHelper.setStereotypeDisplay(stereotypeDisplayText, stereotypeDisplayImg);
- stereotypeHelper.setStereotypePropertiesInBrace(stereotypePropertiesInBrace);
- stereotypeHelper.setStereotypePropertiesInCompartment(stereotypePropertiesInCompartment);
- }
- useTemplateTime = useAcceptTimeEventActionTemplate;
- }
-
- /**
- * Ask whether the figure uses the classic concave pentagon template for AcceptEventAction or the hourglass template for
- * AcceptTimeEventAction
- *
- * @return true if the hourglass template is used, false for default template
- */
- public boolean isTemplateForAcceptTimeEventActionUsed() {
- return useTemplateTime;
- }
-
- private Rectangle myTemplateTimeBounds;
-
- public void addTimePoint(Point point) {
- myTemplateTime.addPoint(point);
- myTemplateTimeBounds = null;
- }
-
- @Override
- protected void fillShape(Graphics graphics) {
- Rectangle bounds = getBounds();
- graphics.pushState();
- graphics.translate(bounds.x, bounds.y);
- graphics.fillPolygon(scalePointList());
- graphics.popState();
- // refresh relative margin
- Insets newInsets = scaleMargin();
- if (!newInsets.equals(getBorder().getInsets(this))) {
- this.setBorder(new MarginBorder(scaleMargin()));
- }
- }
-
- @Override
- protected void outlineShape(Graphics graphics) {
- Rectangle bounds = getBounds();
- graphics.pushState();
- graphics.translate(bounds.x, bounds.y);
- graphics.setLineWidth(Math.max(1, getLineWidth()));
- graphics.drawPolygon(scalePointList());
- graphics.popState();
- }
-
- private Insets scaleMargin() {
- 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 marginTemplate;
- }
- Insets scaled = new Insets(marginTemplate);
- scaled.top = (int) Math.floor(scaled.top * yScale);
- scaled.left = (int) Math.floor(scaled.left * xScale);
- scaled.bottom = (int) Math.floor(scaled.bottom * yScale);
- scaled.right = (int) Math.floor(scaled.right * xScale);
- return scaled;
- }
-
- /**
- * switch between the two templates
- */
- 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;
- }
- }
- // switch between the two templates : create the second template bounds
- if (myTemplateTimeBounds == null) {
- myTemplateTimeBounds = myTemplateTime.getBounds().getCopy().union(0, 0);
- // just safety -- we are going to use this as divider
- if (myTemplateTimeBounds.width < 1) {
- myTemplateTimeBounds.width = 1;
- }
- if (myTemplateTimeBounds.height < 1) {
- myTemplateTimeBounds.height = 1;
- }
- }
- // switch between the two templates : choose appropriate one
- if (useTemplateTime) {
- return myTemplateTimeBounds;
- } else {
- return myTemplateBounds;
- }
- }
-
- 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) {
- // switch between the two templates
- if (useTemplateTime) {
- return myTemplateTime.toIntArray();
- } else {
- return myTemplate.toIntArray();
- }
- }
- // switch between the two templates
- int[] scaled;
- if (useTemplateTime) {
- scaled = myTemplateTime.toIntArray().clone();
- } else {
- scaled = 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;
- }
-
- /**
- * @generated
- */
- public CenteredWrappedLabel getAcceptEventActionLabel() {
- return fAcceptEventActionLabel;
- }
-
- @Override
- public Color getBorderColor() {
- return null;
- }
-
- @Override
- public boolean isShadow() {
- return false;
- }
-
- @Override
- public void setBorderColor(Color borderColor) {
-
- }
-
- @Override
- public void setShadow(boolean shadow) {
-
- }
-
- @Override
- public void setTransparency(int transparency) {
-
- }
-
- @Override
- public void setGradientData(int gradientColor1, int gradientColor2, int gradientStyle) {
- }
-
- @Override
- public void setIsUsingGradient(boolean b) {
-
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.Tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.figures;
+
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.papyrus.uml.diagram.activity.draw2d.CenteredColumnConstraint;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.StereotypeFigureHelper;
+import org.eclipse.swt.graphics.Image;
+
+
+/**
+ * add time template, make margin border relative, use StereotypeFigureHelper
+ */
+
+public class AcceptEventActionFigure extends RoundedCompartmentFigure {
+
+ /**
+ * this label is internal to the figure and represents the name of the acceptEventAction
+ */
+ // private CenteredWrappedLabel fAcceptEventActionLabel;
+
+ // private final Insets marginTemplate;
+
+ /** The helper which handles stereotype aspects */
+ private StereotypeFigureHelper stereotypeHelper;
+
+ public AcceptEventActionFigure() {
+ // CenteredColumnLayout layoutThis = new CenteredColumnLayout();
+ // this.setLayoutManager(layoutThis);
+ // this.addPoint(new Point(0, 0));
+ // this.addPoint(new Point(200, 0));
+ // this.addPoint(new Point(200, 50));
+ // this.addPoint(new Point(0, 50));
+ // this.addPoint(new Point(50, 25));
+ // // add time template
+ // this.addTimePoint(new Point(0, 0));
+ // this.addTimePoint(new Point(100, 0));
+ // this.addTimePoint(new Point(50, 25));
+ // this.addTimePoint(new Point(100, 50));
+ // this.addTimePoint(new Point(0, 50));
+ // this.addTimePoint(new Point(50, 25));
+ // this.setFill(true);
+ // this.setLineWidth(1);
+ // make margin border relative
+ // marginTemplate = new Insets(0, 50, 0, 0);
+ // this.setBorder(new MarginBorder(marginTemplate));
+ createContents();
+ // use StereotypeFigureHelper
+ stereotypeHelper = new StereotypeFigureHelper(this) {
+
+ @Override
+ public Object getStereotypeRectangleConstraint() {
+ CenteredColumnConstraint constraintStereotypeRect0 = new CenteredColumnConstraint(false);
+ return constraintStereotypeRect0;
+ }
+ };
+ }
+
+ /**
+ * This method is used to create the content into the figure, in our case this is the label of the acceptEventAction
+ */
+ private void createContents() {
+ // RectangleFigure labelRect0 = new RectangleFigure();
+ // labelRect0.setFill(false);
+ // labelRect0.setOutline(false);
+ // labelRect0.setLineWidth(1);
+ // // use CenteredColumnConstraint
+ // CenteredColumnConstraint constraintLabelRect0 = new CenteredColumnConstraint(true);
+ // this.add(labelRect0, constraintLabelRect0);
+ // CenterLayout layoutLabelRect0 = new CenterLayout();
+ // labelRect0.setLayoutManager(layoutLabelRect0);
+ // fAcceptEventActionLabel = new CenteredWrappedLabel();
+ // fAcceptEventActionLabel.setBorder(new MarginBorder(5, 5, 5, 5));
+ // this.add(fAcceptEventActionLabel);
+ }
+
+ //
+ //
+ // private final PointList myTemplate = new PointList();
+ //
+ //
+ // private Rectangle myTemplateBounds;
+
+ //
+ // @Override
+ // public void addPoint(Point point) {
+ // myTemplate.addPoint(point);
+ // myTemplateBounds = null;
+ // }
+
+ /**
+ * Refresh the layout of the figure
+ */
+ protected void refreshLayout() {
+ }
+
+ /** The value to display as stereotype display when available */
+ String stereotypeDisplayText = null;
+
+ /** The value to display as stereotype display when available */
+ Image stereotypeDisplayImg = null;
+
+ /**
+ * Sets the stereotypes for this figure.
+ *
+ * @param stereotypes
+ * the string representing the stereotypes to be displayed
+ * @param image
+ * the image representing the stereotypes to be displayed
+ * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure#setStereotypeDisplay(java.lang.String, org.eclipse.swt.graphics.Image)
+ */
+ @Override
+ public void setStereotypeDisplay(String stereotypes, Image image) {
+ if (!isTemplateForAcceptTimeEventActionUsed()) {
+ stereotypeHelper.setStereotypeDisplay(stereotypes, image);
+ refreshLayout();
+ }
+ // record values in case figure changes
+ stereotypeDisplayText = stereotypes;
+ stereotypeDisplayImg = image;
+ }
+
+ /** The value to display as stereotype in brace when available */
+ String stereotypePropertiesInBrace = null;
+
+ /**
+ * Sets the stereotypes properties for this figure.
+ *
+ * @param stereotypeProperties
+ * the string representing the stereotype properties to be displayed
+ */
+ @Override
+ public void setStereotypePropertiesInBrace(String stereotypeProperties) {
+ if (!isTemplateForAcceptTimeEventActionUsed()) {
+ stereotypeHelper.setStereotypePropertiesInBrace(stereotypeProperties);
+ refreshLayout();
+ }
+ // record values in case figure changes
+ stereotypePropertiesInBrace = stereotypeProperties;
+ }
+
+ /** The value to display as stereotype in brace when available */
+ String stereotypePropertiesInCompartment = null;
+
+ /**
+ * displays the new string corresponding to the list of stereotypes.
+ *
+ * @param stereotypeProperties
+ * the string to be displayed.
+ */
+ @Override
+ public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
+ if (!isTemplateForAcceptTimeEventActionUsed()) {
+ stereotypeHelper.setStereotypePropertiesInCompartment(stereotypeProperties);
+ refreshLayout();
+ }
+ // record values in case figure changes
+ stereotypePropertiesInCompartment = stereotypeProperties;
+ }
+
+ /**
+ * Gets the stereotype label.
+ *
+ * @return the stereotype label
+ * @unused
+ * @deprecated
+ */
+ // @Override
+ // @Deprecated
+ // public Label getStereotypesLabel() {
+ // return null;// fActionStereotypeLabel;
+ // }
+
+ /**
+ * @generated
+ */
+ private final PointList myTemplateTime = new PointList();
+
+ /**
+ * @generated
+ */
+ private boolean useTemplateTime = false;
+
+ /**
+ * Set whether the figure must use the classic concave pentagon template for AcceptEventAction or the hourglass template for
+ * AcceptTimeEventAction
+ *
+ * @param useAcceptTimeEventActionTemplate
+ * true if the hourglass template must be used, false for default template
+ */
+ public void useTemplateForAcceptTimeEventAction(boolean useAcceptTimeEventActionTemplate) {
+ if (useAcceptTimeEventActionTemplate) {
+ // erase stereotypes representation in block
+ stereotypeHelper.setStereotypeDisplay(null, null);
+ stereotypeHelper.setStereotypePropertiesInBrace(null);
+ stereotypeHelper.setStereotypePropertiesInCompartment(null);
+ } else {
+ // restore stereotypes representation in block
+ stereotypeHelper.setStereotypeDisplay(stereotypeDisplayText, stereotypeDisplayImg);
+ stereotypeHelper.setStereotypePropertiesInBrace(stereotypePropertiesInBrace);
+ stereotypeHelper.setStereotypePropertiesInCompartment(stereotypePropertiesInCompartment);
+ }
+ useTemplateTime = useAcceptTimeEventActionTemplate;
+ }
+
+ /**
+ * Ask whether the figure uses the classic concave pentagon template for AcceptEventAction or the hourglass template for
+ * AcceptTimeEventAction
+ *
+ * @return true if the hourglass template is used, false for default template
+ */
+ public boolean isTemplateForAcceptTimeEventActionUsed() {
+ return useTemplateTime;
+ }
+
+ // private Rectangle myTemplateTimeBounds;
+
+ // public void addTimePoint(Point point) {
+ // myTemplateTime.addPoint(point);
+ // myTemplateTimeBounds = null;
+ // }
+
+ //
+ // @Override
+ // protected void fillShape(Graphics graphics) {
+ // Rectangle bounds = getBounds();
+ // graphics.pushState();
+ // graphics.translate(bounds.x, bounds.y);
+ // graphics.fillPolygon(scalePointList());
+ // graphics.popState();
+ // // refresh relative margin
+ // Insets newInsets = scaleMargin();
+ // if (!newInsets.equals(getBorder().getInsets(this))) {
+ // this.setBorder(new MarginBorder(scaleMargin()));
+ // }
+ // }
+
+ // @Override
+ // protected void outlineShape(Graphics graphics) {
+ // Rectangle bounds = getBounds();
+ // graphics.pushState();
+ // graphics.translate(bounds.x, bounds.y);
+ // graphics.setLineWidth(Math.max(1, getLineWidth()));
+ // graphics.drawPolygon(scalePointList());
+ // graphics.popState();
+ // }
+
+ // private Insets scaleMargin() {
+ // 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 marginTemplate;
+ // }
+ // Insets scaled = new Insets(marginTemplate);
+ // scaled.top = (int) Math.floor(scaled.top * yScale);
+ // scaled.left = (int) Math.floor(scaled.left * xScale);
+ // scaled.bottom = (int) Math.floor(scaled.bottom * yScale);
+ // scaled.right = (int) Math.floor(scaled.right * xScale);
+ // return scaled;
+ // }
+
+ // /**
+ // * switch between the two templates
+ // */
+ // 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;
+ // }
+ // }
+ // // switch between the two templates : create the second template bounds
+ // if (myTemplateTimeBounds == null) {
+ // myTemplateTimeBounds = myTemplateTime.getBounds().getCopy().union(0, 0);
+ // // just safety -- we are going to use this as divider
+ // if (myTemplateTimeBounds.width < 1) {
+ // myTemplateTimeBounds.width = 1;
+ // }
+ // if (myTemplateTimeBounds.height < 1) {
+ // myTemplateTimeBounds.height = 1;
+ // }
+ // }
+ // // switch between the two templates : choose appropriate one
+ // if (useTemplateTime) {
+ // return myTemplateTimeBounds;
+ // } else {
+ // return myTemplateBounds;
+ // }
+ // }
+
+ // 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) {
+ // // switch between the two templates
+ // if (useTemplateTime) {
+ // return myTemplateTime.toIntArray();
+ // } else {
+ // return myTemplate.toIntArray();
+ // }
+ // }
+ // // switch between the two templates
+ // int[] scaled;
+ // if (useTemplateTime) {
+ // scaled = myTemplateTime.toIntArray().clone();
+ // } else {
+ // scaled = 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;
+ // }
+
+ // /**
+ // * @generated
+ // */
+ // public CenteredWrappedLabel getAcceptEventActionLabel() {
+ // return fAcceptEventActionLabel;
+ // // return getNameLabel();
+ // }
+
+ // @Override
+ // public Color getBorderColor() {
+ // return null;
+ // }
+ //
+ // @Override
+ // public boolean isShadow() {
+ // return false;
+ // }
+ //
+ // @Override
+ // public void setBorderColor(Color borderColor) {
+ //
+ // }
+ //
+ // @Override
+ // public void setShadow(boolean shadow) {
+ //
+ // }
+ //
+ // @Override
+ // public void setTransparency(int transparency) {
+ //
+ // }
+ //
+ // @Override
+ // public void setGradientData(int gradientColor1, int gradientColor2, int gradientStyle) {
+ // }
+ //
+ // @Override
+ // public void setIsUsingGradient(boolean b) {
+ //
+ // }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java
index 5406d5ae114..8ff972a6dd9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityFigure.java
@@ -1,484 +1,484 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.activity.figures;
-
-import java.util.List;
-
-import org.eclipse.draw2d.AbstractLayout;
-import org.eclipse.draw2d.BorderLayout;
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.GridData;
-import org.eclipse.draw2d.GridLayout;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.RoundedRectangle;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-
-/**
- * Activity figure for the activity diagram
- *
- * @author PT202707
- *
- */
-public class ActivityFigure extends PapyrusRoundedNodeFigure {
-
- /**
- * gap in x to display name stereotypes and qualified name
- */
- protected final int GAP_X = 10;
-
- /**
- * gap in y to display the first label at the top of the package
- */
- protected final int GAP_Y = 5;
-
- /**
- * this is the layout manager in charge to place element in the enumeration
- *
- */
- private class ActivityLayoutManager extends AbstractLayout {
-
- /**
- * ---------------------------------------------------| |sterotypeLabel|
- * precondition | |--------------| | |QualifiedName
- * |-----------------------------------| |--------------| | |name |
- * postcondition | |--------------------------------------------------|
- * | stereotype compartment |
- * |--------------------------------------------------| |parameter | |
- * |----------- | | activity content |
- * ----------------------------------------------------
- *
- * {@inheritDoc}
- */
- @Override
- protected Dimension calculatePreferredSize(IFigure container, int hint, int hint2) {
- int minimumWith = 0;
- int minimumHeight = 0;
- // take in account the content of the figure activity
- if ((getContentFigure().getChildren().size() > 0)) {
- IFigure content = (IFigure) getContentFigure().getChildren().get(0);
- minimumWith = content.getPreferredSize().width + 50;
- minimumHeight = content.getPreferredSize().height + 50;
- }
- // display name
- if (getNameLabel() != null) {
- if (getNameLabel().getPreferredSize().width > minimumWith) {
- minimumWith = getNameLabel().getPreferredSize().width;
- }
- minimumHeight += getNameLabel().getPreferredSize().height;
- }
- if (getHeaderSingleExecution() != null) {
- if (getHeaderSingleExecution().getBounds().getTopRight().x > minimumWith) {
- minimumWith = getHeaderSingleExecution().getBounds().getTopRight().x;
- }
- }
- return new Dimension(minimumWith, minimumHeight);
- }
-
- /**
- *
- * {@inheritDoc}
- */
- @Override
- public void layout(IFigure container) {
- List childrenList = container.getChildren();
- for (int i = 0; i < container.getChildren().size(); i++) {
- Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds());
- bound.setSize(((IFigure) childrenList.get(i)).getPreferredSize());
- if (i > 0) {
- bound.y = ((IFigure) childrenList.get(i - 1)).getBounds().getBottomLeft().y + 1;
- bound.x = getBounds().x + GAP_X;
- } else {
- bound.x = getBounds().x + GAP_X;
- bound.y = getBounds().y + GAP_Y;
- }
- ((IFigure) childrenList.get(i)).setBounds(bound);
- }
- // container
- Rectangle lastRectangle = getContentFigure().getBounds();
- lastRectangle.height = getBounds().y + getBounds().height - lastRectangle.y;
- lastRectangle.x = container.getBounds().x;
- lastRectangle.width = getBounds().width;
- getContentFigure().setBounds(lastRectangle);
- if (getGMFContentContainer() != null) {
- getGMFContentContainer().setBounds(lastRectangle);
- }
- // place precondition
- // setX
- Rectangle preconditionBound = getPreconditionFigure().getBounds().getCopy();
- preconditionBound.x = getNameLabel().getBounds().getTopRight().x + GAP_X;
- // take in account stereotype label
- if (getStereotypesLabel() != null) {
- int posStererotypeLabel = getStereotypesLabel().getBounds().getTopRight().x + GAP_X;
- if (posStererotypeLabel > preconditionBound.x) {
- preconditionBound.x = posStererotypeLabel;
- }
- }
- // take in account qualified name
- if (getQualifiedNameLabel() != null) {
- int posqualifiedName = getQualifiedNameLabel().getBounds().getTopRight().x + GAP_X;
- if (posqualifiedName > preconditionBound.x) {
- preconditionBound.x = posqualifiedName;
- }
- }
- // take in account stereotype properties
- if (stereotypePropertiesInBraceContent != null) {
- int possterotypeInBrace = stereotypePropertiesInBraceContent.getBounds().getTopRight().x + GAP_X;
- if (possterotypeInBrace > preconditionBound.x) {
- preconditionBound.x = possterotypeInBrace;
- }
- }
- // take in account parameter figure
- if (getParameterFigure() != null) {
- int posparameter = getParameterFigure().getBounds().getTopRight().x + GAP_X;
- if (posparameter > preconditionBound.x) {
- preconditionBound.x = posparameter;
- }
- }
- // setY
- preconditionBound.y = ((IFigure) container.getChildren().get(0)).getBounds().y;
- getPreconditionFigure().setBounds(preconditionBound);
- if (getPreconditionFigure().getChildren().size() > 0) {
- ((IFigure) getPreconditionFigure().getChildren().get(0)).setBounds(preconditionBound);
- ;
- }
- // setPoscondtion
- Rectangle postconditionBound = getPostconditionFigure().getBounds().getCopy();
- postconditionBound.x = getPreconditionFigure().getBounds().x;
- postconditionBound.y = getPreconditionFigure().getBounds().y + getPreconditionFigure().getBounds().height + GAP_Y;
- getPostconditionFigure().setBounds(postconditionBound);
- if (getPostconditionFigure().getChildren().size() > 0) {
- ((IFigure) getPostconditionFigure().getChildren().get(0)).setBounds(postconditionBound);
- ;
- }
- // setPoscondtion
- Rectangle singleExecutionBound = getHeaderSingleExecution().getBounds().getCopy();
- singleExecutionBound.x = getPreconditionFigure().getBounds().x + getPreconditionFigure().getBounds().width + GAP_X;
- ;
- singleExecutionBound.y = getPreconditionFigure().getBounds().y;
- getHeaderSingleExecution().setBounds(singleExecutionBound);
- // replace compartment stereotype properties
- if (getStereotypePropertiesContent() != null) {
- Rectangle pscontainer = getStereotypePropertiesContent().getBounds().getCopy();
- if (getPostconditionFigure().getBounds().y + getPostconditionFigure().getBounds().height + GAP_Y > pscontainer.y) {
- pscontainer.y = getPostconditionFigure().getBounds().y + getPostconditionFigure().getBounds().height + GAP_Y;
- }
- getStereotypePropertiesContent().setBounds(pscontainer);
- }
- // place parameter
- // replace compartment stereotype properties
- if (getStereotypePropertiesContent() != null) {
- Rectangle paramBoundcontainer = getParameterFigure().getBounds().getCopy();
- paramBoundcontainer.y = getStereotypePropertiesContent().getBounds().getBottomLeft().y;
- getParameterFigure().setBounds(paramBoundcontainer);
- if (getParameterFigure().getChildren().size() > 0) {
- ((IFigure) shapeCompartment.getChildren().get(0)).setBounds(paramBoundcontainer);
- }
- } else {
- Rectangle paramBoundcontainer = getParameterFigure().getBounds().getCopy();
- paramBoundcontainer.y = getNameLabel().getBounds().getBottomLeft().y;
- getParameterFigure().setBounds(paramBoundcontainer);
- if (getParameterFigure().getChildren().size() > 0) {
- ((IFigure) shapeCompartment.getChildren().get(0)).setBounds(paramBoundcontainer);
- ;
- }
- }
- }
- }
-
- /**
- * @generated
- */
- private WrappingLabel fHeaderLabel;
-
- /**
- * @generated
- */
- private RectangleFigure fActivityParametersCompartment;
-
- /**
- * @generated
- */
- private RectangleFigure fActivityPreconditionsCompartment;
-
- /**
- * @generated
- */
- private RectangleFigure fActivityPostconditionsCompartment;
-
- /**
- * @generated
- */
- protected WrappingLabel fHeaderSingleExecution;
-
- /**
- * @generated
- */
- private RectangleFigure fCompartmentFigure;
-
- private RectangleFigure shapeCompartment;
-
- private RectangleFigure preconditionFigure;
-
- private RectangleFigure postconditionFigure;
-
- private RectangleFigure parameterFigure;
-
- /**
- * @generated
- */
- public ActivityFigure() {
- super();
- setLayoutManager(new ActivityLayoutManager());
- shapeCompartment = new RectangleFigure();
- shapeCompartment.setOpaque(false);
- shapeCompartment.setFill(false);
- shapeCompartment.setOutline(false);
- shapeCompartment.setLineWidth(0);
- add(shapeCompartment);
- preconditionFigure = new RectangleFigure();
- preconditionFigure.setOpaque(false);
- preconditionFigure.setFill(false);
- preconditionFigure.setOutline(false);
- preconditionFigure.setLineWidth(10);
- preconditionFigure.setBorder(null);
- preconditionFigure.setForegroundColor(ColorConstants.red);
- add(preconditionFigure);
- parameterFigure = new RectangleFigure();
- parameterFigure.setOpaque(false);
- parameterFigure.setFill(false);
- parameterFigure.setOutline(false);
- parameterFigure.setLineWidth(0);
- add(parameterFigure);
- postconditionFigure = new RectangleFigure();
- postconditionFigure.setOpaque(false);
- postconditionFigure.setFill(false);
- postconditionFigure.setOutline(false);
- postconditionFigure.setLineWidth(0);
- add(postconditionFigure);
- fHeaderSingleExecution = new WrappingLabel();
- add(fHeaderSingleExecution);
- // createContents();
- }
-
- public RectangleFigure getPreconditionFigure() {
- return preconditionFigure;
- }
-
- public RectangleFigure getPostconditionFigure() {
- return postconditionFigure;
- }
-
- public RectangleFigure getParameterFigure() {
- return parameterFigure;
- }
-
- public RectangleFigure getContentFigure() {
- return shapeCompartment;
- }
-
- /**
- * get the gmf container figure of the package
- *
- * @return the gmf container
- */
- public ShapeCompartmentFigure getGMFContentContainer() {
- if (shapeCompartment.getChildren().size() > 0) {
- return (ShapeCompartmentFigure) shapeCompartment.getChildren().get(0);
- }
- return null;
- }
-
- /**
- * @generated
- */
- private void createContents() {
- RoundedRectangle activityBorderFigure0 = new RoundedRectangle();
- this.add(activityBorderFigure0, BorderLayout.CENTER);
- // to remove
- activityBorderFigure0.setBackgroundColor(ColorConstants.red);
- GridLayout layoutActivityBorderFigure0 = new GridLayout();
- layoutActivityBorderFigure0.numColumns = 3;
- layoutActivityBorderFigure0.makeColumnsEqualWidth = false;
- layoutActivityBorderFigure0.horizontalSpacing = 0;
- layoutActivityBorderFigure0.verticalSpacing = 0;
- layoutActivityBorderFigure0.marginWidth = 0;
- layoutActivityBorderFigure0.marginHeight = 0;
- activityBorderFigure0.setLayoutManager(layoutActivityBorderFigure0);
- RectangleFigure labelAndParameter1 = new RectangleFigure();
- labelAndParameter1.setFill(false);
- labelAndParameter1.setOutline(false);
- labelAndParameter1.setLineWidth(0);
- // to remove
- labelAndParameter1.setBackgroundColor(ColorConstants.blue);
- GridData constraintLabelAndParameter1 = new GridData();
- constraintLabelAndParameter1.verticalAlignment = GridData.CENTER;
- constraintLabelAndParameter1.horizontalAlignment = GridData.BEGINNING;
- constraintLabelAndParameter1.horizontalIndent = 0;
- constraintLabelAndParameter1.horizontalSpan = 1;
- constraintLabelAndParameter1.verticalSpan = 1;
- constraintLabelAndParameter1.grabExcessHorizontalSpace = true;
- constraintLabelAndParameter1.grabExcessVerticalSpace = false;
- activityBorderFigure0.add(labelAndParameter1, constraintLabelAndParameter1);
- GridLayout layoutLabelAndParameter1 = new GridLayout();
- layoutLabelAndParameter1.numColumns = 1;
- layoutLabelAndParameter1.makeColumnsEqualWidth = true;
- labelAndParameter1.setLayoutManager(layoutLabelAndParameter1);
- fHeaderLabel = new WrappingLabel();
- fHeaderLabel.setText("ActivityName");
- GridData constraintFHeaderLabel = new GridData();
- constraintFHeaderLabel.verticalAlignment = GridData.CENTER;
- constraintFHeaderLabel.horizontalAlignment = GridData.BEGINNING;
- constraintFHeaderLabel.horizontalIndent = 4;
- constraintFHeaderLabel.horizontalSpan = 1;
- constraintFHeaderLabel.verticalSpan = 1;
- constraintFHeaderLabel.grabExcessHorizontalSpace = true;
- constraintFHeaderLabel.grabExcessVerticalSpace = false;
- labelAndParameter1.add(fHeaderLabel, constraintFHeaderLabel);
- fActivityParametersCompartment = new RectangleFigure();
- // to remove
- fActivityParametersCompartment.setBackgroundColor(ColorConstants.green);
- fActivityParametersCompartment.setFill(false);
- fActivityParametersCompartment.setOutline(false);
- fActivityParametersCompartment.setLineWidth(0);
- GridData constraintFActivityParametersCompartment = new GridData();
- constraintFActivityParametersCompartment.verticalAlignment = GridData.CENTER;
- constraintFActivityParametersCompartment.horizontalAlignment = GridData.BEGINNING;
- constraintFActivityParametersCompartment.horizontalIndent = 0;
- constraintFActivityParametersCompartment.horizontalSpan = 1;
- constraintFActivityParametersCompartment.verticalSpan = 1;
- constraintFActivityParametersCompartment.grabExcessHorizontalSpace = true;
- constraintFActivityParametersCompartment.grabExcessVerticalSpace = false;
- labelAndParameter1.add(fActivityParametersCompartment, constraintFActivityParametersCompartment);
- fActivityParametersCompartment.setLayoutManager(new StackLayout());
- RectangleFigure prePostContions1 = new RectangleFigure();
- // to remove
- prePostContions1.setBackgroundColor(ColorConstants.cyan);
- prePostContions1.setFill(false);
- prePostContions1.setOutline(false);
- prePostContions1.setLineWidth(0);
- GridData constraintPrePostContions1 = new GridData();
- constraintPrePostContions1.verticalAlignment = GridData.CENTER;
- constraintPrePostContions1.horizontalAlignment = GridData.BEGINNING;
- constraintPrePostContions1.horizontalIndent = 0;
- constraintPrePostContions1.horizontalSpan = 1;
- constraintPrePostContions1.verticalSpan = 1;
- constraintPrePostContions1.grabExcessHorizontalSpace = true;
- constraintPrePostContions1.grabExcessVerticalSpace = false;
- activityBorderFigure0.add(prePostContions1, constraintPrePostContions1);
- GridLayout layoutPrePostContions1 = new GridLayout();
- layoutPrePostContions1.numColumns = 1;
- layoutPrePostContions1.makeColumnsEqualWidth = true;
- prePostContions1.setLayoutManager(layoutPrePostContions1);
- fActivityPreconditionsCompartment = new RectangleFigure();
- fActivityPreconditionsCompartment.setBackgroundColor(ColorConstants.darkBlue);
- fActivityPreconditionsCompartment.setFill(false);
- fActivityPreconditionsCompartment.setOutline(false);
- fActivityPreconditionsCompartment.setLineWidth(0);
- GridData constraintFActivityPreconditionsCompartment = new GridData();
- constraintFActivityPreconditionsCompartment.verticalAlignment = GridData.CENTER;
- constraintFActivityPreconditionsCompartment.horizontalAlignment = GridData.BEGINNING;
- constraintFActivityPreconditionsCompartment.horizontalIndent = 0;
- constraintFActivityPreconditionsCompartment.horizontalSpan = 1;
- constraintFActivityPreconditionsCompartment.verticalSpan = 1;
- constraintFActivityPreconditionsCompartment.grabExcessHorizontalSpace = true;
- constraintFActivityPreconditionsCompartment.grabExcessVerticalSpace = false;
- prePostContions1.add(fActivityPreconditionsCompartment, constraintFActivityPreconditionsCompartment);
- fActivityPreconditionsCompartment.setLayoutManager(new StackLayout());
- fActivityPostconditionsCompartment = new RectangleFigure();
- fActivityPostconditionsCompartment.setFill(false);
- fActivityPostconditionsCompartment.setOutline(false);
- fActivityPostconditionsCompartment.setLineWidth(0);
- GridData constraintFActivityPostconditionsCompartment = new GridData();
- constraintFActivityPostconditionsCompartment.verticalAlignment = GridData.CENTER;
- constraintFActivityPostconditionsCompartment.horizontalAlignment = GridData.BEGINNING;
- constraintFActivityPostconditionsCompartment.horizontalIndent = 0;
- constraintFActivityPostconditionsCompartment.horizontalSpan = 1;
- constraintFActivityPostconditionsCompartment.verticalSpan = 1;
- constraintFActivityPostconditionsCompartment.grabExcessHorizontalSpace = true;
- constraintFActivityPostconditionsCompartment.grabExcessVerticalSpace = false;
- prePostContions1.add(fActivityPostconditionsCompartment, constraintFActivityPostconditionsCompartment);
- fActivityPostconditionsCompartment.setLayoutManager(new StackLayout());
- fHeaderSingleExecution = new WrappingLabel();
- fHeaderSingleExecution.setText("");
- GridData constraintFHeaderSingleExecution = new GridData();
- constraintFHeaderSingleExecution.verticalAlignment = GridData.CENTER;
- constraintFHeaderSingleExecution.horizontalAlignment = GridData.BEGINNING;
- constraintFHeaderSingleExecution.horizontalIndent = 0;
- constraintFHeaderSingleExecution.horizontalSpan = 1;
- constraintFHeaderSingleExecution.verticalSpan = 2;
- constraintFHeaderSingleExecution.grabExcessHorizontalSpace = false;
- constraintFHeaderSingleExecution.grabExcessVerticalSpace = false;
- activityBorderFigure0.add(fHeaderSingleExecution, constraintFHeaderSingleExecution);
- fCompartmentFigure = new RectangleFigure();
- fCompartmentFigure.setFill(false);
- fCompartmentFigure.setOutline(false);
- fCompartmentFigure.setLineWidth(0);
- GridData constraintFCompartmentFigure = new GridData();
- constraintFCompartmentFigure.verticalAlignment = GridData.FILL;
- constraintFCompartmentFigure.horizontalAlignment = GridData.FILL;
- constraintFCompartmentFigure.horizontalIndent = 0;
- constraintFCompartmentFigure.horizontalSpan = 3;
- constraintFCompartmentFigure.verticalSpan = 1;
- constraintFCompartmentFigure.grabExcessHorizontalSpace = true;
- constraintFCompartmentFigure.grabExcessVerticalSpace = true;
- activityBorderFigure0.add(fCompartmentFigure, constraintFCompartmentFigure);
- }
-
- /**
- * @generated
- */
- public WrappingLabel getHeaderLabel() {
- return fHeaderLabel;
- }
-
- /**
- * @generated
- */
- public RectangleFigure getActivityParametersCompartment() {
- return fActivityParametersCompartment;
- }
-
- /**
- * @generated
- */
- public RectangleFigure getActivityPreconditionsCompartment() {
- return fActivityPreconditionsCompartment;
- }
-
- /**
- * @generated
- */
- public RectangleFigure getActivityPostconditionsCompartment() {
- return fActivityPostconditionsCompartment;
- }
-
- /**
- * @generated
- */
- public WrappingLabel getHeaderSingleExecution() {
- return fHeaderSingleExecution;
- }
-
- /**
- * @generated
- */
- public RectangleFigure getCompartmentFigure() {
- return fCompartmentFigure;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.activity.figures;
+
+import java.util.List;
+
+import org.eclipse.draw2d.AbstractLayout;
+import org.eclipse.draw2d.BorderLayout;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.GridData;
+import org.eclipse.draw2d.GridLayout;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.RoundedRectangle;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+
+/**
+ * Activity figure for the activity diagram
+ *
+ * @author PT202707
+ *
+ */
+public class ActivityFigure extends RoundedCompartmentFigure { // PapyrusRoundedNodeFigure RoundedCompartmentFigure
+
+ /**
+ * gap in x to display name stereotypes and qualified name
+ */
+ protected final int GAP_X = 10;
+
+ /**
+ * gap in y to display the first label at the top of the package
+ */
+ protected final int GAP_Y = 5;
+
+ /**
+ * this is the layout manager in charge to place element in the enumeration
+ *
+ */
+ private class ActivityLayoutManager extends AbstractLayout {
+
+ /**
+ * ---------------------------------------------------| |sterotypeLabel|
+ * precondition | |--------------| | |QualifiedName
+ * |-----------------------------------| |--------------| | |name |
+ * postcondition | |--------------------------------------------------|
+ * | stereotype compartment |
+ * |--------------------------------------------------| |parameter | |
+ * |----------- | | activity content |
+ * ----------------------------------------------------
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected Dimension calculatePreferredSize(IFigure container, int hint, int hint2) {
+ int minimumWith = 0;
+ int minimumHeight = 0;
+ // take in account the content of the figure activity
+ if ((getContentFigure().getChildren().size() > 0)) {
+ IFigure content = (IFigure) getContentFigure().getChildren().get(0);
+ minimumWith = content.getPreferredSize().width + 50;
+ minimumHeight = content.getPreferredSize().height + 50;
+ }
+ // display name
+ if (getNameLabel() != null) {
+ if (getNameLabel().getPreferredSize().width > minimumWith) {
+ minimumWith = getNameLabel().getPreferredSize().width;
+ }
+ minimumHeight += getNameLabel().getPreferredSize().height;
+ }
+ if (getHeaderSingleExecution() != null) {
+ if (getHeaderSingleExecution().getBounds().getTopRight().x > minimumWith) {
+ minimumWith = getHeaderSingleExecution().getBounds().getTopRight().x;
+ }
+ }
+ return new Dimension(minimumWith, minimumHeight);
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void layout(IFigure container) {
+ List childrenList = container.getChildren();
+ for (int i = 0; i < container.getChildren().size(); i++) {
+ Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds());
+ bound.setSize(((IFigure) childrenList.get(i)).getPreferredSize());
+ if (i > 0) {
+ bound.y = ((IFigure) childrenList.get(i - 1)).getBounds().getBottomLeft().y + 1;
+ bound.x = getBounds().x + GAP_X;
+ } else {
+ bound.x = getBounds().x + GAP_X;
+ bound.y = getBounds().y + GAP_Y;
+ }
+ ((IFigure) childrenList.get(i)).setBounds(bound);
+ }
+ // container
+ Rectangle lastRectangle = getContentFigure().getBounds();
+ lastRectangle.height = getBounds().y + getBounds().height - lastRectangle.y;
+ lastRectangle.x = container.getBounds().x;
+ lastRectangle.width = getBounds().width;
+ getContentFigure().setBounds(lastRectangle);
+ if (getGMFContentContainer() != null) {
+ getGMFContentContainer().setBounds(lastRectangle);
+ }
+ // place precondition
+ // setX
+ Rectangle preconditionBound = getPreconditionFigure().getBounds().getCopy();
+ preconditionBound.x = getNameLabel().getBounds().getTopRight().x + GAP_X;
+ // take in account stereotype label
+ if (getStereotypesLabel() != null) {
+ int posStererotypeLabel = getStereotypesLabel().getBounds().getTopRight().x + GAP_X;
+ if (posStererotypeLabel > preconditionBound.x) {
+ preconditionBound.x = posStererotypeLabel;
+ }
+ }
+ // take in account qualified name
+ if (getQualifiedNameLabel() != null) {
+ int posqualifiedName = getQualifiedNameLabel().getBounds().getTopRight().x + GAP_X;
+ if (posqualifiedName > preconditionBound.x) {
+ preconditionBound.x = posqualifiedName;
+ }
+ }
+ // take in account stereotype properties
+ if (stereotypePropertiesInBraceContent != null) {
+ int possterotypeInBrace = stereotypePropertiesInBraceContent.getBounds().getTopRight().x + GAP_X;
+ if (possterotypeInBrace > preconditionBound.x) {
+ preconditionBound.x = possterotypeInBrace;
+ }
+ }
+ // take in account parameter figure
+ if (getParameterFigure() != null) {
+ int posparameter = getParameterFigure().getBounds().getTopRight().x + GAP_X;
+ if (posparameter > preconditionBound.x) {
+ preconditionBound.x = posparameter;
+ }
+ }
+ // setY
+ preconditionBound.y = ((IFigure) container.getChildren().get(0)).getBounds().y;
+ getPreconditionFigure().setBounds(preconditionBound);
+ if (getPreconditionFigure().getChildren().size() > 0) {
+ ((IFigure) getPreconditionFigure().getChildren().get(0)).setBounds(preconditionBound);
+ ;
+ }
+ // setPoscondtion
+ Rectangle postconditionBound = getPostconditionFigure().getBounds().getCopy();
+ postconditionBound.x = getPreconditionFigure().getBounds().x;
+ postconditionBound.y = getPreconditionFigure().getBounds().y + getPreconditionFigure().getBounds().height + GAP_Y;
+ getPostconditionFigure().setBounds(postconditionBound);
+ if (getPostconditionFigure().getChildren().size() > 0) {
+ ((IFigure) getPostconditionFigure().getChildren().get(0)).setBounds(postconditionBound);
+ ;
+ }
+ // setPoscondtion
+ Rectangle singleExecutionBound = getHeaderSingleExecution().getBounds().getCopy();
+ singleExecutionBound.x = getPreconditionFigure().getBounds().x + getPreconditionFigure().getBounds().width + GAP_X;
+ ;
+ singleExecutionBound.y = getPreconditionFigure().getBounds().y;
+ getHeaderSingleExecution().setBounds(singleExecutionBound);
+ // replace compartment stereotype properties
+ if (getStereotypePropertiesContent() != null) {
+ Rectangle pscontainer = getStereotypePropertiesContent().getBounds().getCopy();
+ if (getPostconditionFigure().getBounds().y + getPostconditionFigure().getBounds().height + GAP_Y > pscontainer.y) {
+ pscontainer.y = getPostconditionFigure().getBounds().y + getPostconditionFigure().getBounds().height + GAP_Y;
+ }
+ getStereotypePropertiesContent().setBounds(pscontainer);
+ }
+ // place parameter
+ // replace compartment stereotype properties
+ if (getStereotypePropertiesContent() != null) {
+ Rectangle paramBoundcontainer = getParameterFigure().getBounds().getCopy();
+ paramBoundcontainer.y = getStereotypePropertiesContent().getBounds().getBottomLeft().y;
+ getParameterFigure().setBounds(paramBoundcontainer);
+ if (getParameterFigure().getChildren().size() > 0) {
+ ((IFigure) shapeCompartment.getChildren().get(0)).setBounds(paramBoundcontainer);
+ }
+ } else {
+ Rectangle paramBoundcontainer = getParameterFigure().getBounds().getCopy();
+ paramBoundcontainer.y = getNameLabel().getBounds().getBottomLeft().y;
+ getParameterFigure().setBounds(paramBoundcontainer);
+ if (getParameterFigure().getChildren().size() > 0) {
+ ((IFigure) shapeCompartment.getChildren().get(0)).setBounds(paramBoundcontainer);
+ ;
+ }
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private WrappingLabel fHeaderLabel;
+
+ /**
+ * @generated
+ */
+ private RectangleFigure fActivityParametersCompartment;
+
+ /**
+ * @generated
+ */
+ private RectangleFigure fActivityPreconditionsCompartment;
+
+ /**
+ * @generated
+ */
+ private RectangleFigure fActivityPostconditionsCompartment;
+
+ /**
+ * @generated
+ */
+ protected WrappingLabel fHeaderSingleExecution;
+
+ /**
+ * @generated
+ */
+ private RectangleFigure fCompartmentFigure;
+
+ private RectangleFigure shapeCompartment;
+
+ private RectangleFigure preconditionFigure;
+
+ private RectangleFigure postconditionFigure;
+
+ private RectangleFigure parameterFigure;
+
+ /**
+ * @generated
+ */
+ public ActivityFigure() {
+ super();
+ setLayoutManager(new ActivityLayoutManager());
+ shapeCompartment = new RectangleFigure();
+ shapeCompartment.setOpaque(false);
+ shapeCompartment.setFill(false);
+ shapeCompartment.setOutline(false);
+ shapeCompartment.setLineWidth(0);
+ add(shapeCompartment);
+ preconditionFigure = new RectangleFigure();
+ preconditionFigure.setOpaque(false);
+ preconditionFigure.setFill(false);
+ preconditionFigure.setOutline(false);
+ preconditionFigure.setLineWidth(10);
+ preconditionFigure.setBorder(null);
+ preconditionFigure.setForegroundColor(ColorConstants.red);
+ add(preconditionFigure);
+ parameterFigure = new RectangleFigure();
+ parameterFigure.setOpaque(false);
+ parameterFigure.setFill(false);
+ parameterFigure.setOutline(false);
+ parameterFigure.setLineWidth(0);
+ add(parameterFigure);
+ postconditionFigure = new RectangleFigure();
+ postconditionFigure.setOpaque(false);
+ postconditionFigure.setFill(false);
+ postconditionFigure.setOutline(false);
+ postconditionFigure.setLineWidth(0);
+ add(postconditionFigure);
+ fHeaderSingleExecution = new WrappingLabel();
+ add(fHeaderSingleExecution);
+ // createContents();
+ }
+
+ public RectangleFigure getPreconditionFigure() {
+ return preconditionFigure;
+ }
+
+ public RectangleFigure getPostconditionFigure() {
+ return postconditionFigure;
+ }
+
+ public RectangleFigure getParameterFigure() {
+ return parameterFigure;
+ }
+
+ public RectangleFigure getContentFigure() {
+ return shapeCompartment;
+ }
+
+ /**
+ * get the gmf container figure of the package
+ *
+ * @return the gmf container
+ */
+ public ShapeCompartmentFigure getGMFContentContainer() {
+ if (shapeCompartment.getChildren().size() > 0) {
+ return (ShapeCompartmentFigure) shapeCompartment.getChildren().get(0);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private void createContents() {
+ RoundedRectangle activityBorderFigure0 = new RoundedRectangle();
+ this.add(activityBorderFigure0, BorderLayout.CENTER);
+ // to remove
+ activityBorderFigure0.setBackgroundColor(ColorConstants.red);
+ GridLayout layoutActivityBorderFigure0 = new GridLayout();
+ layoutActivityBorderFigure0.numColumns = 3;
+ layoutActivityBorderFigure0.makeColumnsEqualWidth = false;
+ layoutActivityBorderFigure0.horizontalSpacing = 0;
+ layoutActivityBorderFigure0.verticalSpacing = 0;
+ layoutActivityBorderFigure0.marginWidth = 0;
+ layoutActivityBorderFigure0.marginHeight = 0;
+ activityBorderFigure0.setLayoutManager(layoutActivityBorderFigure0);
+ RectangleFigure labelAndParameter1 = new RectangleFigure();
+ labelAndParameter1.setFill(false);
+ labelAndParameter1.setOutline(false);
+ labelAndParameter1.setLineWidth(0);
+ // to remove
+ labelAndParameter1.setBackgroundColor(ColorConstants.blue);
+ GridData constraintLabelAndParameter1 = new GridData();
+ constraintLabelAndParameter1.verticalAlignment = GridData.CENTER;
+ constraintLabelAndParameter1.horizontalAlignment = GridData.BEGINNING;
+ constraintLabelAndParameter1.horizontalIndent = 0;
+ constraintLabelAndParameter1.horizontalSpan = 1;
+ constraintLabelAndParameter1.verticalSpan = 1;
+ constraintLabelAndParameter1.grabExcessHorizontalSpace = true;
+ constraintLabelAndParameter1.grabExcessVerticalSpace = false;
+ activityBorderFigure0.add(labelAndParameter1, constraintLabelAndParameter1);
+ GridLayout layoutLabelAndParameter1 = new GridLayout();
+ layoutLabelAndParameter1.numColumns = 1;
+ layoutLabelAndParameter1.makeColumnsEqualWidth = true;
+ labelAndParameter1.setLayoutManager(layoutLabelAndParameter1);
+ fHeaderLabel = new WrappingLabel();
+ fHeaderLabel.setText("ActivityName");
+ GridData constraintFHeaderLabel = new GridData();
+ constraintFHeaderLabel.verticalAlignment = GridData.CENTER;
+ constraintFHeaderLabel.horizontalAlignment = GridData.BEGINNING;
+ constraintFHeaderLabel.horizontalIndent = 4;
+ constraintFHeaderLabel.horizontalSpan = 1;
+ constraintFHeaderLabel.verticalSpan = 1;
+ constraintFHeaderLabel.grabExcessHorizontalSpace = true;
+ constraintFHeaderLabel.grabExcessVerticalSpace = false;
+ labelAndParameter1.add(fHeaderLabel, constraintFHeaderLabel);
+ fActivityParametersCompartment = new RectangleFigure();
+ // to remove
+ fActivityParametersCompartment.setBackgroundColor(ColorConstants.green);
+ fActivityParametersCompartment.setFill(false);
+ fActivityParametersCompartment.setOutline(false);
+ fActivityParametersCompartment.setLineWidth(0);
+ GridData constraintFActivityParametersCompartment = new GridData();
+ constraintFActivityParametersCompartment.verticalAlignment = GridData.CENTER;
+ constraintFActivityParametersCompartment.horizontalAlignment = GridData.BEGINNING;
+ constraintFActivityParametersCompartment.horizontalIndent = 0;
+ constraintFActivityParametersCompartment.horizontalSpan = 1;
+ constraintFActivityParametersCompartment.verticalSpan = 1;
+ constraintFActivityParametersCompartment.grabExcessHorizontalSpace = true;
+ constraintFActivityParametersCompartment.grabExcessVerticalSpace = false;
+ labelAndParameter1.add(fActivityParametersCompartment, constraintFActivityParametersCompartment);
+ fActivityParametersCompartment.setLayoutManager(new StackLayout());
+ RectangleFigure prePostContions1 = new RectangleFigure();
+ // to remove
+ prePostContions1.setBackgroundColor(ColorConstants.cyan);
+ prePostContions1.setFill(false);
+ prePostContions1.setOutline(false);
+ prePostContions1.setLineWidth(0);
+ GridData constraintPrePostContions1 = new GridData();
+ constraintPrePostContions1.verticalAlignment = GridData.CENTER;
+ constraintPrePostContions1.horizontalAlignment = GridData.BEGINNING;
+ constraintPrePostContions1.horizontalIndent = 0;
+ constraintPrePostContions1.horizontalSpan = 1;
+ constraintPrePostContions1.verticalSpan = 1;
+ constraintPrePostContions1.grabExcessHorizontalSpace = true;
+ constraintPrePostContions1.grabExcessVerticalSpace = false;
+ activityBorderFigure0.add(prePostContions1, constraintPrePostContions1);
+ GridLayout layoutPrePostContions1 = new GridLayout();
+ layoutPrePostContions1.numColumns = 1;
+ layoutPrePostContions1.makeColumnsEqualWidth = true;
+ prePostContions1.setLayoutManager(layoutPrePostContions1);
+ fActivityPreconditionsCompartment = new RectangleFigure();
+ fActivityPreconditionsCompartment.setBackgroundColor(ColorConstants.darkBlue);
+ fActivityPreconditionsCompartment.setFill(false);
+ fActivityPreconditionsCompartment.setOutline(false);
+ fActivityPreconditionsCompartment.setLineWidth(0);
+ GridData constraintFActivityPreconditionsCompartment = new GridData();
+ constraintFActivityPreconditionsCompartment.verticalAlignment = GridData.CENTER;
+ constraintFActivityPreconditionsCompartment.horizontalAlignment = GridData.BEGINNING;
+ constraintFActivityPreconditionsCompartment.horizontalIndent = 0;
+ constraintFActivityPreconditionsCompartment.horizontalSpan = 1;
+ constraintFActivityPreconditionsCompartment.verticalSpan = 1;
+ constraintFActivityPreconditionsCompartment.grabExcessHorizontalSpace = true;
+ constraintFActivityPreconditionsCompartment.grabExcessVerticalSpace = false;
+ prePostContions1.add(fActivityPreconditionsCompartment, constraintFActivityPreconditionsCompartment);
+ fActivityPreconditionsCompartment.setLayoutManager(new StackLayout());
+ fActivityPostconditionsCompartment = new RectangleFigure();
+ fActivityPostconditionsCompartment.setFill(false);
+ fActivityPostconditionsCompartment.setOutline(false);
+ fActivityPostconditionsCompartment.setLineWidth(0);
+ GridData constraintFActivityPostconditionsCompartment = new GridData();
+ constraintFActivityPostconditionsCompartment.verticalAlignment = GridData.CENTER;
+ constraintFActivityPostconditionsCompartment.horizontalAlignment = GridData.BEGINNING;
+ constraintFActivityPostconditionsCompartment.horizontalIndent = 0;
+ constraintFActivityPostconditionsCompartment.horizontalSpan = 1;
+ constraintFActivityPostconditionsCompartment.verticalSpan = 1;
+ constraintFActivityPostconditionsCompartment.grabExcessHorizontalSpace = true;
+ constraintFActivityPostconditionsCompartment.grabExcessVerticalSpace = false;
+ prePostContions1.add(fActivityPostconditionsCompartment, constraintFActivityPostconditionsCompartment);
+ fActivityPostconditionsCompartment.setLayoutManager(new StackLayout());
+ fHeaderSingleExecution = new WrappingLabel();
+ fHeaderSingleExecution.setText("");
+ GridData constraintFHeaderSingleExecution = new GridData();
+ constraintFHeaderSingleExecution.verticalAlignment = GridData.CENTER;
+ constraintFHeaderSingleExecution.horizontalAlignment = GridData.BEGINNING;
+ constraintFHeaderSingleExecution.horizontalIndent = 0;
+ constraintFHeaderSingleExecution.horizontalSpan = 1;
+ constraintFHeaderSingleExecution.verticalSpan = 2;
+ constraintFHeaderSingleExecution.grabExcessHorizontalSpace = false;
+ constraintFHeaderSingleExecution.grabExcessVerticalSpace = false;
+ activityBorderFigure0.add(fHeaderSingleExecution, constraintFHeaderSingleExecution);
+ fCompartmentFigure = new RectangleFigure();
+ fCompartmentFigure.setFill(false);
+ fCompartmentFigure.setOutline(false);
+ fCompartmentFigure.setLineWidth(0);
+ GridData constraintFCompartmentFigure = new GridData();
+ constraintFCompartmentFigure.verticalAlignment = GridData.FILL;
+ constraintFCompartmentFigure.horizontalAlignment = GridData.FILL;
+ constraintFCompartmentFigure.horizontalIndent = 0;
+ constraintFCompartmentFigure.horizontalSpan = 3;
+ constraintFCompartmentFigure.verticalSpan = 1;
+ constraintFCompartmentFigure.grabExcessHorizontalSpace = true;
+ constraintFCompartmentFigure.grabExcessVerticalSpace = true;
+ activityBorderFigure0.add(fCompartmentFigure, constraintFCompartmentFigure);
+ }
+
+ /**
+ * @generated
+ */
+ public WrappingLabel getHeaderLabel() {
+ return fHeaderLabel;
+ }
+
+ /**
+ * @generated
+ */
+ public RectangleFigure getActivityParametersCompartment() {
+ return fActivityParametersCompartment;
+ }
+
+ /**
+ * @generated
+ */
+ public RectangleFigure getActivityPreconditionsCompartment() {
+ return fActivityPreconditionsCompartment;
+ }
+
+ /**
+ * @generated
+ */
+ public RectangleFigure getActivityPostconditionsCompartment() {
+ return fActivityPostconditionsCompartment;
+ }
+
+ /**
+ * @generated
+ */
+ public WrappingLabel getHeaderSingleExecution() {
+ return fHeaderSingleExecution;
+ }
+
+ /**
+ * @generated
+ */
+ public RectangleFigure getCompartmentFigure() {
+ return fCompartmentFigure;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityPartitionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityPartitionFigure.java
index 79200705816..1fcc2c82b53 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityPartitionFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/ActivityPartitionFigure.java
@@ -1,64 +1,48 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- * Arthur Daussy - 372745: [ActivityDiagram] Major refactoring group framework
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.figures;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.LineBorder;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.CompartmentFigure;
-
-/**
- * Figure an activity partition
- */
-public class ActivityPartitionFigure extends CompartmentFigure {
-
- /**
- * TODO set those to constants into preference store
- */
- private static final int TRANSPARENCY = 50;
-
- private static final int APLPHA = 50;
-
- private static final String ACTIVITY_CONTENT_COMPARTMENT = "ActivityContentCompartment";
-
- public ActivityPartitionFigure(List<String> compartmentFigure) {
- super(compartmentFigure);
- }
-
- public ActivityPartitionFigure() {
- super(Collections.singletonList(ACTIVITY_CONTENT_COMPARTMENT));
- this.setOpaque(false);
- getActivityPartitionCompartment().setOpaque(false);
- getActivityPartitionCompartment().setBorder(new LineBorder());
- }
-
- @Override
- public void paintFigure(Graphics graphics) {
- setTransparency(TRANSPARENCY);
- graphics.setAlpha(APLPHA);
- super.paintFigure(graphics);
- }
-
- public RectangleFigure getActivityPartitionCompartment() {
- return getCompartment(ACTIVITY_CONTENT_COMPARTMENT);
- }
-
- public WrappingLabel getPartitionLabel() {
- return getNameLabel();
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Arthur Daussy - 372745: [ActivityDiagram] Major refactoring group framework
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.figures;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.OneLineBorder;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+
+/**
+ * Figure an activity partition
+ */
+public class ActivityPartitionFigure extends RoundedCompartmentFigure {
+
+ private static final String ACTIVITY_CONTENT_COMPARTMENT = "ActivityContentCompartment";
+
+ public ActivityPartitionFigure(List<String> compartmentFigure) {
+ super(compartmentFigure);
+ }
+
+ public ActivityPartitionFigure() {
+ super(Collections.singletonList(ACTIVITY_CONTENT_COMPARTMENT));
+ getActivityPartitionCompartment().setBorder(new OneLineBorder(1, PositionConstants.TOP));
+ }
+
+ public RectangleFigure getActivityPartitionCompartment() {
+ return getCompartment(ACTIVITY_CONTENT_COMPARTMENT);
+ }
+
+ public WrappingLabel getPartitionLabel() {
+ return getNameLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/CallBehaviorActionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/CallBehaviorActionFigure.java
index 113faed5b7a..28a62ac64d6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/CallBehaviorActionFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/CallBehaviorActionFigure.java
@@ -1,59 +1,59 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.figures;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.common.Activator;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * this is a specific figure to display the rake of this action
- *
- */
-public class CallBehaviorActionFigure extends PapyrusRoundedNodeFigure {
-
- protected static final String IMAGE_PATH = "/icons/obj16/rake.gif";
-
- protected static final int margin = 5;
-
- protected boolean isDisplayedRake = false;
-
- /**
- * set true to display the rake
- *
- * @param displayRake
- * true to display the rake
- */
- public void displayRake(boolean displayRake) {
- this.isDisplayedRake = displayRake;
- }
-
- @Override
- public void paint(Graphics graphics) {
- // TODO Auto-generated method stub
- super.paint(graphics);
- if (isDisplayedRake) {
- Activator.getDefault();
- Image image = Activator.getPluginIconImage(UMLDiagramEditorPlugin.ID, IMAGE_PATH);
- org.eclipse.draw2d.geometry.Rectangle rect = getBounds();
- Point pt = rect.getBottomRight();
- pt.x = pt.x - image.getBounds().width - margin;
- pt.y = pt.y - image.getBounds().height - margin;
- graphics.drawImage(image, pt);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.figures;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * this is a specific figure to display the rake of this action
+ *
+ */
+public class CallBehaviorActionFigure extends RoundedCompartmentFigure {
+
+ protected static final String IMAGE_PATH = "/icons/obj16/rake.gif";
+
+ protected static final int margin = 5;
+
+ protected boolean isDisplayedRake = false;
+
+ /**
+ * set true to display the rake
+ *
+ * @param displayRake
+ * true to display the rake
+ */
+ public void displayRake(boolean displayRake) {
+ this.isDisplayedRake = displayRake;
+ }
+
+ @Override
+ public void paint(Graphics graphics) {
+ // TODO Auto-generated method stub
+ super.paint(graphics);
+ if (isDisplayedRake) {
+ Activator.getDefault();
+ Image image = Activator.getPluginIconImage(UMLDiagramEditorPlugin.ID, IMAGE_PATH);
+ org.eclipse.draw2d.geometry.Rectangle rect = getBounds();
+ Point pt = rect.getBottomRight();
+ pt.x = pt.x - image.getBounds().width - margin;
+ pt.y = pt.y - image.getBounds().height - margin;
+ graphics.drawImage(image, pt);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java
index 633bb9040ad..bafb9cfe22d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/figures/InterruptibleActivityRegionFigure.java
@@ -1,125 +1,391 @@
-/*****************************************************************************
- * Copyright (c) 2010, 2014 Atos Origin, CEA, and others.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- * Christian W. Damus (CEA) - bug 392301
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.figures;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
-import org.eclipse.gmf.runtime.notation.GradientStyle;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.RoundedRectangleDashedBorder;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedRectangleDashedShadowBorder;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * This figure handles a rounded dashed rectangle Papyrus node, with no
- * displayed label.
- *
- * @author vhemery
- */
-public class InterruptibleActivityRegionFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure, IFigure {
-
- /** the size of the rounded corner */
- private static int ROUNDED_CORNER_SIZE = 8;
-
- /** the size of the rounded corner */
- private static int BORDER_SIZE = 3;
-
- /**
- * Default Constructor.
- */
- public InterruptibleActivityRegionFigure() {
- shadowborder = new RoundedRectangleDashedShadowBorder(BORDER_SIZE, getForegroundColor(), ROUNDED_CORNER_SIZE, ROUNDED_CORNER_SIZE);
- setBorder(shadowborder);
- }
-
- /**
- * Paint figure.
- *
- * @see org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure#paintFigure(org.eclipse.draw2d.Graphics)
- * @param graphics
- * the graphics
- */
- @Override
- public void paintFigure(Graphics graphics) {
- paintBackground(graphics, getBounds());
- shadowborder.setColor(getForegroundColor());
- }
-
- /**
- * Paint the background of the figure. If this figure uses gradient, then it
- * will paint the background with the gradient informations. Otherwise it
- * will use the background color.
- *
- * @param graphics
- * the graphics
- * @param rectangle
- * the rectangle where the background needs to be fill.
- */
- @Override
- protected void paintBackground(Graphics graphics, Rectangle rectangle) {
- if (isUsingGradient()) {
- applyTransparency(graphics);
- boolean isVertical = (getGradientStyle() == GradientStyle.VERTICAL) ? true : false;
- graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
- graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- graphics.fillGradient(rectangle, isVertical);
- } else {
- graphics.setBackgroundColor(getBackgroundColor());
- graphics.setForegroundColor(getForegroundColor());
- // let the figure unfilled to see behind it
- // graphics.fillRectangle(rectangle);
- }
- }
-
- /**
- * set the shadow
- *
- * @param shadow
- * a boolean true if we want to display the shadow
- */
- @Override
- public void setShadow(boolean shadow) {
- super.setShadow(shadow);
- if (!shadow) {
- RoundedRectangleDashedBorder bord = new RoundedRectangleDashedBorder(ROUNDED_CORNER_SIZE, ROUNDED_CORNER_SIZE);
- this.setBorder(bord);
- }
- }
-
- @Override
- public void setStereotypeDisplay(String stereotypes, Image image) {
- // TODO Auto-generated method stub
- }
-
- @Override
- public void setStereotypePropertiesInBrace(String stereotypeProperties) {
- // TODO Auto-generated method stub
- }
-
- @Override
- public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
- // TODO Auto-generated method stub
- }
-
- @Override
- public Label getStereotypesLabel() {
- // TODO Auto-generated method stub
- return null;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.figures;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.RoundedRectangleBorder;
+import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
+import org.eclipse.gmf.runtime.notation.GradientStyle;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleShadowBorder;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.SubCompartmentLayoutManager;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * This figure handles a rounded dashed rectangle Papyrus node, with no
+ * displayed label.
+ *
+ * @author madam
+ */
+public class InterruptibleActivityRegionFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure, IFigure, IRoundedRectangleFigure {
+
+ /** The container figures. */
+ private Map<String, RectangleFigure> containerFigures;
+
+ /** The corner dimension. */
+ private Dimension cornerDimension = new Dimension();
+
+ /** The is oval. */
+ private boolean isOval;
+
+ /** The is label constrained. */
+ private boolean isLabelConstrained;
+
+ private Dimension floatingNameOffset = new Dimension();
+
+ private int borderStyle = Graphics.LINE_SOLID;
+
+ /**
+ * @param borderStyle
+ * the borderStyle to set
+ */
+ public void setBorderStyle(int borderStyle) {
+ this.borderStyle = borderStyle;
+ if (shadowborder != null) {
+ shadowborder.setStyle(borderStyle);
+ }
+ }
+
+ /**
+ * Instantiates a new rounded compartment figure.
+ */
+ public InterruptibleActivityRegionFigure() {
+ this(null, null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param compartmentFigure
+ * the compartment figure
+ */
+ public InterruptibleActivityRegionFigure(List<String> compartmentFigure) {
+ this(compartmentFigure, null);
+ }
+
+ /**
+ * Constructor with a tagged value.
+ *
+ * @param compartmentFigure
+ * a list of id for the compartment figure
+ * @param taggedLabelValue
+ * the value to display as tagged value
+ */
+ public InterruptibleActivityRegionFigure(List<String> compartmentFigure, String taggedLabelValue) {
+ super();
+ setOpaque(false);
+ shadowborder = new RoundedRectangleShadowBorder(getForegroundColor(), cornerDimension);
+
+ if (compartmentFigure != null) {
+ setLayoutManager(new AutomaticCompartmentLayoutManager());
+ createContentPane(compartmentFigure);
+ }
+ }
+
+ /**
+ * Creates the content pane.
+ *
+ * @param compartmentFigure
+ * the compartment figure
+ */
+ protected void createContentPane(List<String> compartmentFigure) {
+ containerFigures = new HashMap<String, RectangleFigure>();
+ for (String id : compartmentFigure) {
+ RectangleFigure newFigure = new RectangleFigure();
+ newFigure.setLayoutManager(new SubCompartmentLayoutManager());
+ // to debug graphically: newFigure.setFill(true);
+ newFigure.setFill(false);
+ newFigure.setBorder(null);
+ newFigure.setOutline(false);
+ newFigure.setOpaque(false);
+ this.add(newFigure);
+ containerFigures.put(id, newFigure);
+ }
+ }
+
+ /**
+ * Get the RectangleFigure containing the wanted compartment.
+ *
+ * @param id
+ * the id to find the right compartment
+ * @return the RectangleFigure
+ */
+ public RectangleFigure getCompartment(String id) {
+ return containerFigures.get(id);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#getCornerDimensions()
+ *
+ * @return
+ */
+ @Override
+ public Dimension getCornerDimensions() {
+ return cornerDimension;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#getRoundedRectangleBounds()
+ *
+ * @return
+ */
+ @Override
+ public Rectangle getRoundedRectangleBounds() {
+ return getBounds();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void paintFigure(Graphics graphics) {
+ shadowborder.setColor(getForegroundColor());
+ graphics.pushState();
+ Rectangle rectangle = getBounds().getCopy();
+ // Set the corner dimension if is oval in case of resizing
+ if (isOval) {
+ cornerDimension.width = rectangle.width;
+ cornerDimension.height = rectangle.height;
+ }
+ // paintBackground:
+ applyTransparency(graphics);
+ if (isUsingGradient()) {
+ boolean isVertical = (getGradientStyle() == GradientStyle.VERTICAL) ? true : false;
+ if (isVertical && rectangle.height > ((3 * cornerDimension.height) / 2)) {
+ Rectangle upperBounds = getBounds().getCopy();
+ upperBounds.height = cornerDimension.height - getLineWidth() / 2;
+ upperBounds.y += getLineWidth() / 2;
+ Rectangle upperClip = upperBounds.getCopy().shrink(new Insets(0, 0, cornerDimension.height / 2, 0));
+ Rectangle lowerBounds = getBounds().getCopy();
+ lowerBounds.y = lowerBounds.bottom() - cornerDimension.height;
+ lowerBounds.height = cornerDimension.height - getLineWidth() / 2;
+ Rectangle lowerClip = lowerBounds.getCopy().shrink(new Insets(cornerDimension.height / 2, 0, 0, 0));
+ Rectangle innerBounds = getBounds().getCopy();
+ innerBounds.y = upperClip.bottom();
+ innerBounds.height = lowerClip.y - upperClip.bottom() + 1;
+ // fill the upper part
+ graphics.pushState();
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ graphics.clipRect(upperClip);
+ graphics.fillRoundRectangle(upperBounds, cornerDimension.width, cornerDimension.height);
+ graphics.popState();
+ // fill the inner part
+ graphics.pushState();
+ graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ graphics.fillGradient(innerBounds, true);
+ graphics.popState();
+ // fill the lower part
+ graphics.pushState();
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ graphics.clipRect(lowerClip);
+ graphics.fillRoundRectangle(lowerBounds, cornerDimension.width, cornerDimension.height);
+ graphics.popState();
+ } else if (!isVertical && rectangle.width > ((3 * cornerDimension.width) / 2)) {
+ Rectangle leftBounds = getBounds().getCopy();
+ leftBounds.width = cornerDimension.width - getLineWidth() / 2;
+ leftBounds.x += getLineWidth() / 2;
+ Rectangle leftClip = leftBounds.getCopy().shrink(new Insets(0, 0, 0, cornerDimension.width / 2));
+ Rectangle rightBounds = getBounds().getCopy();
+ rightBounds.x = rightBounds.right() - cornerDimension.width;
+ rightBounds.width = cornerDimension.width - getLineWidth() / 2;
+ Rectangle rightClip = rightBounds.getCopy().shrink(new Insets(0, cornerDimension.width / 2, 0, 0));
+ Rectangle innerBounds = getBounds().getCopy();
+ innerBounds.x = leftClip.right();// - getLineWidth();
+ innerBounds.width = rightClip.x - leftClip.right() + 1;// + 2 * getLineWidth();
+ // fill the left part
+ graphics.pushState();
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ graphics.clipRect(leftClip);
+ graphics.fillRoundRectangle(leftBounds, cornerDimension.width, cornerDimension.height);
+ graphics.popState();
+ // fill the inner part
+ graphics.pushState();
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ graphics.fillGradient(innerBounds, false);
+ graphics.popState();
+ // fill the right part
+ graphics.pushState();
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ graphics.clipRect(rightClip);
+ graphics.fillRoundRectangle(rightBounds, cornerDimension.width, cornerDimension.height);
+ graphics.popState();
+ } else {
+ graphics.pushState();
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ graphics.fillRoundRectangle(rectangle, cornerDimension.width, cornerDimension.height);
+ graphics.popState();
+ }
+ } else {
+ graphics.pushState();
+ graphics.setBackgroundColor(getBackgroundColor());
+ graphics.setForegroundColor(getForegroundColor());
+ graphics.fillRoundRectangle(rectangle, cornerDimension.width, cornerDimension.height);
+ graphics.popState();
+ }
+ graphics.popState();
+ // Force to repaint the border thought setShadow()
+ setShadow(isShadow());
+ repaint();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure#setShadow(boolean)
+ *
+ * @param shadow
+ */
+ @Override
+ public void setShadow(boolean shadow) {
+ super.setShadow(shadow);
+ if (!shadow) {
+ // If shadow is set to false on CSS file we set the border
+ if (getBorder() != null) {
+ RoundedRectangleBorder border = new RoundedRectangleBorder(cornerDimension.width, cornerDimension.height);
+ border.setWidth(getLineWidth());
+ border.setStyle(borderStyle);
+ this.setBorder(border);
+ }
+ }
+ }
+
+ /**
+ * Sets the corner dimension.
+ *
+ * @param cornerDimension
+ * the new corner dimension
+ */
+ @Override
+ public void setCornerDimensions(Dimension cornerDimension) {
+ this.cornerDimension = cornerDimension;
+ }
+
+ @Override
+ public void setOval(boolean booleanValue) {
+ isOval = booleanValue;
+ if (booleanValue) {
+ Rectangle rectangle = getBounds().getCopy();
+ cornerDimension.width = rectangle.width;
+ cornerDimension.height = rectangle.height;
+ }
+ }
+
+ @Override
+ public boolean isOval() {
+ return isOval;
+ }
+
+ @Override
+ public void setFloatingNameConstrained(boolean booleanValue) {
+ isLabelConstrained = booleanValue;
+ }
+
+ @Override
+ public boolean isFloatingNameConstrained() {
+ return isLabelConstrained;
+ }
+
+ @Override
+ public void setFloatingNameOffset(Dimension offset) {
+ this.floatingNameOffset = offset;
+
+ }
+
+ @Override
+ public Dimension getFloatingNameOffset() {
+ return floatingNameOffset;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure#setStereotypeDisplay(java.lang.String, org.eclipse.swt.graphics.Image)
+ *
+ * @param stereotypes
+ * @param image
+ */
+ @Override
+ public void setStereotypeDisplay(String stereotypes, Image image) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure#setStereotypePropertiesInBrace(java.lang.String)
+ *
+ * @param stereotypeProperties
+ */
+ @Override
+ public void setStereotypePropertiesInBrace(String stereotypeProperties) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure#setStereotypePropertiesInCompartment(java.lang.String)
+ *
+ * @param stereotypeProperties
+ */
+ @Override
+ public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure#getStereotypesLabel()
+ *
+ * @return
+ */
+ @Override
+ public Label getStereotypesLabel() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#setHasHeader(boolean)
+ *
+ * @param hasHeader
+ */
+ @Override
+ public void setHasHeader(boolean hasHeader) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#hasHeader()
+ *
+ * @return
+ */
+ @Override
+ public boolean hasHeader() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/AcceptEventActionSwitchHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/AcceptEventActionSwitchHelper.java
index 0447fba25ce..1d38d1d71fd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/AcceptEventActionSwitchHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/AcceptEventActionSwitchHelper.java
@@ -1,171 +1,168 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.helper;
-
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionEditPart;
-import org.eclipse.papyrus.uml.diagram.activity.figures.AcceptEventActionFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.NotificationHelper;
-import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
-import org.eclipse.uml2.uml.AcceptEventAction;
-import org.eclipse.uml2.uml.Trigger;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * The AcceptEventActionSwitchHelper class is used to help updating an
- * AcceptEventAction's figure. It enables to switch between the classic pentagon
- * representation and the hourglass representation of an AcceptTimeEventAction.
- */
-public class AcceptEventActionSwitchHelper extends NotificationHelper {
-
- /** The size factor between the classic figure and the hourglass figure */
- private static final int REDUCE_WIDTH_FACTOR_FOR_HOURGLASS = 4;
-
- /**
- * The UI adapter that listens model update to detect when figure switch
- * must be performed
- */
- private UIAdapter adapter = new UIAdapter();
-
- /** The edit part which this helper handles the switch for */
- private AcceptEventActionEditPart editPart;
-
- /**
- * Construct a new switch helper which will automatically manage the switch
- * when properties are edited.
- *
- * @param acceptEventActionEditPart
- * the part of an AcceptEventAction, for which the switch must be
- * managed.
- */
- public AcceptEventActionSwitchHelper(AcceptEventActionEditPart acceptEventActionEditPart) {
- editPart = acceptEventActionEditPart;
- this.setModelListener(adapter);
- }
-
- /**
- * Private class UIAdapter. This class listens at appropriate model elements
- * to detect when an AcceptEventAction becomes an AcceptTimeEventAction.
- */
- private class UIAdapter extends UIAdapterImpl {
-
- /**
- * Notify the changes by updating listened elements if necessary and
- * performing the switch if necessary.
- *
- * @see org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl#safeNotifyChanged(org.eclipse.emf.common.notify.Notification)
- * @param msg
- * the notification message
- */
- @Override
- protected void safeNotifyChanged(Notification msg) {
- if (UMLPackage.eINSTANCE.getAcceptEventAction_Trigger().equals(msg.getFeature())) {
- // listen trigger once the list is modified
- if (msg.getNewValue() instanceof List<?>) {
- for (Object value : (List<?>) msg.getNewValue()) {
- if (value instanceof Notifier) {
- listenObject((Notifier) value);
- }
- }
- } else if (msg.getNewValue() instanceof Notifier) {
- listenObject((Notifier) msg.getNewValue());
- }
- if (msg.getOldValue() instanceof List<?>) {
- for (Object value : (List<?>) msg.getOldValue()) {
- if (value instanceof Notifier) {
- unlistenObject((Notifier) value);
- }
- }
- } else if (msg.getOldValue() instanceof Notifier) {
- unlistenObject((Notifier) msg.getNewValue());
- }
- updateAcceptEventActionFigure();
- } else if (UMLPackage.eINSTANCE.getTrigger_Event().equals(msg.getFeature())) {
- updateAcceptEventActionFigure();
- }
- }
- }
-
- /**
- * Get the AcceptEventAction model element managed by the edit part
- *
- * @return AcceptEventAction model element
- */
- public AcceptEventAction getAction() {
- EObject resolveSemanticElement = editPart.resolveSemanticElement();
- if (resolveSemanticElement instanceof AcceptEventAction) {
- return (AcceptEventAction) resolveSemanticElement;
- }
- return null;
- }
-
- /**
- * Update the figure representation, to switch to or from the hourglass
- * representation
- */
- public void updateAcceptEventActionFigure() {
- AcceptEventActionFigure actionFigure = editPart.getPrimaryShape();
- boolean useHourglassFigure = CustomAcceptEventActionEditHelper.isAcceptTimeEventAction(getAction());
- boolean hourglassAlreadyUsed = actionFigure.isTemplateForAcceptTimeEventActionUsed();
-
-
- if (useHourglassFigure != hourglassAlreadyUsed) {
-
- // set usage of the correct figure
- actionFigure.useTemplateForAcceptTimeEventAction(useHourglassFigure);
-
- // arrange the figure so that style remains coherent
- if (editPart.getModel() instanceof View) {
- int locX = actionFigure.getLocation().x;
- int width = actionFigure.getSize().width;
- int newWidth = width;
- if (useHourglassFigure) {
- // switching to hourglass, reduce width
- newWidth = width / REDUCE_WIDTH_FACTOR_FOR_HOURGLASS;
- } else {
- // switching to pentagon, augment width
- newWidth = width * REDUCE_WIDTH_FACTOR_FOR_HOURGLASS;
- }
- // adapt location to keep same center
- ViewUtil.setStructuralFeatureValue((View) editPart.getModel(), NotationPackage.eINSTANCE.getLocation_X(), locX + (width - newWidth) / 2);
- ViewUtil.setStructuralFeatureValue((View) editPart.getModel(), NotationPackage.eINSTANCE.getSize_Width(), newWidth);
- }
- }
- }
-
- /**
- * Add listener on an element and its appropriate children in case of an
- * AcceptEventAction
- *
- * @param element
- * The object to listen
- */
- @Override
- public void listenObject(Notifier element) {
- super.listenObject(element);
- if (element instanceof AcceptEventAction) {
- // also listen at children triggers of the action
- for (Trigger trigger : ((AcceptEventAction) element).getTriggers()) {
- super.listenObject(trigger);
- }
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.helper;
+
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.figures.AcceptEventActionFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.NotificationHelper;
+import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
+import org.eclipse.uml2.uml.AcceptEventAction;
+import org.eclipse.uml2.uml.Trigger;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * The AcceptEventActionSwitchHelper class is used to help updating an
+ * AcceptEventAction's figure. It enables to switch between the classic pentagon
+ * representation and the hourglass representation of an AcceptTimeEventAction.
+ */
+public class AcceptEventActionSwitchHelper extends NotificationHelper {
+
+ /** The size factor between the classic figure and the hourglass figure */
+ private static final int REDUCE_WIDTH_FACTOR_FOR_HOURGLASS = 4;
+
+ /**
+ * The UI adapter that listens model update to detect when figure switch
+ * must be performed
+ */
+ private UIAdapter adapter = new UIAdapter();
+
+ /** The edit part which this helper handles the switch for */
+ private AcceptEventActionEditPart editPart;
+
+ /**
+ * Construct a new switch helper which will automatically manage the switch
+ * when properties are edited.
+ *
+ * @param acceptEventActionEditPart
+ * the part of an AcceptEventAction, for which the switch must be
+ * managed.
+ */
+ public AcceptEventActionSwitchHelper(AcceptEventActionEditPart acceptEventActionEditPart) {
+ editPart = acceptEventActionEditPart;
+ this.setModelListener(adapter);
+ }
+
+ /**
+ * Private class UIAdapter. This class listens at appropriate model elements
+ * to detect when an AcceptEventAction becomes an AcceptTimeEventAction.
+ */
+ private class UIAdapter extends UIAdapterImpl {
+
+ /**
+ * Notify the changes by updating listened elements if necessary and
+ * performing the switch if necessary.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl#safeNotifyChanged(org.eclipse.emf.common.notify.Notification)
+ * @param msg
+ * the notification message
+ */
+ @Override
+ protected void safeNotifyChanged(Notification msg) {
+ if (UMLPackage.eINSTANCE.getAcceptEventAction_Trigger().equals(msg.getFeature())) {
+ // listen trigger once the list is modified
+ if (msg.getNewValue() instanceof List<?>) {
+ for (Object value : (List<?>) msg.getNewValue()) {
+ if (value instanceof Notifier) {
+ listenObject((Notifier) value);
+ }
+ }
+ } else if (msg.getNewValue() instanceof Notifier) {
+ listenObject((Notifier) msg.getNewValue());
+ }
+ if (msg.getOldValue() instanceof List<?>) {
+ for (Object value : (List<?>) msg.getOldValue()) {
+ if (value instanceof Notifier) {
+ unlistenObject((Notifier) value);
+ }
+ }
+ } else if (msg.getOldValue() instanceof Notifier) {
+ unlistenObject((Notifier) msg.getNewValue());
+ }
+ updateAcceptEventActionFigure();
+ } else if (UMLPackage.eINSTANCE.getTrigger_Event().equals(msg.getFeature())) {
+ updateAcceptEventActionFigure();
+ }
+ }
+ }
+
+ /**
+ * Get the AcceptEventAction model element managed by the edit part
+ *
+ * @return AcceptEventAction model element
+ */
+ public AcceptEventAction getAction() {
+ EObject resolveSemanticElement = editPart.resolveSemanticElement();
+ if (resolveSemanticElement instanceof AcceptEventAction) {
+ return (AcceptEventAction) resolveSemanticElement;
+ }
+ return null;
+ }
+
+ /**
+ * Update the figure representation, to switch to or from the hourglass
+ * representation
+ */
+ public void updateAcceptEventActionFigure() {
+ AcceptEventActionFigure actionFigure = editPart.getPrimaryShape();
+ boolean useHourglassFigure = CustomAcceptEventActionEditHelper.isAcceptTimeEventAction(getAction());
+ boolean hourglassAlreadyUsed = actionFigure.isTemplateForAcceptTimeEventActionUsed();
+
+
+ if (useHourglassFigure != hourglassAlreadyUsed) {
+
+ // set usage of the correct figure
+ // actionFigure.useTemplateForAcceptTimeEventAction(useHourglassFigure);
+
+ // arrange the figure so that style remains coherent
+ // if (editPart.getModel() instanceof View) {
+ // int locX = actionFigure.getLocation().x;
+ // int width = actionFigure.getSize().width;
+ // int newWidth = width;
+ // if (useHourglassFigure) {
+ // // switching to hourglass, reduce width
+ // newWidth = width / REDUCE_WIDTH_FACTOR_FOR_HOURGLASS;
+ // } else {
+ // // switching to pentagon, augment width
+ // newWidth = width * REDUCE_WIDTH_FACTOR_FOR_HOURGLASS;
+ // }
+ // // adapt location to keep same center
+ // ViewUtil.setStructuralFeatureValue((View) editPart.getModel(), NotationPackage.eINSTANCE.getLocation_X(), locX + (width - newWidth) / 2);
+ // ViewUtil.setStructuralFeatureValue((View) editPart.getModel(), NotationPackage.eINSTANCE.getSize_Width(), newWidth);
+ // }
+ }
+ }
+
+ /**
+ * Add listener on an element and its appropriate children in case of an
+ * AcceptEventAction
+ *
+ * @param element
+ * The object to listen
+ */
+ @Override
+ public void listenObject(Notifier element) {
+ super.listenObject(element);
+ if (element instanceof AcceptEventAction) {
+ // also listen at children triggers of the action
+ for (Trigger trigger : ((AcceptEventAction) element).getTriggers()) {
+ super.listenObject(trigger);
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptEventActionParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptEventActionParser.java
index d2ce5da0a70..9a19b2cfbbb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptEventActionParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptEventActionParser.java
@@ -22,7 +22,6 @@ import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.helper.CustomAcceptEventActionEditHelper;
import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
import org.eclipse.uml2.uml.AcceptEventAction;
import org.eclipse.uml2.uml.Element;
@@ -61,7 +60,7 @@ public class AcceptEventActionParser extends MessageFormatParser implements ISem
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
* (java.lang.Object , int)
@@ -74,7 +73,7 @@ public class AcceptEventActionParser extends MessageFormatParser implements ISem
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
* getPrintString(org.eclipse .core.runtime.IAdaptable, int)
*/
@@ -84,7 +83,7 @@ public class AcceptEventActionParser extends MessageFormatParser implements ISem
if (obj instanceof AcceptEventAction) {
AcceptEventAction action = (AcceptEventAction) obj;
String name = action.getName();
- if (name != null && !CustomAcceptEventActionEditHelper.isAcceptTimeEventAction(action)) {
+ if (name != null) {// && !CustomAcceptEventActionEditHelper.isAcceptTimeEventAction(action)) {
return name;
}
}
@@ -93,7 +92,7 @@ public class AcceptEventActionParser extends MessageFormatParser implements ISem
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
* areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
* java.lang.Object)
@@ -106,7 +105,7 @@ public class AcceptEventActionParser extends MessageFormatParser implements ISem
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
* getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen
index 559b1de9f17..664b6374ccf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen
@@ -1,17938 +1,18552 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
- xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
- <gmfgen:GenEditorGenerator
- packageNamePrefix="org.eclipse.papyrus.uml.diagram.activity"
- modelID="PapyrusUMLActivityDiagram"
- diagramFileExtension="PapyrusUMLActivity_diagram"
- domainFileExtension="PapyrusUMLActivity"
- dynamicTemplates="true"
- templateDirectory="/org.eclipse.papyrus.def/xtend/">
- <audits>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validate"
- name="validateUMLModel"
- description="Validate the UML model"
- path="/0/@audits/@categories.0"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateInitialNode"
- name="validateInitialNode"
- description="Validate an initial node"
- path="/0/@audits/@categories.0 /0/@audits/@categories.1"
- audits="/0/@audits/@rules.0 /0/@audits/@rules.1"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateFinalNode"
- name="validateFinalNode"
- description="Validate a final node"
- path="/0/@audits/@categories.0 /0/@audits/@categories.2"
- audits="/0/@audits/@rules.2"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateCallBehaviorAction"
- name="validateCallBehaviorAction"
- description="Validate a call behavior action"
- path="/0/@audits/@categories.0 /0/@audits/@categories.3"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateCallOperationAction"
- name="validateCallOperationAction"
- description="Validate a call operation action"
- path="/0/@audits/@categories.0 /0/@audits/@categories.4"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateCallAction"
- name="validateCallAction"
- description="Validate a call action"
- path="/0/@audits/@categories.0 /0/@audits/@categories.5"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateInvocationAction"
- name="validateInvocationAction"
- description="Validate an invocation action"
- path="/0/@audits/@categories.0 /0/@audits/@categories.6"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityNode"
- name="validateActivityNode"
- description="Validate an activity node"
- path="/0/@audits/@categories.0 /0/@audits/@categories.7"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateRedefinableElement"
- name="validateRedefinableElement"
- description="Validate a redefineable element"
- path="/0/@audits/@categories.0 /0/@audits/@categories.8"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateNamedElement"
- name="validateNamedElement"
- description="Validate a named element"
- path="/0/@audits/@categories.0 /0/@audits/@categories.9"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateElement"
- name="validateElement"
- description="Validate an element"
- path="/0/@audits/@categories.0 /0/@audits/@categories.10"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectNode"
- name="validateObjectNode"
- description="Validate an object node"
- path="/0/@audits/@categories.0 /0/@audits/@categories.11"
- audits="/0/@audits/@rules.3 /0/@audits/@rules.4 /0/@audits/@rules.5 /0/@audits/@rules.6"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateMultiplicityElement"
- name="validateMultiplicityElement"
- description="Validate a multilicity element"
- path="/0/@audits/@categories.0 /0/@audits/@categories.12"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validatePin"
- name="validatePin"
- description="Validate a pin"
- path="/0/@audits/@categories.0 /0/@audits/@categories.13"
- audits="/0/@audits/@rules.7"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateInputPin"
- name="validateInputPin"
- description="Validate an input pin"
- path="/0/@audits/@categories.0 /0/@audits/@categories.14"
- audits="/0/@audits/@rules.8"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateActionInputPin"
- name="validateActionInputPin"
- description="Validate an action input pin"
- path="/0/@audits/@categories.0 /0/@audits/@categories.15"
- audits="/0/@audits/@rules.9 /0/@audits/@rules.10 /0/@audits/@rules.11"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateValuePin"
- name="validateValuePin"
- description="Validate a value pin"
- path="/0/@audits/@categories.0 /0/@audits/@categories.16"
- audits="/0/@audits/@rules.12 /0/@audits/@rules.13"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateOutputPin"
- name="validateOutputPin"
- description="Validate an output pin"
- path="/0/@audits/@categories.0 /0/@audits/@categories.17"
- audits="/0/@audits/@rules.14"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityEdge"
- name="validateActivityEdge"
- description="Validate an activity edge"
- path="/0/@audits/@categories.0 /0/@audits/@categories.18"
- audits="/0/@audits/@rules.15 /0/@audits/@rules.16 /0/@audits/@rules.17 /0/@audits/@rules.18 /0/@audits/@rules.65"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow"
- name="validateObjectFlow"
- description="Validate an object flow"
- path="/0/@audits/@categories.0 /0/@audits/@categories.19"
- audits="/0/@audits/@rules.19 /0/@audits/@rules.20 /0/@audits/@rules.21 /0/@audits/@rules.22 /0/@audits/@rules.23 /0/@audits/@rules.24 /0/@audits/@rules.25 /0/@audits/@rules.26"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateControlFlow"
- name="validateControlFlow"
- description="Validate a control flow"
- path="/0/@audits/@categories.0 /0/@audits/@categories.20"
- audits="/0/@audits/@rules.27"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode"
- name="validateDecisionNode"
- description="Validate a decision node"
- path="/0/@audits/@categories.0 /0/@audits/@categories.21"
- audits="/0/@audits/@rules.28 /0/@audits/@rules.29 /0/@audits/@rules.30 /0/@audits/@rules.31 /0/@audits/@rules.32 /0/@audits/@rules.33 /0/@audits/@rules.34 /0/@audits/@rules.35"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateMergeNode"
- name="validateMergeNode"
- description="Validate a merge node"
- path="/0/@audits/@categories.0 /0/@audits/@categories.22"
- audits="/0/@audits/@rules.36 /0/@audits/@rules.37"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateForkNode"
- name="validateForkNode"
- description="Validate a fork node"
- path="/0/@audits/@categories.0 /0/@audits/@categories.23"
- audits="/0/@audits/@rules.38 /0/@audits/@rules.39"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateJoinNode"
- name="validateJoinNode"
- description="Validate a join node"
- path="/0/@audits/@categories.0 /0/@audits/@categories.24"
- audits="/0/@audits/@rules.40 /0/@audits/@rules.41"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityParameterNode"
- name="validateActivityParameterNode"
- description="Validate an activity parameter node"
- path="/0/@audits/@categories.0 /0/@audits/@categories.25"
- audits="/0/@audits/@rules.42"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateCreateObjectActionClassifier"
- name="validateCreateObjectActionClassifier"
- description="Valide classifier for CreateObjectAction"
- path="/0/@audits/@categories.0 /0/@audits/@categories.26"
- audits="/0/@audits/@rules.43 /0/@audits/@rules.44"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validaterReadStructuralFeatureAction"
- name="validateReadStructuralfeatureAction"
- description="Constraints for Structural Feature Action"
- path="/0/@audits/@categories.0 /0/@audits/@categories.27"
- audits="/0/@audits/@rules.45"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateAddStructuralFeatureValueAction"
- name="validateAddStructuralFeatureValueAction"
- description="Constraint for AddStructuralFeatureValueAction"
- path="/0/@audits/@categories.0 /0/@audits/@categories.28"
- audits="/0/@audits/@rules.46 /0/@audits/@rules.47 /0/@audits/@rules.48 /0/@audits/@rules.49"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateDestroyObjectAction"
- name="validateDestroyObjectAction"
- description="Constraint for DestroyObjectAction"
- path="/0/@audits/@categories.0 /0/@audits/@categories.29"
- audits="/0/@audits/@rules.50"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateStructuralFeatureAction"
- name="validateStructuralfeatureAction"
- description="Constraint for StructuralFeatureAction"
- path="/0/@audits/@categories.0 /0/@audits/@categories.30"
- audits="/0/@audits/@rules.51 /0/@audits/@rules.52 /0/@audits/@rules.53 /0/@audits/@rules.54"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateAddVariableValueAction"
- name="validateAddvariablevalueAction"
- description="Constraint for AddVariableValueAction"
- path="/0/@audits/@categories.0 /0/@audits/@categories.31"
- audits="/0/@audits/@rules.55"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateWriteVariableAction"
- name="validateWriteVariableAction"
- description="Constraint for WriteVariableAction"
- path="/0/@audits/@categories.0 /0/@audits/@categories.32"
- audits="/0/@audits/@rules.56 /0/@audits/@rules.57"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateVariableAction"
- name="validateVariableAction"
- description="Constraint for VariableAction"
- path="/0/@audits/@categories.0 /0/@audits/@categories.33"
- audits="/0/@audits/@rules.58"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateReadVariableAction"
- name="validateReadVariableAction"
- description="Constraint for ReadVariableAction"
- path="/0/@audits/@categories.0 /0/@audits/@categories.34"
- audits="/0/@audits/@rules.59 /0/@audits/@rules.60"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateBroacastSignalAction"
- name="validateBroadcastSignalActionTODO"
- description="Constraint for BraodcastSignalAction"
- path="/0/@audits/@categories.0 /0/@audits/@categories.35"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateExceptionHandler_validateExceptionHandler"
- name="validateExceptionHandler"
- description="Constraint Exception Handler"
- path="/0/@audits/@categories.10"
- audits="/0/@audits/@rules.61 /0/@audits/@rules.63 /0/@audits/@rules.64"/>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateInterruptibleEdge"
- name="validateInterruptibleEdge"
- description="Constraint for interruptible Edge"
- path="/0/@audits/@categories.10"
- audits="/0/@audits/@rules.62"/>
- <rules
- name="validateNoIncomingEdges"
- description="An initial node has no incoming edge"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateInitialNode_validateNoIncomingEdges"
- rule="/0/@expressionProviders/@providers.1/@expressions.36"
- message="An initial node must have no incoming edge"
- useInLiveMode="true"
- category="/0/@audits/@categories.1">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InitialNode"/>
- </target>
- </rules>
- <rules
- name="validateControlEdges"
- description="Only control edges can have initial nodes as source"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateInitialNode_validateControlEdges"
- rule="/0/@expressionProviders/@providers.1/@expressions.37"
- message="Source of an object flow must not be an initial node"
- useInLiveMode="true"
- category="/0/@audits/@categories.1">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
- </target>
- </rules>
- <rules
- name="validateNoOutgoingEdges"
- description="A fianl node has no outgoing edge"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateFinalNode_validateNoOutgoingEdges"
- rule="/0/@expressionProviders/@providers.1/@expressions.38"
- message="A final node must have no outgoing edge"
- useInLiveMode="true"
- category="/0/@audits/@categories.2">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/FinalNode"/>
- </target>
- </rules>
- <rules
- name="validateNotUnique"
- description="Object nodes are not unique typed elements"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectNode_validateNotUnique"
- rule="/0/@expressionProviders/@providers.1/@expressions.39"
- message="isUnique must be false for object nodes."
- useInLiveMode="true"
- category="/0/@audits/@categories.11">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectNode"/>
- </target>
- </rules>
- <rules
- name="validateSelectionBehavior"
- description="If an object node has a selection behavior, then the ordering of the object node is ordered, and vice versa."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectNode_validateSelectionBehavior"
- rule="/0/@expressionProviders/@providers.1/@expressions.40"
- message="isOrdered means there is a selection behavior for object nodes."
- category="/0/@audits/@categories.11">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectNode"/>
- </target>
- </rules>
- <rules
- name="validateObjectFlowEdges"
- description="All edges coming into or going out of object nodes must be object flow edges."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectNode_validateObjectFlowEdges"
- rule="/0/@expressionProviders/@providers.1/@expressions.41"
- message="All edges coming into or going out of object nodes must be object flow edges."
- category="/0/@audits/@categories.11">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectNode"/>
- </target>
- </rules>
- <rules
- name="validateInputOutputParameter"
- description="A selection behavior has one input parameter and one output parameter. The input parameter must be a bag of elements of the same type as the object node or a supertype of the type of object node. The output parameter must be the same or a subtype of the type of object node. The behavior cannot have side effects."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectNode_validateInputOutputParameter"
- rule="/0/@expressionProviders/@providers.0/@expressions.101"
- message="The selection behavior of an object node must have one input parameter and one output parameter. The parameters types must be compatible with the object node's type."
- category="/0/@audits/@categories.11">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectNode"/>
- </target>
- </rules>
- <rules
- name="validateControlPins"
- description="Control pins have a control type"
- id="org.eclipse.uml2.uml.util.UMLValidator.validatePin_validateControlPins"
- rule="/0/@expressionProviders/@providers.1/@expressions.42"
- message="isControl muts imply isControlType for pins."
- useInLiveMode="true"
- category="/0/@audits/@categories.13">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pin"/>
- </target>
- </rules>
- <rules
- name="validateOutgoingEdgesStructuredOnly"
- description="Input pins may have outgoing edges only when they are on actions that are structured nodes, and these edges must target a node contained by the structured node."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateInputPin_validateOutgoingEdgesStructuredOnly"
- rule="/0/@expressionProviders/@providers.1/@expressions.43"
- message="Input pins may have outgoing edges only when they are on actions that are structured nodes, and these edges must target a node contained by the structured node."
- useInLiveMode="true"
- category="/0/@audits/@categories.14">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- </target>
- </rules>
- <rules
- name="validateOneOutputPin"
- description="The fromAction of an action input pin must have exactly one output pin."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateActionInputPin_validateOneOutputPin"
- rule="/0/@expressionProviders/@providers.1/@expressions.44"
- message="The fromAction of an action input pin must have exactly one output pin."
- useInLiveMode="true"
- category="/0/@audits/@categories.15">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
- </target>
- </rules>
- <rules
- name="validateInputPin"
- description="The fromAction of an action input pin must only have action input pins as input pins."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateActionInputPin_validateInputPin"
- rule="/0/@expressionProviders/@providers.1/@expressions.45"
- message="The fromAction of an action input pin must only have action input pins as input pins."
- useInLiveMode="true"
- category="/0/@audits/@categories.15">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
- </target>
- </rules>
- <rules
- name="validateNoControlOrDataFlow"
- description="The fromAction of an action input pin cannot have control or data flows coming into or out of it or its pins."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateActionInputPin_validateNoControlOrDataFlow"
- rule="/0/@expressionProviders/@providers.1/@expressions.46"
- message="The fromAction of an action input pin cannot have control or data flows coming into or out of it or its pins."
- useInLiveMode="true"
- category="/0/@audits/@categories.15">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
- </target>
- </rules>
- <rules
- name="validateCompatibleType"
- description="The type of value specification must be compatible with the type of the value pin."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateValuePin_validateCompatibleType"
- rule="/0/@expressionProviders/@providers.0/@expressions.102"
- message="The type of value specification must be compatible with the type of the value pin."
- useInLiveMode="true"
- category="/0/@audits/@categories.16">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
- </target>
- </rules>
- <rules
- name="validateNoIncomingEdges"
- description="Value pins have no incoming edges."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateValuePin_validateNoIncomingEdges"
- rule="/0/@expressionProviders/@providers.1/@expressions.47"
- message="Value pins have no incoming edges."
- useInLiveMode="true"
- category="/0/@audits/@categories.16">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
- </target>
- </rules>
- <rules
- name="validateIncomingEdgesStructuredOnly"
- description="Output pins may have incoming edges only when they are on actions that are structured nodes, and these edges may not target a node contained by the structured node."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateOutputPin_validateIncomingEdgesStructuredOnly"
- rule="/0/@expressionProviders/@providers.1/@expressions.48"
- message="Output pins may have incoming edges only when they are on actions that are structured nodes, and these edges may not target a node contained by the structured node."
- useInLiveMode="true"
- category="/0/@audits/@categories.17">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- </target>
- </rules>
- <rules
- name="validateSourceAndTarget"
- description="The source and target of an edge must be in the same activity as the edge."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityEdge_validateSourceAndTarget"
- rule="/0/@expressionProviders/@providers.0/@expressions.103"
- message="The source and target of an edge must be in the same activity as the edge."
- useInLiveMode="true"
- category="/0/@audits/@categories.18">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge"/>
- </target>
- </rules>
- <rules
- name="validateOwned"
- description="Activity edges may be owned only by activities or groups."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityEdge_validateOwned"
- rule="/0/@expressionProviders/@providers.1/@expressions.49"
- message="Activity edges may be owned only by activities or groups."
- useInLiveMode="true"
- category="/0/@audits/@categories.18">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge"/>
- </target>
- </rules>
- <rules
- name="validateStructuredNode"
- description="Activity edges may be owned by at most one structured node."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityEdge_validateStructuredNode"
- rule="/0/@expressionProviders/@providers.1/@expressions.50"
- message="Activity edges may be owned by at most one structured node."
- useInLiveMode="true"
- category="/0/@audits/@categories.18">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge"/>
- </target>
- </rules>
- <rules
- name="validateHasSourceAndTarget"
- description="The source and target of an edge must be defined."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityEdge_validateHasSourceAndTarget"
- rule="/0/@expressionProviders/@providers.1/@expressions.51"
- message="The source and target of an edge must be defined."
- category="/0/@audits/@categories.18">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge"/>
- </target>
- </rules>
- <rules
- name="validateNoActions"
- description="Object flows may not have actions at either end."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateNoActions"
- rule="/0/@expressionProviders/@providers.1/@expressions.52"
- message="You can not link an action with an object flow"
- useInLiveMode="true"
- category="/0/@audits/@categories.19">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
- </target>
- </rules>
- <rules
- name="validateCompatibleTypes"
- description="Object nodes connected by an object flow, with optionally intervening control nodes, must have compatible types. In particular, the downstream object node type must be the same or a supertype of the upstream object node type"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateCompatibleTypes"
- rule="/0/@expressionProviders/@providers.0/@expressions.104"
- message="The object flow must link object nodes with compatible types (target type must be a supertype of the source type)."
- useInLiveMode="true"
- category="/0/@audits/@categories.19">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
- </target>
- </rules>
- <rules
- name="validateSameUpperBounds"
- description="Object nodes connected by an object flow, with optionally intervening control nodes, must have the same upper bounds."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateSameUpperBounds"
- rule="/0/@expressionProviders/@providers.0/@expressions.105"
- message="The object flow must link object nodes with the same upper bounds."
- useInLiveMode="true"
- category="/0/@audits/@categories.19">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
- </target>
- </rules>
- <rules
- name="validateTarget"
- description="An edge with constant weight may not target an object node, or lead to an object node downstream with no intervening actions, that has an upper bound less than the weight."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateTarget"
- rule="/0/@expressionProviders/@providers.0/@expressions.106"
- message="The target object node's upper bounds must be less than the object flow weight"
- useInLiveMode="true"
- category="/0/@audits/@categories.19">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
- </target>
- </rules>
- <rules
- name="validateTransformationBehaviour"
- description="A transformation behavior has one input parameter and one output parameter. The input parameter must be the same as or a supertype of the type of object token coming from the source end. The output parameter must be the same or a subtype of the type of object token expected downstream. The behavior cannot have side effects."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateTransformationBehaviour"
- rule="/0/@expressionProviders/@providers.0/@expressions.107"
- message="A transformation behavior has one input parameter and one output parameter. The input parameter must be the same as or a supertype of the type of object token coming from the source end. The output parameter must be the same or a subtype of the type of object token expected downstream. The behavior cannot have side effects."
- useInLiveMode="true"
- category="/0/@audits/@categories.19">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
- </target>
- </rules>
- <rules
- name="validateSelectionBehaviour"
- description="An object flow may have a selection behavior only if it has an object node as a source."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateSelectionBehaviour"
- rule="/0/@expressionProviders/@providers.1/@expressions.53"
- message="Selection behavior is authorized only when the object flow's source is an object node."
- useInLiveMode="true"
- category="/0/@audits/@categories.19">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
- </target>
- </rules>
- <rules
- name="validateInputAndOutputParameter"
- description="A selection behavior has one input parameter and one output parameter. The input parameter must be a bag of elements of the same as or a supertype of the type of source object node. The output parameter must be the same or a subtype of the type of source object node. The behavior cannot have side effects."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateInputAndOutputParameter"
- rule="/0/@expressionProviders/@providers.0/@expressions.108"
- message="A selection behavior has one input parameter and one output parameter. The input parameter must be a bag of elements of the same as or a supertype of the type of source object node. The output parameter must be the same or a subtype of the type of source object node. The behavior cannot have side effects."
- useInLiveMode="true"
- category="/0/@audits/@categories.19">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
- </target>
- </rules>
- <rules
- name="validateIsMulticastOrIsMultireceive"
- description="isMulticast and isMultireceive cannot both be true."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateIsMulticastOrIsMultireceive"
- rule="/0/@expressionProviders/@providers.1/@expressions.54"
- message="isMulticast and isMultireceive cannot both be true."
- useInLiveMode="true"
- category="/0/@audits/@categories.19">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
- </target>
- </rules>
- <rules
- name="validateObjectNodes"
- description="Control flows may not have object nodes at either end, except for object nodes with control type"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateControlFlow_validateObjectNodes"
- rule="/0/@expressionProviders/@providers.1/@expressions.55"
- message="You can not link an object node with a control flow (except if its control type is true)."
- useInLiveMode="true"
- category="/0/@audits/@categories.20">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ControlFlow"/>
- </target>
- </rules>
- <rules
- name="validateIncomingOutgoingEdges"
- description="A decision node has one or two incoming edges and at least one outgoing edge."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateIncomingOutgoingEdges"
- rule="/0/@expressionProviders/@providers.1/@expressions.56"
- message="A decision node has one or two incoming edges and at least one outgoing edge."
- category="/0/@audits/@categories.21">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
- </target>
- </rules>
- <rules
- name="validateEdges"
- description="The edges coming into and out of a decision node, other than the decision input flow (if any), must be either all object flows or all control flows."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateEdges"
- rule="/0/@expressionProviders/@providers.1/@expressions.57"
- message="Edges linking the decision node must have be of the same type (except decision input flow)."
- category="/0/@audits/@categories.21">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
- </target>
- </rules>
- <rules
- name="validateDecisionInputFlowIncoming"
- description="The decisionInputFlow of a decision node must be an incoming edge of the decision node."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateDecisionInputFlowIncoming"
- rule="/0/@expressionProviders/@providers.1/@expressions.58"
- message="The decisionInputFlow of a decision node must be an incoming edge of the decision node."
- useInLiveMode="true"
- category="/0/@audits/@categories.21">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
- </target>
- </rules>
- <rules
- name="validateParameters"
- description="A decision input behavior has no output parameters, no in-out parameters and one return parameter."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateParameters"
- rule="/0/@expressionProviders/@providers.1/@expressions.59"
- message="A decision input behavior has no output parameters, no in-out parameters and one return parameter."
- useInLiveMode="true"
- category="/0/@audits/@categories.21">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
- </target>
- </rules>
- <rules
- name="validateZeroInputParameters"
- description="If the decision node has no decision input flow and an incoming control flow, then a decision input behavior has zero input parameters."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateZeroInputParameters"
- rule="/0/@expressionProviders/@providers.1/@expressions.60"
- message="If the decision node has no decision input flow and an incoming control flow, then a decision input behavior has zero input parameters."
- category="/0/@audits/@categories.21">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
- </target>
- </rules>
- <rules
- name="validateIncomingObjectOneInputParameter"
- description="If the decision node has no decision input flow and an incoming object flow, then a decision input behavior has one input parameter whose type is the same as or a supertype of the type of object tokens offered on the incoming edge."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateIncomingObjectOneInputParameter"
- rule="/0/@expressionProviders/@providers.0/@expressions.109"
- message="If the decision node has no decision input flow and an incoming object flow, then a decision input behavior has one input parameter whose type is the same as or a supertype of the type of object tokens offered on the incoming edge."
- category="/0/@audits/@categories.21">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
- </target>
- </rules>
- <rules
- name="validateIncomingControlOneInputParameter"
- description="If the decision node has a decision input flow and an incoming control flow, then a decision input behavior has one input parameter whose type is the same as or a supertype of the type of object tokens offered on the decision input flow."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateIncomingControlOneInputParameter"
- rule="/0/@expressionProviders/@providers.0/@expressions.110"
- message="If the decision node has a decision input flow and an incoming control flow, then a decision input behavior has one input parameter whose type is the same as or a supertype of the type of object tokens offered on the decision input flow."
- category="/0/@audits/@categories.21">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
- </target>
- </rules>
- <rules
- name="validateTwoInputParameters"
- description="If the decision node has a decision input flow and an second incoming object flow, then a decision input behavior has two input parameters, the first of which has a type that is the same as or a supertype of the type of the type of object tokens offered on the nondecision input flow and the second of which has a type that is the same as or a supertype of the type of object tokens offered on the decision input flow."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateTwoInputParameters"
- rule="/0/@expressionProviders/@providers.0/@expressions.111"
- message="If the decision node has a decision input flow and an incoming control flow, then a decision input behavior has one input parameter whose type is the same as or a supertype of the type of object tokens offered on the decision input flow."
- category="/0/@audits/@categories.21">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
- </target>
- </rules>
- <rules
- name="validateOneOutgoingEdge"
- description="A merge node has one outgoing edge."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateMergeNode_validateOneOutgoingEdge"
- rule="/0/@expressionProviders/@providers.1/@expressions.61"
- message="A merge node has one outgoing edge."
- category="/0/@audits/@categories.22">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/MergeNode"/>
- </target>
- </rules>
- <rules
- name="validateEdges"
- description="The edges coming into and out of a merge node must be either all object flows or all control flows."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateMergeNode_validateEdges"
- rule="/0/@expressionProviders/@providers.1/@expressions.62"
- message="The edges coming into and out of a merge node must be either all object flows or all control flows."
- category="/0/@audits/@categories.22">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/MergeNode"/>
- </target>
- </rules>
- <rules
- name="validateOneIncomingEdge"
- description="A fork node has one incoming edge."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateForkNode_validateOneIncomingEdge"
- rule="/0/@expressionProviders/@providers.1/@expressions.63"
- message="A fork node has one incoming edge."
- category="/0/@audits/@categories.23">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ForkNode"/>
- </target>
- </rules>
- <rules
- name="validateEdges"
- description="The edges coming into and out of a fork node must be either all object flows or all control flows."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateForkNode_validateEdges"
- rule="/0/@expressionProviders/@providers.1/@expressions.64"
- message="The edges coming into and out of a fork node must be either all object flows or all control flows."
- category="/0/@audits/@categories.23">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ForkNode"/>
- </target>
- </rules>
- <rules
- name="validateOneOutgoingEdge"
- description="A join node has one outgoing edge."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateJoinNode_validateOneOutgoingEdge"
- rule="/0/@expressionProviders/@providers.1/@expressions.65"
- message="A join node has one outgoing edge."
- category="/0/@audits/@categories.24">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/JoinNode"/>
- </target>
- </rules>
- <rules
- name="validateIncomingObjectFlow"
- description="If a join node has an incoming object flow, it must have an outgoing object flow, otherwise, it must have an outgoing control flow."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateJoinNode_validateIncomingObjectFlow"
- rule="/0/@expressionProviders/@providers.1/@expressions.66"
- message="If a join node has an incoming object flow, it must have an outgoing object flow, otherwise, it must have an outgoing control flow."
- category="/0/@audits/@categories.24">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/JoinNode"/>
- </target>
- </rules>
- <rules
- name="validateIncomingOrOutgoing"
- description="An activity parameter node must not have both incoming and outgoing edges."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityParameterNode_validateIncomingOrOutgoing"
- rule="/0/@expressionProviders/@providers.1/@expressions.67"
- message="An activity parameter node must not have both incoming and outgoing edges."
- useInLiveMode="true"
- category="/0/@audits/@categories.25">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityParameterNode"/>
- </target>
- </rules>
- <rules
- name="validateNotAbstract"
- description="Check that the classifier is not abstract"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateCreateObjectActionClassifier_notAbstract"
- rule="/0/@expressionProviders/@providers.1/@expressions.68"
- message="The classifier cannot be abstract."
- useInLiveMode="true"
- category="/0/@audits/@categories.26">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CreateObjectAction"/>
- </target>
- </rules>
- <rules
- name="valideNotAssociationClass"
- description="Check that the classifier is not an association class"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateCreateObjectActionClassifier_notClassifier"
- rule="/0/@expressionProviders/@providers.1/@expressions.69"
- message="The classifier cannot be an association class."
- useInLiveMode="true"
- category="/0/@audits/@categories.26">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CreateObjectAction"/>
- </target>
- </rules>
- <rules
- name="validateOnlyOneClassifier"
- description="Check that a structural feature has exactly one featuringClassifier."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateReadStructuralFeatureAction_onlyOneClassifier"
- rule="/0/@expressionProviders/@providers.1/@expressions.70"
- message="A structural feature has exactly one featuringClassifier."
- category="/0/@audits/@categories.27">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadStructuralFeatureAction"/>
- </target>
- </rules>
- <rules
- name="validateInputPinType"
- description="Check valide that the type of the input pin is the same than the one from the structural feature"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateAddStructuralFeatureValueAction_ValidInputPinType"
- rule="/0/@expressionProviders/@providers.1/@expressions.71"
- message="The type of the value input pin is the same as the type of the structural feature."
- category="/0/@audits/@categories.28">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddStructuralFeatureValueAction"/>
- </target>
- </rules>
- <rules
- name="validateOutputPinType"
- description="Check that the type of the result output pin is the same as the type of the inherited object input pin."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateAddStructuralFeatureValueAction_validateOutputPinType"
- rule="/0/@expressionProviders/@providers.1/@expressions.72"
- message="The type of the result output pin is the same as the type of the inherited object input pin."
- category="/0/@audits/@categories.28">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddStructuralFeatureValueAction"/>
- </target>
- </rules>
- <rules
- name="A value input pin is required"
- description="Check that a value input pin is required"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateAddStructuralFeatureValueAction_valideTheRequiredValuePin"
- rule="/0/@expressionProviders/@providers.1/@expressions.73"
- message="org.eclipse.uml2.uml.util.UMLValidator.validateAddStructuralFeatureValueAction"
- category="/0/@audits/@categories.28">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddStructuralFeatureValueAction"/>
- </target>
- </rules>
- <rules
- name="validateOnlyOneClassifier"
- description="Check that a structural feature has exactly one featuringClassifier."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateAddStructuralFeatureValueAction_onlyOneClassifier"
- rule="/0/@expressionProviders/@providers.1/@expressions.74"
- message="A structural feature has exactly one featuringClassifier."
- category="/0/@audits/@categories.28">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddStructuralFeatureValueAction"/>
- </target>
- </rules>
- <rules
- name="validateInputPinHasNoType"
- description="Check that the input pin has no type"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateDestroyObjectAction_InputPinHasNotType"
- rule="/0/@expressionProviders/@providers.1/@expressions.75"
- message="The input pin has no type"
- useInLiveMode="true"
- category="/0/@audits/@categories.29">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DestroyObjectAction"/>
- </target>
- </rules>
- <rules
- name="validateFeatureNotStatic"
- description="Check that the structural feature must not be static."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateStructuralFeatureAction_FeatureNotStatic"
- rule="/0/@expressionProviders/@providers.1/@expressions.76"
- message="The structural feature must not be static."
- useInLiveMode="true"
- category="/0/@audits/@categories.30">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction"/>
- </target>
- </rules>
- <rules
- name="validateValideTypeOwningFeature"
- description="Check that the structural feature must either be owned by the type of the object input pin, or it must be an owned end of a binary"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateStructuralFeatureAction_validateOwningFeteatringType"
- rule="/0/@expressionProviders/@providers.1/@expressions.77"
- message="The structural feature must either be owned by the type of the object input pin, or it must be an owned end of a binary"
- category="/0/@audits/@categories.30">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction"/>
- </target>
- </rules>
- <rules
- name="validateInputPinMultiplicity"
- description="Check that the multiplicity of the object input pin must be 1..1."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateStructuralFeatureAction_InputPinMulitplicity"
- rule="/0/@expressionProviders/@providers.1/@expressions.78"
- message="The multiplicity of the object input pin must be 1..1."
- category="/0/@audits/@categories.30">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction"/>
- </target>
- </rules>
- <rules
- name="validateOnlyOneFeaturingClassifier"
- description="Check that a structural feature has exactly one featuringClassifier."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateStructuralFeatureAction_OnlyOneFeaturingClassifier"
- rule="/0/@expressionProviders/@providers.1/@expressions.79"
- message="A structural feature has exactly one featuringClassifier."
- category="/0/@audits/@categories.30">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction"/>
- </target>
- </rules>
- <rules
- name="validateInputPinAsValueAsAtLeastOneInputPin"
- description="Check that a value input pin is required."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateAddVariableValueAction_AsAtLeastOneInputPin"
- rule="/0/@expressionProviders/@providers.1/@expressions.80"
- message="A value input pin is required."
- category="/0/@audits/@categories.31">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddVariableValueAction"/>
- </target>
- </rules>
- <rules
- name="valideInputPinType"
- description="Check that the type input pin is the same as the type of the variable."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateWriteVariableAction_InputPinValidePin"
- rule="/0/@expressionProviders/@providers.1/@expressions.81"
- message="The type input pin is the same as the type of the variable."
- category="/0/@audits/@categories.32">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteVariableAction"/>
- </target>
- </rules>
- <rules
- name="validateInputPinMultiplicity"
- description="Check that the multiplicity of the input pin is 1..1."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateWriteVariableAction_valideInputPinMultiplicity"
- rule="/0/@expressionProviders/@providers.1/@expressions.82"
- message="The multiplicity of the input pin is 1..1."
- category="/0/@audits/@categories.32">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteVariableAction"/>
- </target>
- </rules>
- <rules
- name="validateVariableScope"
- description="Check that the action must be in the scope of the variable."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateVariableAction_VariableScope"
- rule="/0/@expressionProviders/@providers.1/@expressions.83"
- message="The action must be in the scope of the variable."
- category="/0/@audits/@categories.33">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/VariableAction"/>
- </target>
- </rules>
- <rules
- name="validateOutputPinType"
- description="Check that the type and ordering of the result output pin of a read-variable action are the same as the type and ordering of the"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateReadVariableAction_OutputPinType"
- rule="/0/@expressionProviders/@providers.1/@expressions.84"
- message="The type and ordering of the result output pin of a read-variable action are the same as the type and ordering of the"
- category="/0/@audits/@categories.34">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadVariableAction"/>
- </target>
- </rules>
- <rules
- name="validateOutputPinMultiplicity"
- description="Check that the multiplicity of the variable must be compatible with the multiplicity of the output pin"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateReadVariableAction_OutputPinMultiplicity"
- rule="/0/@expressionProviders/@providers.1/@expressions.85"
- message="The multiplicity of the variable must be compatible with the multiplicity of the output pin"
- category="/0/@audits/@categories.34">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadVariableAction"/>
- </target>
- </rules>
- <rules
- name="validateException_HandlerBody_Constraint4"
- description="The handler body has one input, and that input is the same as the exception input."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateExceptionHandler_validateException_HandlerBody_Constraint4"
- rule="/0/@expressionProviders/@providers.0/@expressions.113"
- message="The handler body has one input, and that input is the same as the exception input."
- useInLiveMode="true"
- category="/0/@audits/@categories.36">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExceptionHandler"/>
- </target>
- </rules>
- <rules
- name="validateInterruptibleEdge"
- description="Validate the constraint for interruptible Edge"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateInterruptibleEdge_validateEdge"
- rule="/0/@expressionProviders/@providers.0/@expressions.112"
- message="Interrupting edges of a region must have their source node in the region and their target node outside the region in the"
- useInLiveMode="true"
- category="/0/@audits/@categories.37">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge"/>
- </target>
- </rules>
- <rules
- name="validateException_StructuredActivityNode_Constraint3"
- description="If the protected node is a StructuredActivityNode with output pins, then the exception handler body must also be a StructuredActivityNode with output pins that correspond in number and types to those of the protected node."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateExceptionHandler_validateException_StructuredActivityNode_Constraint3"
- rule="/0/@expressionProviders/@providers.0/@expressions.116"
- message="If the protected node is a StructuredActivityNode with output pins, then the exception handler body must also be a StructuredActivityNode with output pins that correspond in number and types to those of the protected node."
- useInLiveMode="true"
- category="/0/@audits/@categories.36">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExceptionHandler"/>
- </target>
- </rules>
- <rules
- name="validateException_SourceAndTargetEdge_Constraint1"
- description="The exception handler and its input object node are not the source or target of any edge."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateExceptionHandler_validateException_SourceAndTargetEdge_Constraint1"
- rule="/0/@expressionProviders/@providers.0/@expressions.115"
- message="The exception handler and its input object node are not the source or target of any edge."
- useInLiveMode="true"
- category="/0/@audits/@categories.36">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExceptionHandler"/>
- </target>
- </rules>
- <rules
- name="validateException_StructuredActivityNode_Constraint2"
- description="An edge that has a source in an exception handler structured node must also have its target in the handler, and vice versa."
- id="org.eclipse.uml2.uml.util.UMLValidator.validateExceptionHandler_validateException_StructuredActivityNode_Constraint2"
- rule="/0/@expressionProviders/@providers.0/@expressions.114"
- message="An edge that has a source in an exception handler structured node must also have its target in the handler, and vice versa."
- category="/0/@audits/@categories.18">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge"/>
- </target>
- </rules>
- <clientContexts
- ruleTargets="/0/@audits/@rules.0/@target /0/@audits/@rules.1/@target /0/@audits/@rules.2/@target /0/@audits/@rules.3/@target /0/@audits/@rules.4/@target /0/@audits/@rules.5/@target /0/@audits/@rules.6/@target /0/@audits/@rules.7/@target /0/@audits/@rules.8/@target /0/@audits/@rules.9/@target /0/@audits/@rules.10/@target /0/@audits/@rules.11/@target /0/@audits/@rules.12/@target /0/@audits/@rules.13/@target /0/@audits/@rules.14/@target /0/@audits/@rules.15/@target /0/@audits/@rules.16/@target /0/@audits/@rules.17/@target /0/@audits/@rules.18/@target /0/@audits/@rules.19/@target /0/@audits/@rules.20/@target /0/@audits/@rules.21/@target /0/@audits/@rules.22/@target /0/@audits/@rules.23/@target /0/@audits/@rules.24/@target /0/@audits/@rules.25/@target /0/@audits/@rules.26/@target /0/@audits/@rules.27/@target /0/@audits/@rules.28/@target /0/@audits/@rules.29/@target /0/@audits/@rules.30/@target /0/@audits/@rules.31/@target /0/@audits/@rules.32/@target /0/@audits/@rules.33/@target /0/@audits/@rules.34/@target /0/@audits/@rules.35/@target /0/@audits/@rules.36/@target /0/@audits/@rules.37/@target /0/@audits/@rules.38/@target /0/@audits/@rules.39/@target /0/@audits/@rules.40/@target /0/@audits/@rules.41/@target /0/@audits/@rules.42/@target /0/@audits/@rules.43/@target /0/@audits/@rules.44/@target /0/@audits/@rules.45/@target /0/@audits/@rules.46/@target /0/@audits/@rules.47/@target /0/@audits/@rules.48/@target /0/@audits/@rules.49/@target /0/@audits/@rules.50/@target /0/@audits/@rules.51/@target /0/@audits/@rules.52/@target /0/@audits/@rules.53/@target /0/@audits/@rules.54/@target /0/@audits/@rules.55/@target /0/@audits/@rules.56/@target /0/@audits/@rules.57/@target /0/@audits/@rules.58/@target /0/@audits/@rules.59/@target /0/@audits/@rules.60/@target /0/@audits/@rules.61/@target /0/@audits/@rules.62/@target /0/@audits/@rules.63/@target /0/@audits/@rules.64/@target /0/@audits/@rules.65/@target"/>
- </audits>
- <diagram
- visualID="1000"
- editPartClassName="ActivityDiagramEditPart"
- itemSemanticEditPolicyClassName="ActivityDiagramItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ActivityDiagramCanonicalEditPolicy"
- iconProviderPriority="Low"
- validationProviderPriority="Low"
- validationEnabled="true"
- validationDecorators="true"
- liveValidationUIFeedback="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="PackageEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- <domainDiagramElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3001"
- editPartClassName="ParameterEditPart"
- itemSemanticEditPolicyClassName="ParameterItemSemanticEditPolicy"
- notationViewFactoryClassName="ParameterViewFactory"
- canonicalEditPolicyClassName="ParameterCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ParameterGraphicalNodeEditPolicy"
- createCommandClassName="ParameterCreateCommand"
- containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.11">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.Parameter_3001"
- displayName="Parameter">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.44/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Parameter"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior/ownedParameter"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior/ownedParameter"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- parser="/0/@labelParsers/@implementations.3"/>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3002"
- editPartClassName="ConstraintInActivityAsPrecondEditPart"
- itemSemanticEditPolicyClassName="ConstraintInActivityAsPrecondItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintViewFactory"
- canonicalEditPolicyClassName="ConstraintInActivityAsPrecondCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ConstraintInActivityAsPrecondGraphicalNodeEditPolicy"
- createCommandClassName="ConstraintInActivityAsPrecondCreateCommand"
- containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.12">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.0/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior/precondition"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.2">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.25"
- viewPattern="&lt;&lt;precondition>> {0}"
- editorPattern="{0}"
- editPattern="{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3003"
- editPartClassName="ConstraintInActivityAsPostcondEditPart"
- itemSemanticEditPolicyClassName="ConstraintInActivityAsPostcondItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintViewFactory"
- canonicalEditPolicyClassName="ConstraintInActivityAsPostcondCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ConstraintInActivityAsPostcondGraphicalNodeEditPolicy"
- createCommandClassName="ConstraintInActivityAsPostcondCreateCommand"
- containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.13">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.0/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior/postcondition"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.3">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.24"
- viewPattern="&lt;&lt;postcondition>> {0}"
- editorPattern="{0}"
- editPattern="{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- visualID="3004"
- editPartClassName="InitialNodeEditPart"
- itemSemanticEditPolicyClassName="InitialNodeItemSemanticEditPolicy"
- notationViewFactoryClassName="InitialNodeViewFactory"
- canonicalEditPolicyClassName="InitialNodeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InitialNodeGraphicalNodeEditPolicy"
- createCommandClassName="InitialNodeCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InitialNode_3004"
- displayName="InitialNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.150/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.InitialNode"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InitialNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.4">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5080"
- editPartClassName="InitialNodeAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="InitialNodeAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="InitialNodeLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3005"
- editPartClassName="ActivityFinalNodeEditPart"
- itemSemanticEditPolicyClassName="ActivityFinalNodeItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityFinalNodeViewFactory"
- canonicalEditPolicyClassName="ActivityFinalNodeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ActivityFinalNodeGraphicalNodeEditPolicy"
- createCommandClassName="ActivityFinalNodeCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActivityFinalNode_3005"
- displayName="ActivityFinalNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.92/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.FinalNode">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="20"
- height="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityFinalNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.5">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5081"
- editPartClassName="ActivityFinalNodeAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ActivityFinalNodeAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityFinalNodeLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3006"
- editPartClassName="FlowFinalNodeEditPart"
- itemSemanticEditPolicyClassName="FlowFinalNodeItemSemanticEditPolicy"
- notationViewFactoryClassName="FlowFinalNodeViewFactory"
- canonicalEditPolicyClassName="FlowFinalNodeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="FlowFinalNodeGraphicalNodeEditPolicy"
- createCommandClassName="FlowFinalNodeCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.FlowFinalNode_3006"
- displayName="FlowFinalNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.144/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.FlowFinalNode">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="20"
- height="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/FlowFinalNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.6">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5082"
- editPartClassName="FlowFinalNodeAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="FlowFinalNodeAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="FlowFinalNodeLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3007"
- editPartClassName="OpaqueActionEditPart"
- itemSemanticEditPolicyClassName="OpaqueActionItemSemanticEditPolicy"
- notationViewFactoryClassName="OpaqueActionViewFactory"
- canonicalEditPolicyClassName="OpaqueActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10"
- graphicalNodeEditPolicyClassName="OpaqueActionGraphicalNodeEditPolicy"
- createCommandClassName="OpaqueActionCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OpaqueAction_3007"
- displayName="OpaqueAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.161/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionObjectFlowWithPinsCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.7">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5003"
- editPartClassName="OpaqueActionNameEditPart"
- itemSemanticEditPolicyClassName="OpaqueActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="OpaqueActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3015"
- editPartClassName="ValuePinInOpaqueActEditPart"
- itemSemanticEditPolicyClassName="ValuePinInOpaqueActItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinViewFactory"
- canonicalEditPolicyClassName="ValuePinInOpaqueActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ValuePinInOpaqueActGraphicalNodeEditPolicy"
- createCommandClassName="ValuePinInOpaqueActCreateCommand"
- containers="/0/@diagram/@childNodes.6"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3015"
- displayName="ValuePin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/inputValue"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/inputValue"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.8">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5011"
- editPartClassName="ValuePinInOActLabelEditPart"
- itemSemanticEditPolicyClassName="ValuePinInOActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5024"
- editPartClassName="ValuePinInOActValueEditPart"
- itemSemanticEditPolicyClassName="ValuePinInOActValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5083"
- editPartClassName="ValuePinInOActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ValuePinInOActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3016"
- editPartClassName="ActionInputPinInOpaqueActEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInOpaqueActItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinViewFactory"
- canonicalEditPolicyClassName="ActionInputPinInOpaqueActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ActionInputPinInOpaqueActGraphicalNodeEditPolicy"
- createCommandClassName="ActionInputPinInOpaqueActCreateCommand"
- containers="/0/@diagram/@childNodes.6"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3016"
- displayName="ActionInputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/inputValue"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/inputValue"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.9">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5012"
- editPartClassName="ActionInputPinInOActLabelEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInOActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5025"
- editPartClassName="ActionInputPinInOActValueEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInOActValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5084"
- editPartClassName="ActionInputPinInOActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInOActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3013"
- editPartClassName="InputPinInOpaqueActEditPart"
- itemSemanticEditPolicyClassName="InputPinInOpaqueActItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInOpaqueActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInOpaqueActGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInOpaqueActCreateCommand"
- containers="/0/@diagram/@childNodes.6"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3013"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/inputValue"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/inputValue"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.10">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5009"
- editPartClassName="InputPinInOActLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInOActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5085"
- editPartClassName="InputPinInOActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="InputPinInOActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3014"
- editPartClassName="OutputPinInOpaqueActEditPart"
- itemSemanticEditPolicyClassName="OutputPinInOpaqueActItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinViewFactory"
- canonicalEditPolicyClassName="OutputPinInOpaqueActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OutputPinInOpaqueActGraphicalNodeEditPolicy"
- createCommandClassName="OutputPinInOpaqueActCreateCommand"
- containers="/0/@diagram/@childNodes.6"
- preferredSideName="EAST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3014"
- displayName="OutputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/outputValue"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/outputValue"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.11">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5010"
- editPartClassName="OutputPinInOActLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInOActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5086"
- editPartClassName="OutputPinInOActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="OutputPinInOActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3008"
- editPartClassName="CallBehaviorActionEditPart"
- itemSemanticEditPolicyClassName="CallBehaviorActionItemSemanticEditPolicy"
- notationViewFactoryClassName="CallBehaviorActionViewFactory"
- canonicalEditPolicyClassName="CallBehaviorActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15"
- graphicalNodeEditPolicyClassName="CallBehaviorActionGraphicalNodeEditPolicy"
- createCommandClassName="CallBehaviorActionCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.CallBehaviorAction_3008"
- displayName="CallBehaviorAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.100/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.CallBehaviorActionFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallBehaviorAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.12">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5004"
- editPartClassName="CallBehaviorActionNameEditPart"
- itemSemanticEditPolicyClassName="CallBehaviorActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="CallBehaviorActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.5"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3017"
- editPartClassName="ValuePinInCallBeActEditPart"
- itemSemanticEditPolicyClassName="ValuePinInCallBeActItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinViewFactory"
- canonicalEditPolicyClassName="ValuePinInCallBeActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ValuePinInCallBeActGraphicalNodeEditPolicy"
- createCommandClassName="ValuePinInCallBeActCreateCommand"
- containers="/0/@diagram/@childNodes.11"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3017"
- displayName="ValuePin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.13">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5013"
- editPartClassName="ValuePinInCBActLabelEditPart"
- itemSemanticEditPolicyClassName="ValuePinInCBActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5026"
- editPartClassName="ValuePinInCBActValueEditPart"
- itemSemanticEditPolicyClassName="ValuePinInCBActValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5087"
- editPartClassName="ValuePinInCBActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ValuePinInCBActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3018"
- editPartClassName="ActionInputPinInCallBeActEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInCallBeActItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinViewFactory"
- canonicalEditPolicyClassName="ActionInputPinInCallBeActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ActionInputPinInCallBeActGraphicalNodeEditPolicy"
- createCommandClassName="ActionInputPinInCallBeActCreateCommand"
- containers="/0/@diagram/@childNodes.11"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3018"
- displayName="ActionInputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.14">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5014"
- editPartClassName="ActionInputPinInCBActLabelEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInCBActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5027"
- editPartClassName="ActionInputPinInCBActValueEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInCBActValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5088"
- editPartClassName="ActionInputPinInCBActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInCBActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3019"
- editPartClassName="InputPinInCallBeActEditPart"
- itemSemanticEditPolicyClassName="InputPinInCallBeActItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInCallBeActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInCallBeActGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInCallBeActCreateCommand"
- containers="/0/@diagram/@childNodes.11"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3019"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.15">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5015"
- editPartClassName="InputPinInCBActLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInCBActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5089"
- editPartClassName="InputPinInCBActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="InputPinInCBActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3020"
- editPartClassName="OutputPinInCallBeActEditPart"
- itemSemanticEditPolicyClassName="OutputPinInCallBeActItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinViewFactory"
- canonicalEditPolicyClassName="OutputPinInCallBeActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OutputPinInCallBeActGraphicalNodeEditPolicy"
- createCommandClassName="OutputPinInCallBeActCreateCommand"
- containers="/0/@diagram/@childNodes.11"
- preferredSideName="EAST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3020"
- displayName="OutputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallAction/result"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallAction/result"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.16">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5016"
- editPartClassName="OutputPinInCBActLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInCBActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5090"
- editPartClassName="OutputPinInCBActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="OutputPinInCBActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3010"
- editPartClassName="CallOperationActionEditPart"
- itemSemanticEditPolicyClassName="CallOperationActionItemSemanticEditPolicy"
- notationViewFactoryClassName="CallOperationActionViewFactory"
- canonicalEditPolicyClassName="CallOperationActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.17 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.20 /0/@diagram/@childNodes.21 /0/@diagram/@childNodes.22 /0/@diagram/@childNodes.23"
- graphicalNodeEditPolicyClassName="CallOperationActionGraphicalNodeEditPolicy"
- createCommandClassName="CallOperationActionCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.CallOperationAction_3010"
- displayName="CallOperationAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.102/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.17">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5006"
- editPartClassName="CallOperationActionNameEditPart"
- itemSemanticEditPolicyClassName="CallOperationActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="CallOperationActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.4"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3021"
- editPartClassName="ActionInputPinInCallOpActEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInCallOpActItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinViewFactory"
- canonicalEditPolicyClassName="ActionInputPinInCallOpActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ActionInputPinInCallOpActGraphicalNodeEditPolicy"
- createCommandClassName="ActionInputPinInCallOpActCreateCommand"
- containers="/0/@diagram/@childNodes.16"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3021"
- displayName="ActionInputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.0">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.18">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5017"
- editPartClassName="ActionInputPinInCOActLabelEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInCOActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5028"
- editPartClassName="ActionInputPinInCOActValueEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInCOActValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5091"
- editPartClassName="ActionInputPinInCOActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInCOActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3022"
- editPartClassName="ValuePinInCallOpActEditPart"
- itemSemanticEditPolicyClassName="ValuePinInCallOpActItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinViewFactory"
- canonicalEditPolicyClassName="ValuePinInCallOpActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ValuePinInCallOpActGraphicalNodeEditPolicy"
- createCommandClassName="ValuePinInCallOpActCreateCommand"
- containers="/0/@diagram/@childNodes.16"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3022"
- displayName="ValuePin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.1">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.19">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5018"
- editPartClassName="ValuePinInCOActLabelEditPart"
- itemSemanticEditPolicyClassName="ValuePinInCOActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5029"
- editPartClassName="ValuePinInCOActValueEditPart"
- itemSemanticEditPolicyClassName="ValuePinInCOActValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5092"
- editPartClassName="ValuePinInCOActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ValuePinInCOActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3023"
- editPartClassName="InputPinInCallOpActEditPart"
- itemSemanticEditPolicyClassName="InputPinInCallOpActItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInCallOpActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInCallOpActGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInCallOpActCreateCommand"
- containers="/0/@diagram/@childNodes.16"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3023"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.2">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5019"
- editPartClassName="InputPinInCOActLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInCOActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5093"
- editPartClassName="InputPinInCOActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="InputPinInCOActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3024"
- editPartClassName="OutputPinInCallOpActEditPart"
- itemSemanticEditPolicyClassName="OutputPinInCallOpActItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinViewFactory"
- canonicalEditPolicyClassName="OutputPinInCallOpActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OutputPinInCallOpActGraphicalNodeEditPolicy"
- createCommandClassName="OutputPinInCallOpActCreateCommand"
- containers="/0/@diagram/@childNodes.16"
- preferredSideName="EAST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3024"
- displayName="OutputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallAction/result"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallAction/result"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.21">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5020"
- editPartClassName="OutputPinInCOActLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInCOActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5094"
- editPartClassName="OutputPinInCOActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="OutputPinInCOActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3025"
- editPartClassName="ValuePinInCallOpActAsTargetEditPart"
- itemSemanticEditPolicyClassName="ValuePinInCallOpActAsTargetItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinViewFactory"
- canonicalEditPolicyClassName="ValuePinInCallOpActAsTargetCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ValuePinInCallOpActAsTargetGraphicalNodeEditPolicy"
- createCommandClassName="ValuePinInCallOpActAsTargetCreateCommand"
- containers="/0/@diagram/@childNodes.16"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3025"
- displayName="ValuePin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.3">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction/target"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction/target"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.22">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5021"
- editPartClassName="ValuePinInCOActAsTargetLabelEditPart"
- itemSemanticEditPolicyClassName="ValuePinInCOActAsTargetLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5030"
- editPartClassName="ValuePinInCOActAsTargetValueEditPart"
- itemSemanticEditPolicyClassName="ValuePinInCOActAsTargetValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5095"
- editPartClassName="ValuePinInCOActAsTargetAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ValuePinInCOActAsTargetAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3026"
- editPartClassName="ActionInputPinInCallOpActAsTargetEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInCallOpActAsTargetItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinViewFactory"
- canonicalEditPolicyClassName="ActionInputPinInCallOpActAsTargetCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ActionInputPinInCallOpActAsTargetGraphicalNodeEditPolicy"
- createCommandClassName="ActionInputPinInCallOpActAsTargetCreateCommand"
- containers="/0/@diagram/@childNodes.16"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3026"
- displayName="ActionInputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.4">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction/target"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction/target"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.23">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5022"
- editPartClassName="ActionInputPinInCOActAsTargetLabelEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInCOActAsTargetLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5031"
- editPartClassName="ActionInputPinInCOActAsTargetValueEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInCOActAsTargetValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5096"
- editPartClassName="ActionInputPinInCOActAsTargetAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInCOActAsTargetAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3027"
- editPartClassName="InputPinInCallOpActAsTargetEditPart"
- itemSemanticEditPolicyClassName="InputPinInCallOpActAsTargetItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInCallOpActAsTargetCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInCallOpActAsTargetGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInCallOpActAsTargetCreateCommand"
- containers="/0/@diagram/@childNodes.16"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3027"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.5">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction/target"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction/target"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.24">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5023"
- editPartClassName="InputPinInCOActAsTargetLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInCOActAsTargetLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5097"
- editPartClassName="InputPinInCOActAsTargetAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="InputPinInCOActAsTargetAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3034"
- editPartClassName="DurationConstraintAsLocalPrecondEditPart"
- itemSemanticEditPolicyClassName="DurationConstraintAsLocalPrecondItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationConstraintViewFactory"
- canonicalEditPolicyClassName="DurationConstraintAsLocalPrecondCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DurationConstraintAsLocalPrecondGraphicalNodeEditPolicy"
- createCommandClassName="DurationConstraintAsLocalPrecondCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.DurationConstraint_3034"
- displayName="DurationConstraint">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.134/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPreconditionConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.6">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationConstraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.25">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenReferenceNewElementSpec">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.26">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationInterval"/>
- </newElementInitializers>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5038"
- editPartClassName="DurationConstraintAsLocalPrecondNameEditPart"
- itemSemanticEditPolicyClassName="DurationConstraintAsLocalPrecondNameItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationConstraintNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5130"
- editPartClassName="DurationConstraintAsLocalPrecondBodyEditPart"
- itemSemanticEditPolicyClassName="DurationConstraintAsLocalPrecondBodyItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationConstraintSpecificationViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.22"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3035"
- editPartClassName="DurationConstraintAsLocalPostcondEditPart"
- itemSemanticEditPolicyClassName="DurationConstraintAsLocalPostcondItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationConstraintViewFactory"
- canonicalEditPolicyClassName="DurationConstraintAsLocalPostcondCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DurationConstraintAsLocalPostcondGraphicalNodeEditPolicy"
- createCommandClassName="DurationConstraintAsLocalPostcondCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.DurationConstraint_3035"
- displayName="DurationConstraint">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.134/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPostconditionConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.7">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationConstraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.27">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenReferenceNewElementSpec">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.28">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationInterval"/>
- </newElementInitializers>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5039"
- editPartClassName="DurationConstraintAsLocalPostcondNameEditPart"
- itemSemanticEditPolicyClassName="DurationConstraintAsLocalPostcondNameItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationConstraintNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5131"
- editPartClassName="DurationConstraintAsLocalPostcondBodyEditPart"
- itemSemanticEditPolicyClassName="DurationConstraintAsLocalPostcondBodyItemSemanticEditPolicy"
- notationViewFactoryClassName="DurationConstraintSpecificationViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.22"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3036"
- editPartClassName="TimeConstraintAsLocalPrecondEditPart"
- itemSemanticEditPolicyClassName="TimeConstraintAsLocalPrecondItemSemanticEditPolicy"
- notationViewFactoryClassName="TimeConstraintViewFactory"
- canonicalEditPolicyClassName="TimeConstraintAsLocalPrecondCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="TimeConstraintAsLocalPrecondGraphicalNodeEditPolicy"
- createCommandClassName="TimeConstraintAsLocalPrecondCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.TimeConstraint_3036"
- displayName="TimeConstraint">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.185/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPreconditionConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.8">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeConstraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.29">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenReferenceNewElementSpec">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.30">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeInterval"/>
- </newElementInitializers>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5040"
- editPartClassName="TimeConstraintAsLocalPrecondNameEditPart"
- itemSemanticEditPolicyClassName="TimeConstraintAsLocalPrecondNameItemSemanticEditPolicy"
- notationViewFactoryClassName="TimeConstraintNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5132"
- editPartClassName="TimeConstraintAsLocalPrecondBodyEditPart"
- itemSemanticEditPolicyClassName="TimeConstraintAsLocalPrecondBodyItemSemanticEditPolicy"
- notationViewFactoryClassName="TimeConstraintSpecificationViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.22"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3037"
- editPartClassName="TimeConstraintAsLocalPostcondEditPart"
- itemSemanticEditPolicyClassName="TimeConstraintAsLocalPostcondItemSemanticEditPolicy"
- notationViewFactoryClassName="TimeConstraintViewFactory"
- canonicalEditPolicyClassName="TimeConstraintAsLocalPostcondCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="TimeConstraintAsLocalPostcondGraphicalNodeEditPolicy"
- createCommandClassName="TimeConstraintAsLocalPostcondCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.TimeConstraint_3037"
- displayName="TimeConstraint">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.185/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPostconditionConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.9">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeConstraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.31">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenReferenceNewElementSpec">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.32">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeInterval"/>
- </newElementInitializers>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5041"
- editPartClassName="TimeConstraintAsLocalPostcondNameEditPart"
- itemSemanticEditPolicyClassName="TimeConstraintAsLocalPostcondNameItemSemanticEditPolicy"
- notationViewFactoryClassName="TimeConstraintNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5133"
- editPartClassName="TimeConstraintAsLocalPostcondBodyEditPart"
- itemSemanticEditPolicyClassName="TimeConstraintAsLocalPostcondBodyItemSemanticEditPolicy"
- notationViewFactoryClassName="TimeConstraintSpecificationViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.22"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3032"
- editPartClassName="IntervalConstraintAsLocalPrecondEditPart"
- itemSemanticEditPolicyClassName="IntervalConstraintAsLocalPrecondItemSemanticEditPolicy"
- notationViewFactoryClassName="IntervalConstraintViewFactory"
- canonicalEditPolicyClassName="IntervalConstraintAsLocalPrecondCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="IntervalConstraintAsLocalPrecondGraphicalNodeEditPolicy"
- createCommandClassName="IntervalConstraintAsLocalPrecondCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.IntervalConstraint_3032"
- displayName="IntervalConstraint">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.135/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPreconditionConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.10">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/IntervalConstraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.33">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenReferenceNewElementSpec">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.34">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interval"/>
- </newElementInitializers>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5036"
- editPartClassName="IntervalConstraintAsLocalPrecondNameEditPart"
- itemSemanticEditPolicyClassName="IntervalConstraintAsLocalPrecondNameItemSemanticEditPolicy"
- notationViewFactoryClassName="IntervalConstraintNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5134"
- editPartClassName="IntervalConstraintAsLocalPrecondBodyEditPart"
- itemSemanticEditPolicyClassName="IntervalConstraintAsLocalPrecondBodyItemSemanticEditPolicy"
- notationViewFactoryClassName="IntervalConstraintSpecificationViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.22"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3033"
- editPartClassName="IntervalConstraintAsLocalPostcondEditPart"
- itemSemanticEditPolicyClassName="IntervalConstraintAsLocalPostcondItemSemanticEditPolicy"
- notationViewFactoryClassName="IntervalConstraintViewFactory"
- canonicalEditPolicyClassName="IntervalConstraintAsLocalPostcondCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="IntervalConstraintAsLocalPostcondGraphicalNodeEditPolicy"
- createCommandClassName="IntervalConstraintAsLocalPostcondCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.IntervalConstraint_3033"
- displayName="IntervalConstraint">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.135/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPostconditionConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.11">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/IntervalConstraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.35">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenReferenceNewElementSpec">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.36">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interval"/>
- </newElementInitializers>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5037"
- editPartClassName="IntervalConstraintAsLocalPostcondNameEditPart"
- itemSemanticEditPolicyClassName="IntervalConstraintAsLocalPostcondNameItemSemanticEditPolicy"
- notationViewFactoryClassName="IntervalConstraintNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5135"
- editPartClassName="IntervalConstraintAsLocalPostcondBodyEditPart"
- itemSemanticEditPolicyClassName="IntervalConstraintAsLocalPostcondBodyItemSemanticEditPolicy"
- notationViewFactoryClassName="IntervalConstraintSpecificationViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.22"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3011"
- editPartClassName="ConstraintAsLocalPrecondEditPart"
- itemSemanticEditPolicyClassName="ConstraintAsLocalPrecondItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintViewFactory"
- canonicalEditPolicyClassName="ConstraintAsLocalPrecondCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ConstraintAsLocalPrecondGraphicalNodeEditPolicy"
- createCommandClassName="ConstraintAsLocalPrecondCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.0/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPreconditionConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.12">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.37">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenReferenceNewElementSpec">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.38">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueExpression"/>
- </newElementInitializers>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5007"
- editPartClassName="ConstraintAsLocalPrecondNameEditPart"
- itemSemanticEditPolicyClassName="ConstraintAsLocalPrecondNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5136"
- editPartClassName="ConstraintAsLocalPrecondBodyEditPart"
- itemSemanticEditPolicyClassName="ConstraintAsLocalPrecondBodyItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintSpecificationViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.22"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3012"
- editPartClassName="ConstraintAsLocalPostcondEditPart"
- itemSemanticEditPolicyClassName="ConstraintAsLocalPostcondItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintViewFactory"
- canonicalEditPolicyClassName="ConstraintAsLocalPostcondCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ConstraintAsLocalPostcondGraphicalNodeEditPolicy"
- createCommandClassName="ConstraintAsLocalPostcondCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.0/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPostconditionConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.13">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.39">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenReferenceNewElementSpec">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.40">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <elementClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueExpression"/>
- </newElementInitializers>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5008"
- editPartClassName="ConstraintAsLocalPostcondNameEditPart"
- itemSemanticEditPolicyClassName="ConstraintAsLocalPostcondNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5137"
- editPartClassName="ConstraintAsLocalPostcondBodyEditPart"
- itemSemanticEditPolicyClassName="ConstraintAsLocalPostcondBodyItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintSpecificationViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.22"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3038"
- editPartClassName="DecisionNodeEditPart"
- itemSemanticEditPolicyClassName="DecisionNodeItemSemanticEditPolicy"
- notationViewFactoryClassName="DecisionNodeViewFactory"
- canonicalEditPolicyClassName="DecisionNodeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DecisionNodeGraphicalNodeEditPolicy"
- createCommandClassName="DecisionNodeCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.DecisionNode_3038"
- displayName="DecisionNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.124/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DiamondNode"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.41">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5043"
- editPartClassName="DecisionInputEditPart"
- itemSemanticEditPolicyClassName="DecisionInputItemSemanticEditPolicy"
- notationViewFactoryClassName="DecisionNodeLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="LinkAndCornerBentWithTextFigure"
- classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class LinkAndCornerBentWithTextFigure extends org.eclipse.papyrus.uml.diagram.common.figure.node.CornerBentFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel fCornerBentContent; &#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.PolylineShape fLinkToBehaviorProperty; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public LinkAndCornerBentWithTextFigure() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;this.setBackgroundColor(THIS_BACK&#xD;&#xA;);&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fCornerBentContent = new org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this.add(fCornerBentContent);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fLinkToBehaviorProperty = new org.eclipse.draw2d.PolylineShape();&#xD;&#xA;fLinkToBehaviorProperty.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;this.add(fLinkToBehaviorProperty);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel getCornerBentContent() {&#xD;&#xA;&#x9;&#x9;return fCornerBentContent;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.PolylineShape getLinkToBehaviorProperty() {&#xD;&#xA;&#x9;&#x9;return fLinkToBehaviorProperty;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;static final org.eclipse.swt.graphics.Color THIS_BACK = new org.eclipse.swt.graphics.Color(null, 248, 249, 214);&#xD;&#xA;&#xD;&#xA;"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.10"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5098"
- editPartClassName="DecisionNodeAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="DecisionNodeAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="DecisionNodeLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3039"
- editPartClassName="MergeNodeEditPart"
- itemSemanticEditPolicyClassName="MergeNodeItemSemanticEditPolicy"
- notationViewFactoryClassName="MergeNodeViewFactory"
- canonicalEditPolicyClassName="MergeNodeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="MergeNodeGraphicalNodeEditPolicy"
- createCommandClassName="MergeNodeCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.MergeNode_3039"
- displayName="MergeNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.160/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DiamondNode"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/MergeNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.42">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5099"
- editPartClassName="MergeNodeAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="MergeNodeAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="MergeNodeLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3040"
- editPartClassName="ForkNodeEditPart"
- itemSemanticEditPolicyClassName="ForkNodeItemSemanticEditPolicy"
- notationViewFactoryClassName="ForkNodeViewFactory"
- canonicalEditPolicyClassName="ForkNodeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ForkNodeGraphicalNodeEditPolicy"
- createCommandClassName="ForkNodeCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ForkNode_3040"
- displayName="ForkNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.145/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ForkNode">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="10"
- height="40"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ForkNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.43">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5100"
- editPartClassName="ForkNodeAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ForkNodeAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ForkNodeLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3041"
- editPartClassName="JoinNodeEditPart"
- itemSemanticEditPolicyClassName="JoinNodeItemSemanticEditPolicy"
- notationViewFactoryClassName="JoinNodeViewFactory"
- canonicalEditPolicyClassName="JoinNodeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="JoinNodeGraphicalNodeEditPolicy"
- createCommandClassName="JoinNodeCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.JoinNode_3041"
- displayName="JoinNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.152/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ForkNode">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="10"
- height="40"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/JoinNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.44">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5042"
- editPartClassName="JoinSpecEditPart"
- itemSemanticEditPolicyClassName="JoinSpecItemSemanticEditPolicy"
- notationViewFactoryClassName="JoinNodeLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.9"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5101"
- editPartClassName="JoinNodeAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="JoinNodeAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="JoinNodeLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3078"
- editPartClassName="DataStoreNodeEditPart"
- itemSemanticEditPolicyClassName="DataStoreNodeItemSemanticEditPolicy"
- notationViewFactoryClassName="DataStoreNodeViewFactory"
- canonicalEditPolicyClassName="DataStoreNodeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DataStoreNodeGraphicalNodeEditPolicy"
- createCommandClassName="DataStoreNodeCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.DataStoreNode_3078"
- displayName="DataStoreNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.123/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="ObjectNodeDescriptor"
- classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class ObjectNodeDescriptor extends org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel fObjectNodeLabel; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public ObjectNodeDescriptor() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fObjectNodeLabel = new org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fObjectNodeLabel.setBorder(new org.eclipse.draw2d.MarginBorder(getMapMode().DPtoLP(5)&#xD;&#xA;, getMapMode().DPtoLP(5)&#xD;&#xA;, getMapMode().DPtoLP(5)&#xD;&#xA;, getMapMode().DPtoLP(5)&#xD;&#xA;));&#xD;&#xA;&#xD;&#xA;this.add(fObjectNodeLabel);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel getObjectNodeLabel() {&#xD;&#xA;&#x9;&#x9;return fObjectNodeLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataStoreNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.45">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5127"
- editPartClassName="DataStoreNodeLabelEditPart"
- itemSemanticEditPolicyClassName="DataStoreNodeLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="DataStoreNodeLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getObjectNodeLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.20"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5128"
- editPartClassName="DataStoreSelectionEditPart"
- itemSemanticEditPolicyClassName="DataStoreSelectionItemSemanticEditPolicy"
- notationViewFactoryClassName="DataStoreNodeLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="LinkAndCornerBentWithTextFigure"
- classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class LinkAndCornerBentWithTextFigure extends org.eclipse.papyrus.uml.diagram.common.figure.node.CornerBentFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel fCornerBentContent; &#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.PolylineShape fLinkToBehaviorProperty; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public LinkAndCornerBentWithTextFigure() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;this.setBackgroundColor(THIS_BACK&#xD;&#xA;);&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fCornerBentContent = new org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this.add(fCornerBentContent);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fLinkToBehaviorProperty = new org.eclipse.draw2d.PolylineShape();&#xD;&#xA;fLinkToBehaviorProperty.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;this.add(fLinkToBehaviorProperty);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel getCornerBentContent() {&#xD;&#xA;&#x9;&#x9;return fCornerBentContent;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.PolylineShape getLinkToBehaviorProperty() {&#xD;&#xA;&#x9;&#x9;return fLinkToBehaviorProperty;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;static final org.eclipse.swt.graphics.Color THIS_BACK = new org.eclipse.swt.graphics.Color(null, 248, 249, 214);&#xD;&#xA;&#xD;&#xA;"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.21"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3042"
- editPartClassName="SendObjectActionEditPart"
- itemSemanticEditPolicyClassName="SendObjectActionItemSemanticEditPolicy"
- notationViewFactoryClassName="SendObjectActionViewFactory"
- canonicalEditPolicyClassName="SendObjectActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.38 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.43"
- graphicalNodeEditPolicyClassName="SendObjectActionGraphicalNodeEditPolicy"
- createCommandClassName="SendObjectActionCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.SendObjectAction_3042"
- displayName="SendObjectAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.177/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.46">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5059"
- editPartClassName="SendObjectActionNameEditPart"
- itemSemanticEditPolicyClassName="SendObjectActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="SendObjectActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3046"
- editPartClassName="ValuePinInSendObjActAsReqEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendObjActAsReqItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinViewFactory"
- canonicalEditPolicyClassName="ValuePinInSendObjActAsReqCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ValuePinInSendObjActAsReqGraphicalNodeEditPolicy"
- createCommandClassName="ValuePinInSendObjActAsReqCreateCommand"
- containers="/0/@diagram/@childNodes.37"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3046"
- displayName="ValuePin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.14">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/request"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/request"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.47">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5049"
- editPartClassName="ValuePinInSendObjActAsReqLabelEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendObjActAsReqLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5050"
- editPartClassName="ValuePinInSendObjActAsReqValueEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendObjActAsReqValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5102"
- editPartClassName="ValuePinInSendObjActAsReqAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendObjActAsReqAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3047"
- editPartClassName="ActionInputPinInSendObjActAsReqEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsReqItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinViewFactory"
- canonicalEditPolicyClassName="ActionInputPinInSendObjActAsReqCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ActionInputPinInSendObjActAsReqGraphicalNodeEditPolicy"
- createCommandClassName="ActionInputPinInSendObjActAsReqCreateCommand"
- containers="/0/@diagram/@childNodes.37"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3047"
- displayName="ActionInputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.15">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/request"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/request"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.48">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5051"
- editPartClassName="ActionInputPinInSendObjActAsReqLabelEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsReqLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5052"
- editPartClassName="ActionInputPinInSendObjActAsReqValueEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsReqValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5103"
- editPartClassName="ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsReqAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3048"
- editPartClassName="InputPinInSendObjActAsReqEditPart"
- itemSemanticEditPolicyClassName="InputPinInSendObjActAsReqItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInSendObjActAsReqCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInSendObjActAsReqGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInSendObjActAsReqCreateCommand"
- containers="/0/@diagram/@childNodes.37"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3048"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.16">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/request"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/request"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.49">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5053"
- editPartClassName="InputPinInSendObjActAsReqLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInSendObjActAsReqLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5104"
- editPartClassName="InputPinInSendObjActAsReqAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="InputPinInSendObjActAsReqAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3049"
- editPartClassName="ValuePinInSendObjActAsTargetEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendObjActAsTargetItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinViewFactory"
- canonicalEditPolicyClassName="ValuePinInSendObjActAsTargetCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ValuePinInSendObjActAsTargetGraphicalNodeEditPolicy"
- createCommandClassName="ValuePinInSendObjActAsTargetCreateCommand"
- containers="/0/@diagram/@childNodes.37"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3049"
- displayName="ValuePin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.17">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/target"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/target"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.50">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5054"
- editPartClassName="ValuePinInSendObjActAsTargetLabelEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendObjActAsTargetLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5055"
- editPartClassName="ValuePinInSendObjActAsTargetValueEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendObjActAsTargetItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5105"
- editPartClassName="ValuePinInSendObjActAsTargetAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendObjActAsTargetAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3050"
- editPartClassName="ActionInputPinInSendObjActAsTargetEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsTargetItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinViewFactory"
- canonicalEditPolicyClassName="ActionInputPinInSendObjActAsTargetCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ActionInputPinInSendObjActAsTargetGraphicalNodeEditPolicy"
- createCommandClassName="ActionInputPinInSendObjActAsTargetCreateCommand"
- containers="/0/@diagram/@childNodes.37"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3050"
- displayName="ActionInputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.18">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/target"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/target"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.51">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5056"
- editPartClassName="ActionInputPinInSendObjActAsTargetLabelEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsTargetLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5057"
- editPartClassName="ActionInputPinInSendObjActAsTargetValueEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsTargetValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5106"
- editPartClassName="ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsTargetAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3051"
- editPartClassName="InputPinInSendObjActAsTargetEditPart"
- itemSemanticEditPolicyClassName="InputPinInSendObjActAsTargetItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInSendObjActAsTargetCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInSendObjActAsTargetGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInSendObjActAsTargetCreateCommand"
- containers="/0/@diagram/@childNodes.37"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3051"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.19">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/target"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/target"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.52">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5058"
- editPartClassName="InputPinInSendObjActAsTargetLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInSendObjActAsTargetLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5107"
- editPartClassName="InputPinInSendObjActAsTargetAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="InputPinInSendObjActAsTargetAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3052"
- editPartClassName="SendSignalActionEditPart"
- itemSemanticEditPolicyClassName="SendSignalActionItemSemanticEditPolicy"
- notationViewFactoryClassName="SendSignalActionViewFactory"
- canonicalEditPolicyClassName="SendSignalActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.45 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.50"
- graphicalNodeEditPolicyClassName="SendSignalActionGraphicalNodeEditPolicy"
- createCommandClassName="SendSignalActionCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.SendSignalAction_3052"
- displayName="SendSignalAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.178/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusSendNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendSignalActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.53">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5060"
- editPartClassName="SendSignalActionNameEditPart"
- itemSemanticEditPolicyClassName="SendSignalActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="SendSignalActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3053"
- editPartClassName="ActionInputPinInSendSigActEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendSigActItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinViewFactory"
- canonicalEditPolicyClassName="ActionInputPinInSendSigActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ActionInputPinInSendSigActGraphicalNodeEditPolicy"
- createCommandClassName="ActionInputPinInSendSigActCreateCommand"
- containers="/0/@diagram/@childNodes.44"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3053"
- displayName="ActionInputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.20">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.54">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5061"
- editPartClassName="ActionInputPinInSendSigActLabelEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendSigActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5062"
- editPartClassName="ActionInputPinInSendSigActValueEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendSigActValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5108"
- editPartClassName="ActionInputPinInSendSigActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendSigActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3054"
- editPartClassName="ValuePinInSendSigActEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendSigActItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinViewFactory"
- canonicalEditPolicyClassName="ValuePinInSendSigActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ValuePinInSendSigActGraphicalNodeEditPolicy"
- createCommandClassName="ValuePinInSendSigActCreateCommand"
- containers="/0/@diagram/@childNodes.44"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3054"
- displayName="ValuePin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.21">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.55">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5063"
- editPartClassName="ValuePinInSendSigActLabelEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendSigActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5064"
- editPartClassName="ValuePinInSendSigActValueEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendSigActValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5109"
- editPartClassName="ValuePinInSendSigActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendSigActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3055"
- editPartClassName="InputPinInSendSigActEditPart"
- itemSemanticEditPolicyClassName="InputPinInSendSigActItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInSendSigActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInSendSigActGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInSendSigActCreateCommand"
- containers="/0/@diagram/@childNodes.44"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3055"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.22">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.56">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5065"
- editPartClassName="InputPinInSendSigActLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInSendSigActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5110"
- editPartClassName="InputPinInSendSigActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="InputPinInSendSigActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3060"
- editPartClassName="ValuePinInSendSigActAsTargetEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendSigActAsTargetItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinViewFactory"
- canonicalEditPolicyClassName="ValuePinInSendSigActAsTargetCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ValuePinInSendSigActAsTargetGraphicalNodeEditPolicy"
- createCommandClassName="ValuePinInSendSigActAsTargetCreateCommand"
- containers="/0/@diagram/@childNodes.44"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3060"
- displayName="ValuePin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.23">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction/target"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction/target"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.57">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5072"
- editPartClassName="ValuePinInSendSigActAsTargetLabelEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendSigActAsTargetLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5073"
- editPartClassName="ValuePinInSendSigActAsTargetValueEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendSigActAsTargetValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5111"
- editPartClassName="ValuePinInSendSigActAsTargetAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ValuePinInSendSigActAsTargetAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ValuePinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3061"
- editPartClassName="ActionInputPinInSendSigActAsTargetEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendSigActAsTargetItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinViewFactory"
- canonicalEditPolicyClassName="ActionInputPinInSendSigActAsTargetCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ActionInputPinInSendSigActAsTargetGraphicalNodeEditPolicy"
- createCommandClassName="ActionInputPinInSendSigActAsTargetCreateCommand"
- containers="/0/@diagram/@childNodes.44"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3061"
- displayName="ActionInputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.24">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction/target"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction/target"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.58">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5074"
- editPartClassName="ActionInputPinInSendSigActAsTargetLabelEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendSigActAsTargetLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5075"
- editPartClassName="ActionInputPinInSendSigActAsTargetValueEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendSigActAsTargetValueItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5112"
- editPartClassName="ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ActionInputPinInSendSigActAsTargetAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionInputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3062"
- editPartClassName="InputPinInSendSigActAsTargetEditPart"
- itemSemanticEditPolicyClassName="InputPinInSendSigActAsTargetItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInSendSigActAsTargetCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInSendSigActAsTargetGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInSendSigActAsTargetCreateCommand"
- containers="/0/@diagram/@childNodes.44"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3062"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.25">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction/target"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction/target"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.59">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5076"
- editPartClassName="InputPinInSendSigActAsTargetLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInSendSigActAsTargetLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5113"
- editPartClassName="InputPinInSendSigActAsTargetAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="InputPinInSendSigActAsTargetAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3059"
- editPartClassName="ActivityParameterNodeEditPart"
- itemSemanticEditPolicyClassName="ActivityParameterNodeItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityParameterNodeViewFactory"
- canonicalEditPolicyClassName="ActivityParameterNodeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ActivityParameterNodeGraphicalNodeEditPolicy"
- createCommandClassName="ActivityParameterNodeCreateCommand"
- containers="/0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.72 /0/@diagram/@compartments.14"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActivityParameterNode_3059"
- displayName="ActivityParameterNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.93/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityParameterNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.60">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.61">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectNode/isControlType"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5071"
- editPartClassName="ParameterNodeNameEditPart"
- itemSemanticEditPolicyClassName="ParameterNodeNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityParameterNodeLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.15"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3063"
- editPartClassName="AcceptEventActionEditPart"
- itemSemanticEditPolicyClassName="AcceptEventActionItemSemanticEditPolicy"
- notationViewFactoryClassName="AcceptEventActionViewFactory"
- canonicalEditPolicyClassName="AcceptEventActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.53"
- graphicalNodeEditPolicyClassName="AcceptEventActionGraphicalNodeEditPolicy"
- createCommandClassName="AcceptEventActionCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.AcceptEventAction_3063"
- displayName="AcceptEventAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.71/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.AcceptEventActionFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.AcceptEventActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AcceptEventAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.62">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5078"
- editPartClassName="AcceptEventActionLabelEditPart"
- itemSemanticEditPolicyClassName="AcceptEventActionLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="AcceptEventActionLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAcceptEventActionLabel"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.16"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5079"
- editPartClassName="AcceptTimeEventActionLabelEditPart"
- itemSemanticEditPolicyClassName="AcceptTimeEventActionLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="AcceptEventActionLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.17"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5115"
- editPartClassName="AcceptTimeEventActionAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="AcceptTimeEventActionAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="AcceptEventActionLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.AcceptTimeEventActionStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3064"
- editPartClassName="OutputPinInAcceptEventActionEditPart"
- itemSemanticEditPolicyClassName="OutputPinInAcceptEventActionItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinViewFactory"
- canonicalEditPolicyClassName="OutputPinInAcceptEventActionCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OutputPinInAcceptEventActionGraphicalNodeEditPolicy"
- createCommandClassName="OutputPinInAcceptEventActionCreateCommand"
- containers="/0/@diagram/@childNodes.52"
- preferredSideName="EAST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3064"
- displayName="OutputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AcceptEventAction/result"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AcceptEventAction/result"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.63">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5077"
- editPartClassName="OutputPinInAcceptEventActionLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInAcceptEventActionLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5114"
- editPartClassName="OutputPinInAcceptEventActionAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="OutputPinInAcceptEventActionAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3076"
- editPartClassName="ValueSpecificationActionEditPart"
- itemSemanticEditPolicyClassName="ValueSpecificationActionItemSemanticEditPolicy"
- notationViewFactoryClassName="ValueSpecificationActionViewFactory"
- canonicalEditPolicyClassName="ValueSpecificationActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.55"
- graphicalNodeEditPolicyClassName="ValueSpecificationActionGraphicalNodeEditPolicy"
- createCommandClassName="ValueSpecificationActionCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValueSpecificationAction_3076"
- displayName="ValueSpecificationAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.192/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValueSpecificationAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.64">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5126"
- editPartClassName="ValueSpecificationActionNameEditPart"
- itemSemanticEditPolicyClassName="ValueSpecificationActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ValueSpecificationActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3077"
- editPartClassName="OutputPinInValSpecActEditPart"
- itemSemanticEditPolicyClassName="OutputPinInValSpecActItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinViewFactory"
- canonicalEditPolicyClassName="OutputPinInValSpecActCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OutputPinInValSpecActGraphicalNodeEditPolicy"
- createCommandClassName="OutputPinInValSpecActCreateCommand"
- containers="/0/@diagram/@childNodes.54"
- preferredSideName="EAST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3077"
- displayName="OutputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValueSpecificationAction/result"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValueSpecificationAction/result"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.65">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5124"
- editPartClassName="OutputPinInValSpecActLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInValSpecActLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5125"
- editPartClassName="OutputPinInValSpecActAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="OutputPinInValSpecActAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3069"
- editPartClassName="ConditionalNodeEditPart"
- itemSemanticEditPolicyClassName="ConditionalNodeItemSemanticEditPolicy"
- notationViewFactoryClassName="ConditionalNodeViewFactory"
- canonicalEditPolicyClassName="ConditionalNodeCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.4"
- graphicalNodeEditPolicyClassName="ConditionalNodeGraphicalNodeEditPolicy"
- createCommandClassName="ConditionalNodeCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ConditionalNode_3069"
- displayName="ConditionalNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.113/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ConditionalNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/structuredNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.66">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5119"
- editPartClassName="ConditionalNodeKeywordEditPart"
- itemSemanticEditPolicyClassName="ConditionalNodeKeywordItemSemanticEditPolicy"
- notationViewFactoryClassName="ConditionalNodeLabelViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.18"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3070"
- editPartClassName="ExpansionRegionEditPart"
- itemSemanticEditPolicyClassName="ExpansionRegionItemSemanticEditPolicy"
- notationViewFactoryClassName="ExpansionRegionViewFactory"
- canonicalEditPolicyClassName="ExpansionRegionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.58 /0/@diagram/@childNodes.59"
- compartments="/0/@diagram/@compartments.5"
- graphicalNodeEditPolicyClassName="ExpansionRegionGraphicalNodeEditPolicy"
- createCommandClassName="ExpansionRegionCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ExpansionRegion_3070"
- displayName="ExpansionRegion">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.142/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExpansionRegion"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/structuredNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.67">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5120"
- editPartClassName="ExpansionRegionKeywordEditPart"
- itemSemanticEditPolicyClassName="ExpansionRegionKeywordItemSemanticEditPolicy"
- notationViewFactoryClassName="ExpansionRegionLabelViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.18"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3074"
- editPartClassName="ExpansionNodeAsInEditPart"
- itemSemanticEditPolicyClassName="ExpansionNodeAsInItemSemanticEditPolicy"
- notationViewFactoryClassName="ExpansionNodeViewFactory"
- canonicalEditPolicyClassName="ExpansionNodeAsInCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ExpansionNodeAsInGraphicalNodeEditPolicy"
- createCommandClassName="ExpansionNodeAsInCreateCommand"
- containers="/0/@diagram/@childNodes.57"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ExpansionNode_3074"
- displayName="ExpansionNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.141/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="ExpansionNodeDescriptor"
- classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class ExpansionNodeDescriptor extends org.eclipse.draw2d.ScalablePolygonShape {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public ExpansionNodeDescriptor() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(48)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(48)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(36)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(36)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(36)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(24)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(24)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(24)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(12)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(12)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(12)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.setFill(true);&#xD;&#xA;this.setMaximumSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(48)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="48"
- height="16"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.26">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExpansionNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredActivityNode/node"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExpansionRegion/inputElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.68">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3075"
- editPartClassName="ExpansionNodeAsOutEditPart"
- itemSemanticEditPolicyClassName="ExpansionNodeAsOutItemSemanticEditPolicy"
- notationViewFactoryClassName="ExpansionNodeViewFactory"
- canonicalEditPolicyClassName="ExpansionNodeAsOutCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ExpansionNodeAsOutGraphicalNodeEditPolicy"
- createCommandClassName="ExpansionNodeAsOutCreateCommand"
- containers="/0/@diagram/@childNodes.57"
- preferredSideName="SOUTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ExpansionNode_3075"
- displayName="ExpansionNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.141/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="ExpansionNodeDescriptor"
- classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class ExpansionNodeDescriptor extends org.eclipse.draw2d.ScalablePolygonShape {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public ExpansionNodeDescriptor() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(48)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(48)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(36)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(36)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(36)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(24)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(24)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(24)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(12)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(12)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(12)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.setFill(true);&#xD;&#xA;this.setMaximumSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(48)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="48"
- height="16"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.27">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExpansionNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredActivityNode/node"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExpansionRegion/outputElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.69">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- </childNodes>
- <childNodes
- visualID="3071"
- editPartClassName="LoopNodeEditPart"
- itemSemanticEditPolicyClassName="LoopNodeItemSemanticEditPolicy"
- notationViewFactoryClassName="LoopNodeViewFactory"
- canonicalEditPolicyClassName="LoopNodeCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.66 /0/@diagram/@childNodes.63 /0/@diagram/@childNodes.61 /0/@diagram/@childNodes.62"
- compartments="/0/@diagram/@compartments.6"
- graphicalNodeEditPolicyClassName="LoopNodeGraphicalNodeEditPolicy"
- createCommandClassName="LoopNodeCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.LoopNode_3071"
- displayName="LoopNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.159/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/structuredNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.70">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5121"
- editPartClassName="LoopNodeKeywordEditPart"
- itemSemanticEditPolicyClassName="LoopNodeKeywordItemSemanticEditPolicy"
- notationViewFactoryClassName="LoopNodeLabelViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.18"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3109"
- editPartClassName="OutputPinInLoopNodeAsBodyOutputEditPart"
- itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsBodyOutputItemSemanticEditPolicy"
- canonicalEditPolicyClassName="OutputPinInLoopNodeAsBodyOutputCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OutputPinInLoopNodeAsBodyOutputGraphicalNodeEditPolicy"
- createCommandClassName="OutputPinInLoopNodeAsBodyOutputVariableCreateCommand"
- containers="/0/@diagram/@childNodes.60"
- preferredSideName="EAST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3109"
- displayName="OutputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/bodyOutput"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/bodyOutput"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.63">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5184"
- editPartClassName="OutputPinInLoopNodeAsBodyOutputLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsBodyOutputLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5185"
- editPartClassName="OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsBodyOutputAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3110"
- editPartClassName="OutputPinInLoopNodeAsLoopVariableEditPart"
- itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsLoopVariableItemSemanticEditPolicy"
- canonicalEditPolicyClassName="OutputPinInLoopNodeAsLoopVariableCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OutputPinInLoopNodeAsLoopVariableGraphicalNodeEditPolicy"
- createCommandClassName="OutputPinInLoopNodeAsLoopVariableCreateCommand"
- containers="/0/@diagram/@childNodes.60"
- preferredSideName="EAST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3110"
- displayName="OutputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/loopVariable"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/loopVariable"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.63">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5186"
- editPartClassName="OutputPinInLoopNodeAsLoopVariableLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsLoopVariableLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5183"
- editPartClassName="OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsLoopVariableAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3111"
- editPartClassName="OutputPinInLoopNodeAsResultEditPart"
- itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsResultItemSemanticEditPolicy"
- canonicalEditPolicyClassName="OutputPinInLoopNodeAsResultCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OutputPinInLoopNodeAsResultGraphicalNodeEditPolicy"
- createCommandClassName="OutputPinInLoopNodeAsResultCreateCommand"
- containers="/0/@diagram/@childNodes.60"
- preferredSideName="EAST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3111"
- displayName="OutputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/result"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/result"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.63">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5187"
- editPartClassName="OutputPinInLoopNodeAsResultLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsResultLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5188"
- editPartClassName="OutputPinInLoopNodeAsResultAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsResultAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3073"
- editPartClassName="SequenceNodeEditPart"
- itemSemanticEditPolicyClassName="SequenceNodeItemSemanticEditPolicy"
- notationViewFactoryClassName="SequenceNodeViewFactory"
- canonicalEditPolicyClassName="SequenceNodeCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.7"
- graphicalNodeEditPolicyClassName="SequenceNodeGraphicalNodeEditPolicy"
- createCommandClassName="SequenceNodeCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.SequenceNode_3073"
- displayName="SequenceNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.179/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SequenceNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/structuredNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.71">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5123"
- editPartClassName="SequenceNodeKeywordEditPart"
- itemSemanticEditPolicyClassName="SequenceNodeKeywordItemSemanticEditPolicy"
- notationViewFactoryClassName="SequenceNodeLabelViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.18"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3065"
- editPartClassName="StructuredActivityNodeEditPart"
- itemSemanticEditPolicyClassName="StructuredActivityNodeItemSemanticEditPolicy"
- notationViewFactoryClassName="StructuredActivityNodeViewFactory"
- canonicalEditPolicyClassName="StructuredActivityNodeCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.8"
- graphicalNodeEditPolicyClassName="StructuredActivityNodeGraphicalNodeEditPolicy"
- createCommandClassName="StructuredActivityNodeCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.StructuredActivityNode_3065"
- displayName="StructuredActivityNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.74/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredActivityNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/structuredNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.72">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5117"
- editPartClassName="StructuredActivityNodeKeywordEditPart"
- itemSemanticEditPolicyClassName="StructuredActivityNodeKeywordItemSemanticEditPolicy"
- notationViewFactoryClassName="StructuredActivityNodeLabelViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.18"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3105"
- editPartClassName="InputPinInLoopNodeAsVariableEditPart"
- itemSemanticEditPolicyClassName="InputPinInLoopNodeAsVariableItemSemanticEditPolicy"
- canonicalEditPolicyClassName="InputPinInLoopNodeAsVariableCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInLoopNodeAsVariableGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInLoopNodeAsVariableCreateCommand"
- containers="/0/@diagram/@childNodes.60"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3105"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/loopVariableInput"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/loopVariableInput"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.49">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5178"
- editPartClassName="InputPinInLoopNodeAsVariableLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInLoopNodeAsVariableLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5179"
- editPartClassName="InputPinInStructuredActivityNodeAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="InputPinInStructuredActivityNodeAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3067"
- editPartClassName="ActivityPartitionEditPart"
- itemSemanticEditPolicyClassName="ActivityPartitionItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityPartitionViewFactory"
- canonicalEditPolicyClassName="ActivityPartitionCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.9"
- graphicalNodeEditPolicyClassName="ActivityPartitionGraphicalNodeEditPolicy"
- createCommandClassName="ActivityPartitionCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.9">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActivityPartition_3067"
- displayName="ActivityPartition">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.73/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.ActivityPartitionFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityPartition"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.73">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5118"
- editPartClassName="ActivityPartitionNameEditPart"
- itemSemanticEditPolicyClassName="ActivityPartitionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityPartitionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPartitionLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3068"
- editPartClassName="InterruptibleActivityRegionEditPart"
- itemSemanticEditPolicyClassName="InterruptibleActivityRegionItemSemanticEditPolicy"
- notationViewFactoryClassName="InterruptibleActivityRegionViewFactory"
- canonicalEditPolicyClassName="InterruptibleActivityRegionCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.10"
- graphicalNodeEditPolicyClassName="InterruptibleActivityRegionGraphicalNodeEditPolicy"
- createCommandClassName="InterruptibleActivityRegionCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InterruptibleActivityRegion_3068"
- displayName="InterruptibleActivityRegion">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.78/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InterruptibleActivityRegionFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InterruptibleActivityRegion"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
- </modelFacet>
- </childNodes>
- <childNodes
- visualID="3080"
- editPartClassName="CommentEditPartCN"
- itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicy"
- notationViewFactoryClassName="CommentViewFactory"
- canonicalEditPolicyClassName="CommentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicy"
- createCommandClassName="CommentCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.8 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.Comment_3080"
- displayName="Comment">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.4/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.28">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5138"
- editPartClassName="CommentBodyLabelEditPart"
- itemSemanticEditPolicyClassName="CommentBodyLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="CommentBodyViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCornerBentFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.23">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3081"
- editPartClassName="ReadSelfActionEditPart"
- itemSemanticEditPolicyClassName="ReadSelfActionItemSemanticEditPolicy"
- notationViewFactoryClassName="ReadSelfActionViewFactory"
- canonicalEditPolicyClassName="ReadSelfActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.71"
- graphicalNodeEditPolicyClassName="ReadSelfActionGraphicalNodeEditPolicy"
- createCommandClassName="ReadSelfActionCreateCommand"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ReadSelfAction_3081"
- displayName="ReadSelfAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.169/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadSelfAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.74">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5139"
- editPartClassName="ReadSelfActionNameEditPart"
- itemSemanticEditPolicyClassName="ReadSelfActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ReadSelfActionLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3084"
- editPartClassName="ReadSelfActionOutputPinEditPart"
- itemSemanticEditPolicyClassName="ReadSelfActionOutputPinItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinViewFactory"
- canonicalEditPolicyClassName="ReadSelfActionOutputPinCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ReadSelfActionOutputPinGraphicalNodeEditPolicy"
- createCommandClassName="ReadSelfActionOutputPinCreateCommand"
- containers="/0/@diagram/@childNodes.70"
- preferredSideName="EAST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadSelfAction/result"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadSelfAction/result"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.75">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5144"
- editPartClassName="OutputPinInReadSelfActionLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInReadSelfActionLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5145"
- editPartClassName="OutputPinInReadSelfActionAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="OutputPinInReadSelfActionAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3083"
- editPartClassName="ActivityEditPartCN"
- itemSemanticEditPolicyClassName="ActivityItemSemanticEditPolicyCN"
- notationViewFactoryClassName="ActivityViewFactory"
- canonicalEditPolicyClassName="ActivityCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.51"
- compartments="/0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14"
- graphicalNodeEditPolicyClassName="ActivityGraphicalNodeEditPolicyCN"
- createCommandClassName="ActivityCreateCommandCN"
- containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.72/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="200"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/BehavioredClassifier/ownedBehavior"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/BehavioredClassifier/ownedBehavior"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5142"
- editPartClassName="ActivityNameEditPartCN"
- itemSemanticEditPolicyClassName="ActivityNameEditPartItemSemanticEditPolicyCN"
- notationViewFactoryClassName="OpaqueActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5143"
- editPartClassName="ActivityIsSingleExecutionCNEditPart"
- itemSemanticEditPolicyClassName="ActivityIsSingleExecutionCNItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityIsSingleExecutionViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getHeaderSingleExecution"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/isSingleExecution"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3086"
- editPartClassName="CreateObjectActionEditPart"
- itemSemanticEditPolicyClassName="CreateObjectActionItemSemanticEditPolicy"
- notationViewFactoryClassName="CreateObjectActionViewFactory"
- canonicalEditPolicyClassName="CreateObjectActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.74"
- graphicalNodeEditPolicyClassName="CreateObjectActionGraphicalNodeEditPolicy"
- createCommandClassName="CreateObjectActionCreateCommand"
- containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.CreateObjectAction_3086"
- displayName="CreateObjectAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.122/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CreateObjectAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.76">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5148"
- editPartClassName="CreateObjectActionNameEditPart"
- itemSemanticEditPolicyClassName="CreateObjectActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="CreateObjectActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3087"
- editPartClassName="OutputPinInCreateObjectActionAsResultEditPart"
- itemSemanticEditPolicyClassName="OutputPinInCreateObjectActionAsResultItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinViewFactory"
- canonicalEditPolicyClassName="OutputPinInCreateObjectActionAsResultCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OutputPinInCreateObjectActionAsResultGraphicalNodeEditPolicy"
- createCommandClassName="OutputPinInCreateObjectActionAsResultCreateCommand"
- containers="/0/@diagram/@childNodes.73"
- preferredSideName="SOUTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3087"
- displayName="OutputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CreateObjectAction/result"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CreateObjectAction/result"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.77">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5146"
- editPartClassName="OutputPinInCreateObjectActionAsResultLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInCreateObjectActionAsResultLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5147"
- editPartClassName="OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3085"
- editPartClassName="ShapeNamedElementEditPart"
- itemSemanticEditPolicyClassName="ShapeNamedElementItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ShapeNamedElementCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ShapeNamedElementGraphicalNodeEditPolicy"
- createCommandClassName="ShapeNamedElementCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.NamedElement_3085"
- displayName="ShapeNamedElement"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ShapeNamedElementFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedElement"/>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5129"
- editPartClassName="ShapeNamedElementNameEditPart"
- itemSemanticEditPolicyClassName="ShapeNamedElementNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3088"
- editPartClassName="ReadStructuralFeatureActionEditPart"
- itemSemanticEditPolicyClassName="ReadStructuralFeatureActionItemSemanticEditPolicy"
- notationViewFactoryClassName="ReadStructuralFeatureActionViewFactory"
- canonicalEditPolicyClassName="ReadStructuralFeatureActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.77 /0/@diagram/@childNodes.78"
- graphicalNodeEditPolicyClassName="ReadStructuralFeatureActionGraphicalNodeEditPolicy"
- createCommandClassName="ReadStructuralFeatureActionCreateCommand"
- containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ReadStructuralFeatureAction_3088"
- displayName="ReadStructuralFeatureAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.170/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadStructuralFeatureAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.78">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5153"
- editPartClassName="ReadStructuralFeatureActionNameEditPart"
- itemSemanticEditPolicyClassName="ReadStructuralFeatureActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ReadStructuralFeatureActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3089"
- editPartClassName="InputPinInReadStructuralFeatureAsObjectEditPart"
- itemSemanticEditPolicyClassName="InputPinInReadStructuralFeatureAsObjectItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInReadStructuralFeatureAsObjectCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInReadStructuralFeatureAsObjectGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInReadStructuralFeatureAsObjectCreateCommand"
- containers="/0/@diagram/@childNodes.76"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3089"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction/object"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction/object"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.79">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5149"
- editPartClassName="InputPinInReadStructuralFeatureAsObjectLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInReadStructuralFeatureAsObjectLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5150"
- editPartClassName="InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3090"
- editPartClassName="OutputPinInReadStructuralFeatureAsResultEditPart"
- itemSemanticEditPolicyClassName="OutputPinInReadStructuralFeatureAsResultItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinViewFactory"
- canonicalEditPolicyClassName="OutputPinInReadStructuralFeatureAsResultCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OutputPinInReadStructuralFeatureAsResultGraphicalNodeEditPolicy"
- createCommandClassName="OutputPinInReadStructuralFeatureAsResultCreateCommand"
- containers="/0/@diagram/@childNodes.76"
- preferredSideName="SOUTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3090"
- displayName="OutputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadStructuralFeatureAction/result"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadStructuralFeatureAction/result"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.80">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5151"
- editPartClassName="OutputPinInReadStructuralFeatureAsResultLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInReadStructuralFeatureAsResultLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5152"
- editPartClassName="InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInReadStructuralFeatureAsResultAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3091"
- editPartClassName="AddStructuralFeatureValueActionEditPart"
- itemSemanticEditPolicyClassName="AddStructuralFeatureValueActionItemSemanticEditPolicy"
- notationViewFactoryClassName="AddStructuralFeatureValueActionViewFactory"
- canonicalEditPolicyClassName="AddStructuralFeatureValueActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.80 /0/@diagram/@childNodes.81 /0/@diagram/@childNodes.82"
- graphicalNodeEditPolicyClassName="AddStructuralFeatureValueActionGraphicalNodeEditPolicy"
- createCommandClassName="AddStructuralFeatureValueActionCreateCommand"
- containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.AddStructuralFeatureValueAction_3091"
- displayName="AddStructuralFeatureValueAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.95/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddStructuralFeatureValueAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.81">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5160"
- editPartClassName="AddStructuralFeatureValueActionNameEditPart"
- itemSemanticEditPolicyClassName="AddStructuralFeatureValueActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="AddStructuralFeatureValueActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3092"
- editPartClassName="InputPinInAddStructuralFeatureValueActionAsObjectEditPart"
- itemSemanticEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsObjectItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsObjectCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsObjectGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand"
- containers="/0/@diagram/@childNodes.79"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3092"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.29">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction/object"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction/object"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.82">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5154"
- editPartClassName="InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsObjectLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5155"
- editPartClassName="InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3093"
- editPartClassName="InputPinInAddStructuralFeatureValueActionAsValueEditPart"
- itemSemanticEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsValueItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsValueCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsValueGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInAddStructuralFeatureValueActionAsValueCreateCommand"
- containers="/0/@diagram/@childNodes.79"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3093"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.30">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteStructuralFeatureAction/value"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteStructuralFeatureAction/value"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.83">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5156"
- editPartClassName="InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart"
- itemSemanticEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsValueLabel2ItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5157"
- editPartClassName="InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart"
- itemSemanticEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2ItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3094"
- editPartClassName="OutputPinInAddStructuralFeatureValueActionAsResultEditPart"
- itemSemanticEditPolicyClassName="OutputPinInAddStructuralFeatureValueActionAsResultItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinViewFactory"
- canonicalEditPolicyClassName="OutputPinInAddStructuralFeatureValueActionAsResultCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OutputPinInAddStructuralFeatureValueActionAsResultGraphicalNodeEditPolicy"
- createCommandClassName="OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand"
- containers="/0/@diagram/@childNodes.79"
- preferredSideName="SOUTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3094"
- displayName="OutputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteStructuralFeatureAction/result"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteStructuralFeatureAction/result"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.84">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5158"
- editPartClassName="OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart"
- itemSemanticEditPolicyClassName="OutputPinInAddStructuralFeatureValueActionAsResultLabel3ItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5159"
- editPartClassName="OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart"
- itemSemanticEditPolicyClassName="OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3ItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3095"
- editPartClassName="DestroyObjectActionEditPart"
- itemSemanticEditPolicyClassName="DestroyObjectActionItemSemanticEditPolicy"
- notationViewFactoryClassName="DestroyObjectActionViewFactory"
- canonicalEditPolicyClassName="DestroyObjectActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.84"
- graphicalNodeEditPolicyClassName="DestroyObjectActionGraphicalNodeEditPolicy"
- createCommandClassName="DestroyObjectActionCreateCommand"
- containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.DestroyObjectAction_3095"
- displayName="DestroyObjectAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.128/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DestroyObjectAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.85">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5163"
- editPartClassName="DestroyObjectActionNameEditPart"
- itemSemanticEditPolicyClassName="DestroyObjectActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="DestroyObjectActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3096"
- editPartClassName="InputPinInDestroyObjectActionEditPart"
- itemSemanticEditPolicyClassName="InputPinInDestroyObjectActionItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInDestroyObjectActionCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInDestroyObjectActionGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInDestroyObjectActionCreateCommand"
- containers="/0/@diagram/@childNodes.83"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3096"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.31">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DestroyObjectAction/target"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DestroyObjectAction/target"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.86">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5161"
- editPartClassName="InputPinInDestroyObjectActionLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInDestroyObjectActionLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5162"
- editPartClassName="InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3097"
- editPartClassName="ReadVariableActionEditPart"
- itemSemanticEditPolicyClassName="ReadVariableActionItemSemanticEditPolicy"
- notationViewFactoryClassName="ReadVariableActionViewFactory"
- canonicalEditPolicyClassName="ReadVariableActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.86"
- graphicalNodeEditPolicyClassName="ReadVariableActionGraphicalNodeEditPolicy"
- createCommandClassName="ReadVariableActionCreateCommand"
- containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ReadVariableAction_3097"
- displayName="ReadVariableAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.171/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadVariableAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.87">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5166"
- editPartClassName="ReadVariableActionNameEditPart"
- itemSemanticEditPolicyClassName="ReadVariableActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ReadVariableActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3098"
- editPartClassName="OutputPinInReadVariableActionAsResultEditPart"
- itemSemanticEditPolicyClassName="OutputPinInReadVariableActionAsResultItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinViewFactory"
- canonicalEditPolicyClassName="OutputPinInReadVariableActionAsResultCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OutputPinInReadVariableActionAsResultGraphicalNodeEditPolicy"
- createCommandClassName="OutputPinInReadVariableActionAsResultCreateCommand"
- containers="/0/@diagram/@childNodes.85">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3098"
- displayName="OutputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.32">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadVariableAction/result"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadVariableAction/result"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.88">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5164"
- editPartClassName="OutputPinInReadVariableActionAsResultLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInReadVariableActionAsResultLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5165"
- editPartClassName="OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart"
- itemSemanticEditPolicyClassName="OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="OutputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3099"
- editPartClassName="AddVariableValueActionEditPart"
- itemSemanticEditPolicyClassName="AddVariableValueActionItemSemanticEditPolicy"
- notationViewFactoryClassName="AddVariableValueActionViewFactory"
- canonicalEditPolicyClassName="AddVariableValueActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.88 /0/@diagram/@childNodes.89"
- graphicalNodeEditPolicyClassName="AddVariableValueActionGraphicalNodeEditPolicy"
- createCommandClassName="AddVariableValueActionCreateCommand"
- containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.AddVariableValueAction_3099"
- displayName="AddVariableValueAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.1/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddVariableValueAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.89">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5171"
- editPartClassName="AddVariableValueActionNameEditPart"
- itemSemanticEditPolicyClassName="AddVariableValueActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="AddVariableValueActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3100"
- editPartClassName="InputPinInAddVariableValueActionAsInsertAtEditPart"
- itemSemanticEditPolicyClassName="InputPinInAddVariableValueActionAsInsertAtItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInAddVariableValueActionAsInsertAtCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInAddVariableValueActionAsInsertAtGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInAddVariableValueActionAsInsertAtCreateCommand"
- containers="/0/@diagram/@childNodes.87"
- preferredSideName="WEST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3100"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.33">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddVariableValueAction/insertAt"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddVariableValueAction/insertAt"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.90">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5167"
- editPartClassName="InputPinInAddVariableValueActionAsInsertAtLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInAddVariableValueActionAsInsertAtLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5168"
- editPartClassName="InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3101"
- editPartClassName="InputPinInAddVariableValueActionAsValueEditPart"
- itemSemanticEditPolicyClassName="InputPinInAddVariableValueActionAsValueItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInAddVariableValueActionAsValueCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInAddVariableValueActionAsValueGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInAddVariableValueActionAsValueCreateCommand"
- containers="/0/@diagram/@childNodes.87"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3101"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.34">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteVariableAction/value"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteVariableAction/value"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.91">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5169"
- editPartClassName="InputPinInAddVariableValueActionAsValueLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInAddVariableValueActionAsValueSimpleLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5170"
- editPartClassName="InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3102"
- editPartClassName="BroadcastSignalActionEditPart"
- itemSemanticEditPolicyClassName="BroadcastSignalActionItemSemanticEditPolicy"
- notationViewFactoryClassName="BroadcastSignalActionViewFactory"
- canonicalEditPolicyClassName="BroadcastSignalActionCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.91"
- graphicalNodeEditPolicyClassName="BroadcastSignalActionGraphicalNodeEditPolicy"
- createCommandClassName="BroadcastSignalActionCreateCommand"
- containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.BroadcastSignalAction_3102"
- displayName="BroadcastSignalAction">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.99/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_CREATE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/BroadcastSignalAction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.92">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5175"
- editPartClassName="BroadcastSignalActionNameEditPart"
- itemSemanticEditPolicyClassName="BroadcastSignalActionNameItemSemanticEditPolicy"
- notationViewFactoryClassName="BroadcastSignalActionNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3103"
- editPartClassName="InputPinInBroadcastSignalActionEditPart"
- itemSemanticEditPolicyClassName="InputPinInBroadcastSignalActionItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinViewFactory"
- canonicalEditPolicyClassName="InputPinInBroadcastSignalActionCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InputPinInBroadcastSignalActionGraphicalNodeEditPolicy"
- createCommandClassName="InputPinInBroadcastSignalActionCreateCommand"
- containers="/0/@diagram/@childNodes.90"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3103"
- displayName="InputPin">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.35">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.93">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5172"
- editPartClassName="InputPinInBroadcastSignalActionLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInBroadcastSignalActionLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5173"
- editPartClassName="InputPinInBroadcastSignalActionValueLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInBroadcastSignalActionValueLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.7"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5174"
- editPartClassName="InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart"
- itemSemanticEditPolicyClassName="InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="InputPinLabelViewFactory"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3104"
- editPartClassName="CentralBufferNodeEditPart"
- itemSemanticEditPolicyClassName="CentralBufferNodeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="CentralBufferNodeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="CentralBufferNodeGraphicalNodeEditPolicy"
- createCommandClassName="CentralBufferNodeCreateCommand"
- containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.CentralBufferNode_3104"
- displayName="CentralBufferNode">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.103/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="ObjectNodeDescriptor"
- classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class ObjectNodeDescriptor extends org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel fObjectNodeLabel; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public ObjectNodeDescriptor() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fObjectNodeLabel = new org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fObjectNodeLabel.setBorder(new org.eclipse.draw2d.MarginBorder(getMapMode().DPtoLP(5)&#xD;&#xA;, getMapMode().DPtoLP(5)&#xD;&#xA;, getMapMode().DPtoLP(5)&#xD;&#xA;, getMapMode().DPtoLP(5)&#xD;&#xA;));&#xD;&#xA;&#xD;&#xA;this.add(fObjectNodeLabel);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel getObjectNodeLabel() {&#xD;&#xA;&#x9;&#x9;return fObjectNodeLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CentralBufferNode"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.94">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5176"
- editPartClassName="CentralBufferNodeLabelEditPart"
- itemSemanticEditPolicyClassName="CentralBufferNodeWrappingLabelItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getObjectNodeLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.20"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5177"
- editPartClassName="CentralBufferNodeSelectionEditPart"
- itemSemanticEditPolicyClassName="CentralBufferNodeSelectionItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="LinkAndCornerBentWithTextFigure"
- classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class LinkAndCornerBentWithTextFigure extends org.eclipse.papyrus.uml.diagram.common.figure.node.CornerBentFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel fCornerBentContent; &#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.PolylineShape fLinkToBehaviorProperty; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public LinkAndCornerBentWithTextFigure() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;this.setBackgroundColor(THIS_BACK&#xD;&#xA;);&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fCornerBentContent = new org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this.add(fCornerBentContent);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fLinkToBehaviorProperty = new org.eclipse.draw2d.PolylineShape();&#xD;&#xA;fLinkToBehaviorProperty.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;this.add(fLinkToBehaviorProperty);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel getCornerBentContent() {&#xD;&#xA;&#x9;&#x9;return fCornerBentContent;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.PolylineShape getLinkToBehaviorProperty() {&#xD;&#xA;&#x9;&#x9;return fLinkToBehaviorProperty;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;static final org.eclipse.swt.graphics.Color THIS_BACK = new org.eclipse.swt.graphics.Color(null, 248, 249, 214);&#xD;&#xA;&#xD;&#xA;"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.21"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3112"
- editPartClassName="ConstraintEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyCN"
- createCommandClassName="ConstraintCreateCommandCN"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.Constraint_3112"
- displayName="Constraint">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.0/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.117">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5189"
- editPartClassName="ConstraintNameEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintName2ItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5190"
- editPartClassName="ConstraintBodyEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.22"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </childNodes>
- <topLevelNodes
- visualID="2001"
- editPartClassName="ActivityEditPart"
- itemSemanticEditPolicyClassName="ActivityItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityViewFactory"
- canonicalEditPolicyClassName="ActivityCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.51"
- compartments="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3"
- graphicalNodeEditPolicyClassName="ActivityGraphicalNodeEditPolicy"
- createCommandClassName="ActivityCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.Activity_2001"
- displayName="Activity">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.72/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="857"
- height="757"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.gef.editpolicies.RootComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ResizeActivityEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5001"
- editPartClassName="ActivityNameEditPart"
- itemSemanticEditPolicyClassName="ActivityNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityNameViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5002"
- editPartClassName="ActivityIsSingleExecutionEditPart"
- itemSemanticEditPolicyClassName="ActivityIsSingleExecutionItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityIsSingleExecutionViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getHeaderSingleExecution"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/isSingleExecution"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <links
- visualID="4001"
- editPartClassName="ActionLocalPreconditionEditPart"
- itemSemanticEditPolicyClassName="ActionLocalPreconditionItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionLocalPreconditionViewFactory"
- createCommandClassName="ActionLocalPreconditionCreateCommand"
- reorientCommandClassName="ActionLocalPreconditionReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="DashedLinkDescriptor"
- classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DashedLinkDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DashedLinkDescriptor() {&#xD;&#xA;&#x9;&#x9;this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
- </modelFacet>
- </links>
- <links
- visualID="4002"
- editPartClassName="ActionLocalPostconditionEditPart"
- itemSemanticEditPolicyClassName="ActionLocalPostconditionItemSemanticEditPolicy"
- notationViewFactoryClassName="ActionLocalPostconditionViewFactory"
- createCommandClassName="ActionLocalPostconditionCreateCommand"
- reorientCommandClassName="ActionLocalPostconditionReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="DashedLinkDescriptor"
- classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DashedLinkDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DashedLinkDescriptor() {&#xD;&#xA;&#x9;&#x9;this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
- </modelFacet>
- </links>
- <links
- visualID="4003"
- editPartClassName="ObjectFlowEditPart"
- itemSemanticEditPolicyClassName="ObjectFlowItemSemanticEditPolicy"
- notationViewFactoryClassName="ObjectFlowViewFactory"
- createCommandClassName="ObjectFlowCreateCommand"
- reorientCommandClassName="ObjectFlowReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ObjectFlow_4003"
- displayName="ObjectFlow">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.125/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.ActivityEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.activity.edit.policies.InterruptibleEdgeEditPolicy.INTERRUPTIBLE_ICON_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.InterruptibleEdgeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/edge"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/edge"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.95">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge/source"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge/target"/>
- </modelFacet>
- <labels
- visualID="6001"
- editPartClassName="ObjectFlowNameEditPart"
- itemSemanticEditPolicyClassName="ObjectFlowNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ObjectFlowNameViewFactory"
- alignment="SOURCE">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6002"
- editPartClassName="ObjectFlowWeightEditPart"
- itemSemanticEditPolicyClassName="ObjectFlowWeightItemSemanticEditPolicy"
- notationViewFactoryClassName="ObjectFlowLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- <labels
- visualID="6005"
- editPartClassName="ObjectFlowSelectionEditPart"
- itemSemanticEditPolicyClassName="ObjectFlowSelectionItemSemanticEditPolicy"
- notationViewFactoryClassName="ObjectFlowLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="LinkAndCornerBentWithTextFigure"
- classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class LinkAndCornerBentWithTextFigure extends org.eclipse.papyrus.uml.diagram.common.figure.node.CornerBentFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel fCornerBentContent; &#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.PolylineShape fLinkToBehaviorProperty; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public LinkAndCornerBentWithTextFigure() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;this.setBackgroundColor(THIS_BACK&#xD;&#xA;);&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fCornerBentContent = new org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this.add(fCornerBentContent);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fLinkToBehaviorProperty = new org.eclipse.draw2d.PolylineShape();&#xD;&#xA;fLinkToBehaviorProperty.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;this.add(fLinkToBehaviorProperty);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel getCornerBentContent() {&#xD;&#xA;&#x9;&#x9;return fCornerBentContent;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.PolylineShape getLinkToBehaviorProperty() {&#xD;&#xA;&#x9;&#x9;return fLinkToBehaviorProperty;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;static final org.eclipse.swt.graphics.Color THIS_BACK = new org.eclipse.swt.graphics.Color(null, 248, 249, 214);&#xD;&#xA;&#xD;&#xA;">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="20"
- y="40"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.12"/>
- </labels>
- <labels
- visualID="6006"
- editPartClassName="ObjectFlowTransformationEditPart"
- itemSemanticEditPolicyClassName="ObjectFlowTransformationItemSemanticEditPolicy"
- notationViewFactoryClassName="ObjectFlowLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="LinkAndCornerBentWithTextFigure"
- classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class LinkAndCornerBentWithTextFigure extends org.eclipse.papyrus.uml.diagram.common.figure.node.CornerBentFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel fCornerBentContent; &#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.PolylineShape fLinkToBehaviorProperty; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public LinkAndCornerBentWithTextFigure() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;this.setBackgroundColor(THIS_BACK&#xD;&#xA;);&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fCornerBentContent = new org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this.add(fCornerBentContent);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fLinkToBehaviorProperty = new org.eclipse.draw2d.PolylineShape();&#xD;&#xA;fLinkToBehaviorProperty.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;this.add(fLinkToBehaviorProperty);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel getCornerBentContent() {&#xD;&#xA;&#x9;&#x9;return fCornerBentContent;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.PolylineShape getLinkToBehaviorProperty() {&#xD;&#xA;&#x9;&#x9;return fLinkToBehaviorProperty;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;static final org.eclipse.swt.graphics.Color THIS_BACK = new org.eclipse.swt.graphics.Color(null, 248, 249, 214);&#xD;&#xA;&#xD;&#xA;">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="-20"
- y="-60"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.11"/>
- </labels>
- <labels
- visualID="6007"
- editPartClassName="DecisionInputFlowEditPart"
- itemSemanticEditPolicyClassName="DecisionInputFlowItemSemanticEditPolicy"
- notationViewFactoryClassName="ObjectFlowLabelViewFactory"
- alignment="SOURCE">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.13"/>
- </labels>
- <labels
- visualID="6008"
- editPartClassName="ObjectFlowGuardEditPart"
- itemSemanticEditPolicyClassName="ObjectFlowGuardItemSemanticEditPolicy"
- notationViewFactoryClassName="ObjectFlowLabelViewFactory"
- alignment="TARGET">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.14"/>
- </labels>
- <labels
- visualID="6010"
- editPartClassName="ObjectFlowAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ObjectFlowAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ObjectFlowLabelViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- <labels
- visualID="6014"
- editPartClassName="ObjectFlowInterruptibleIconEditPart"
- itemSemanticEditPolicyClassName="ObjectFlowInterruptibleIconItemSemanticEditPolicy"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InterruptibleEdgeExternalIconFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- </labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.0/@expressions.96"
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.97"/>
- </links>
- <links
- visualID="4004"
- editPartClassName="ControlFlowEditPart"
- itemSemanticEditPolicyClassName="ControlFlowItemSemanticEditPolicy"
- notationViewFactoryClassName="ControlFlowViewFactory"
- createCommandClassName="ControlFlowCreateCommand"
- reorientCommandClassName="ControlFlowReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ControlFlow_4004"
- displayName="ControlFlow">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.116/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.ActivityEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.activity.edit.policies.InterruptibleEdgeEditPolicy.INTERRUPTIBLE_ICON_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.InterruptibleEdgeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ControlFlow"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/edge"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/edge"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.98">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge/source"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge/target"/>
- </modelFacet>
- <labels
- visualID="6003"
- editPartClassName="ControlFlowNameEditPart"
- itemSemanticEditPolicyClassName="ControlFlowNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ControlFlowNameViewFactory"
- alignment="SOURCE">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6004"
- editPartClassName="ControlFlowWeightEditPart"
- itemSemanticEditPolicyClassName="ControlFlowWeightItemSemanticEditPolicy"
- notationViewFactoryClassName="ControlFlowLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.8"/>
- </labels>
- <labels
- visualID="6009"
- editPartClassName="ControlFlowGuardEditPart"
- itemSemanticEditPolicyClassName="ControlFlowGuardItemSemanticEditPolicy"
- notationViewFactoryClassName="ControlFlowLabelViewFactory"
- alignment="TARGET">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.14"/>
- </labels>
- <labels
- visualID="6011"
- editPartClassName="ControlFlowAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ControlFlowAppliedStereotypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ControlFlowLabelViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- <labels
- visualID="6013"
- editPartClassName="ControlFlowInterruptibleIconEditPart"
- itemSemanticEditPolicyClassName="ControlFlowInterruptibleIconItemSemanticEditPolicy"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InterruptibleEdgeExternalIconFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- </labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.0/@expressions.99"
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.100"/>
- </links>
- <links
- visualID="4005"
- editPartClassName="ExceptionHandlerEditPart"
- itemSemanticEditPolicyClassName="ExceptionHandlerItemSemanticEditPolicy"
- notationViewFactoryClassName="ExceptionHandlerViewFactory"
- createCommandClassName="ExceptionHandlerCreateCommand"
- reorientCommandClassName="ExceptionHandlerReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ExceptionHandler_4005"
- displayName="ExceptionHandler">
- <metamodelType
- href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.79/@elementType"/>
- </elementType>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.ExceptionHandlerFigure"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExceptionHandler"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExecutableNode/handler"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExecutableNode/handler"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExceptionHandler/protectedNode"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExceptionHandler/exceptionInput"/>
- </modelFacet>
- <labels
- visualID="6012"
- editPartClassName="ExceptionHandlerTypeEditPart"
- itemSemanticEditPolicyClassName="ExceptionHandlerTypeItemSemanticEditPolicy"
- notationViewFactoryClassName="ExceptionHandlerLabelViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.19"/>
- </labels>
- <labels
- visualID="6015"
- editPartClassName="ExceptionHandlerIconEditPart"
- itemSemanticEditPolicyClassName="ExceptionHandlerIconItemSemanticEditPolicy"
- readOnly="true"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InterruptibleEdgeExternalIconFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.RequestConstants.REQ_DELETE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
- </labels>
- </links>
- <links
- visualID="4006"
- editPartClassName="CommentLinkEditPart"
- itemSemanticEditPolicyClassName="CommentLinkItemSemanticEditPolicy"
- notationViewFactoryClassName="CommentAnnotatedElementViewFactory"
- createCommandClassName="CommentLinkCreateCommand"
- reorientCommandClassName="CommentLinkReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LinkFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
- </modelFacet>
- </links>
- <links
- visualID="4007"
- editPartClassName="ConstraintConstrainedElementEditPart"
- createCommandClassName="ConstraintConstrainedElementCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ConstraintConstrainedElement_4007"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LinkFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
- </modelFacet>
- </links>
- <compartments
- visualID="7001"
- editPartClassName="ActivityActivityParametersCompartmentEditPart"
- itemSemanticEditPolicyClassName="ActivityActivityParametersCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityActivityParametersCompartmentViewFactory"
- canonicalEditPolicyClassName="ActivityActivityParametersCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.0"
- title="ActivityFigureParameterCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@topLevelNodes.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getParameterFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityActivityParametersCompartmentCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- </compartments>
- <compartments
- visualID="7002"
- editPartClassName="ActivityActivityPreConditionsCompartmentEditPart"
- itemSemanticEditPolicyClassName="ActivityActivityPreConditionsCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityActivityPreConditionsCompartmentViewFactory"
- canonicalEditPolicyClassName="ActivityActivityPreConditionsCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.1"
- title="ActivityFigurePreconditionCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@topLevelNodes.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPreconditionFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityActivityPreConditionsCompartmentCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- </compartments>
- <compartments
- visualID="7003"
- editPartClassName="ActivityActivityPostConditionsCompartmentEditPart"
- itemSemanticEditPolicyClassName="ActivityActivityPostConditionsCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityActivityPostConditionsCompartmentViewFactory"
- canonicalEditPolicyClassName="ActivityActivityPostConditionsCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2"
- title="ActivityFigurePostCondtionCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@topLevelNodes.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPostconditionFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityActivityPostConditionsCompartmentCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- </compartments>
- <compartments
- visualID="7004"
- editPartClassName="ActivityActivityContentCompartmentEditPart"
- itemSemanticEditPolicyClassName="ActivityActivityContentCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityActivityContentCompartmentViewFactory"
- canonicalEditPolicyClassName="ActivityActivityContentCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.67 /0/@diagram/@childNodes.68 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.72 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.93"
- title="ActivityFigureContentCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@topLevelNodes.0"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getContentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityParameterNodeInCompartmentCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CompartmentXYLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomActivityActivityContentCompartmentItemSemanticEditPolicy"/>
- </compartments>
- <compartments
- visualID="7008"
- editPartClassName="ConditionalNodeStructuredActivityNodeContentCompartmentEditPart"
- itemSemanticEditPolicyClassName="ConditionalNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="ConditionalNodeStructuredActivityNodeContentCompartmentViewFactory"
- canonicalEditPolicyClassName="ConditionalNodeStructuredActivityNodeContentCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
- title="StructuredActivityNodeContentCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.56"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getStructuredActivityNodeCompartment"
- figureQualifiedClassName="org.eclipse.draw2d.RoundedRectangle"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityGroupCustomDragAndDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomConditionalNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- </compartments>
- <compartments
- visualID="7009"
- editPartClassName="ExpansionRegionStructuredActivityNodeContentCompartmentEditPart"
- itemSemanticEditPolicyClassName="ExpansionRegionStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="ExpansionRegionStructuredActivityNodeContentCompartmentViewFactory"
- canonicalEditPolicyClassName="ExpansionRegionStructuredActivityNodeContentCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
- title="StructuredActivityNodeContentCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.57"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getStructuredActivityNodeCompartment"
- figureQualifiedClassName="org.eclipse.draw2d.RoundedRectangle"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.activitygroup.editpolicy.ExpansionRegionCompartmentDnDEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomExpansionRegionStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- </compartments>
- <compartments
- visualID="7010"
- editPartClassName="LoopNodeStructuredActivityNodeContentCompartmentEditPart"
- itemSemanticEditPolicyClassName="LoopNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="LoopNodeStructuredActivityNodeContentCompartmentViewFactory"
- canonicalEditPolicyClassName="LoopNodeStructuredActivityNodeContentCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
- title="StructuredActivityNodeContentCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.60"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getStructuredActivityNodeCompartment"
- figureQualifiedClassName="org.eclipse.draw2d.RoundedRectangle"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityGroupCustomDragAndDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomLoopNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- </compartments>
- <compartments
- visualID="7012"
- editPartClassName="SequenceNodeStructuredActivityNodeContentCompartmentEditPart"
- itemSemanticEditPolicyClassName="SequenceNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="SequenceNodeStructuredActivityNodeContentCompartmentViewFactory"
- canonicalEditPolicyClassName="SequenceNodeStructuredActivityNodeContentCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
- title="StructuredActivityNodeContentCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.64"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getStructuredActivityNodeCompartment"
- figureQualifiedClassName="org.eclipse.draw2d.RoundedRectangle"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityGroupCustomDragAndDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomSequenceNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- </compartments>
- <compartments
- visualID="7005"
- editPartClassName="StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart"
- itemSemanticEditPolicyClassName="StructuredActivityNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="StructuredActivityNodeStructuredActivityNodeContentCompartmentViewFactory"
- canonicalEditPolicyClassName="StructuredActivityNodeStructuredActivityNodeContentCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
- title="StructuredActivityNodeContentCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.65"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getStructuredActivityNodeCompartment"
- figureQualifiedClassName="org.eclipse.draw2d.RoundedRectangle"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityGroupCustomDragAndDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomStructuredActivityNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- </compartments>
- <compartments
- visualID="7006"
- editPartClassName="ActivityPartitionActivityPartitionContentCompartmentEditPart"
- itemSemanticEditPolicyClassName="ActivityPartitionActivityPartitionContentCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityPartitionActivityPartitionContentCompartmentViewFactory"
- canonicalEditPolicyClassName="ActivityPartitionActivityPartitionContentCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.67 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
- title="ActivityPartitionContentCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.67"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getActivityPartitionCompartment"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityGroupCustomDragAndDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomActivityPartitionActivityPartitionContentCompartmentItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.activitygroup.editpolicy.ActivityPartitionCompartmentCreationEditPolicy"/>
- </compartments>
- <compartments
- visualID="7007"
- editPartClassName="InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart"
- itemSemanticEditPolicyClassName="InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentViewFactory"
- canonicalEditPolicyClassName="InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
- title="InterruptibleActivityRegionContentCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.68"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InterruptibleActivityRegionFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityGroupCustomDragAndDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomInterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.activitygroup.editpolicy.InterruptibleActivityRegionCompartmentCreationEditPolicy"/>
- </compartments>
- <compartments
- visualID="7014"
- editPartClassName="ActivityCNParametersCompartmentEditPart"
- itemSemanticEditPolicyClassName="ActivityCNParametersCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityActivityParametersCompartmentViewFactory"
- canonicalEditPolicyClassName="ActivityCNParametersCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.0"
- title="ActivityFigureParameterCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.72">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getParameterFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityActivityParametersCompartmentCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- </compartments>
- <compartments
- visualID="7015"
- editPartClassName="ActivityCNPreConditionsCompartmentEditPart"
- itemSemanticEditPolicyClassName="ActivityCNPreConditionsCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityActivityPreConditionsCompartmentViewFactory"
- canonicalEditPolicyClassName="ActivityCNPreConditionsCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.1"
- title="ActivityFigurePreconditionCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.72">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPreconditionFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityActivityPreConditionsCompartmentCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- </compartments>
- <compartments
- visualID="7016"
- editPartClassName="ActivityCNPostConditionsCompartmentEditPart"
- itemSemanticEditPolicyClassName="ActivityCNPostConditionsCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityActivityPostConditionsCompartmentViewFactory"
- canonicalEditPolicyClassName="ActivityCNPostConditionsCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2"
- title="ActivityFigurePostCondtionCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.72">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPostconditionFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityActivityPostConditionsCompartmentCanonicalEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- </compartments>
- <compartments
- visualID="7013"
- editPartClassName="ActivityCNContentCompartmentEditPart"
- itemSemanticEditPolicyClassName="ActivityCNContentCompartmentItemSemanticEditPolicy"
- notationViewFactoryClassName="ActivityActivityContentCompartmentViewFactory"
- canonicalEditPolicyClassName="ActivityCNContentCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.67 /0/@diagram/@childNodes.68 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.72 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.51"
- title="ActivityFigureContentCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.72"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getContentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityParameterNodeInCompartmentCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CompartmentXYLayoutEditPolicy"/>
- </compartments>
- <palette
- packageName="org.eclipse.papyrus.uml.diagram.activity.part">
- <groups
- title="Nodes"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolGroup"
- title="ActivityGroup"
- description="ActivityGroup"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createActivityGroupGroup"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Activity Partition"
- description="Create an Activity Partition"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActivityPartition.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActivityPartition.gif"
- genNodes="/0/@diagram/@childNodes.67"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Interruptible Activity Region"
- description="Create an Interruptible Activity Region"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterruptibleActivityRegion.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterruptibleActivityRegion.gif"
- genNodes="/0/@diagram/@childNodes.68"/>
- </entries>
- <entries
- xsi:type="gmfgen:ToolGroup"
- title="ControlNodes"
- description="ControlNodes"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createControlNodesGroup"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Initial node"
- description="Create an Initial node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InitialNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InitialNode.gif"
- genNodes="/0/@diagram/@childNodes.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Activity final"
- description="Create an Activity final node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActivityFinalNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActivityFinalNode.gif"
- genNodes="/0/@diagram/@childNodes.4"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Flow final"
- description="Create a Flow final node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FlowFinalNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FlowFinalNode.gif"
- genNodes="/0/@diagram/@childNodes.5"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Decision node"
- description="Create a Decision node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DecisionNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DecisionNode.gif"
- genNodes="/0/@diagram/@childNodes.32"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Merge node"
- description="Create a Merge node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/MergeNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/MergeNode.gif"
- genNodes="/0/@diagram/@childNodes.33"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Join node"
- description="Create a Merge node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/JoinNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/JoinNode.gif"
- genNodes="/0/@diagram/@childNodes.35"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Fork node"
- description="Create a Fork node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ForkNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ForkNode.gif"
- genNodes="/0/@diagram/@childNodes.34"/>
- </entries>
- <entries
- xsi:type="gmfgen:ToolGroup"
- title="Constraints"
- description="Constraints"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createConstraintsGroup"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Local Precondition Constraint"
- description="Create a Constraint as Local Precondition for an Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- genNodes="/0/@diagram/@childNodes.30"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Local Precondition Interaction Constraint"
- description="Create an Interaction Constraint as Local Precondition for an Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionConstraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionConstraint.gif"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Local Precondition Interval Constraint"
- description="Create an Interval Constraint as Local Precondition for an Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/IntervalConstraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/IntervalConstraint.gif"
- genNodes="/0/@diagram/@childNodes.28"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Local Precondition Duration Constraint"
- description="Create a Duration Constraint as Local Precondition for an Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
- genNodes="/0/@diagram/@childNodes.24"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Local Precondition Time Constraint"
- description="Create a Time Constraint as Local Precondition for an Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif"
- genNodes="/0/@diagram/@childNodes.26"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Local Postcondition Constraint"
- description="Create a Constraint as Local Postcondition for an Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- genNodes="/0/@diagram/@childNodes.31"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Local Postcondition Interaction Constraint"
- description="Create an Interaction Constraint as Local Postcondition for an Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionConstraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionConstraint.gif"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Local Postcondition Interval Constraint"
- description="Create an Interval Constraint as Local Postcondition for an Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/IntervalConstraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/IntervalConstraint.gif"
- genNodes="/0/@diagram/@childNodes.29"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Local Postcondition Duration Constraint"
- description="Create a Duration Constraint as Local Postcondition for an Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
- genNodes="/0/@diagram/@childNodes.25"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Local Postcondition Time Constraint"
- description="Create a Time Constraint as Local Postcondition for an Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif"
- genNodes="/0/@diagram/@childNodes.27"/>
- </entries>
- <entries
- xsi:type="gmfgen:ToolGroup"
- title="Pins"
- description="Pins"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createPinsGroup"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Output Pin"
- description="Create an Output Pin"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OutputPin.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OutputPin.gif"
- genNodes="/0/@diagram/@childNodes.10 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.20 /0/@diagram/@childNodes.53 /0/@diagram/@childNodes.55 /0/@diagram/@childNodes.71 /0/@diagram/@childNodes.61 /0/@diagram/@childNodes.62 /0/@diagram/@childNodes.63"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Input Pin"
- description="Create an Input Pin"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InputPin.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InputPin.gif"
- genNodes="/0/@diagram/@childNodes.9 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.66"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Action Input Pin"
- description="Create an Action Input Pin"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActionInputPin.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActionInputPin.gif"
- genNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.45"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Value Pin"
- description="Create a Value Pin"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ValuePin.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ValuePin.gif"
- genNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.46"/>
- </entries>
- <entries
- xsi:type="gmfgen:ToolGroup"
- title="ExpansionRegions"
- description="ExpansionRegions"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createExpansionRegionsGroup"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Expansion Region"
- description="Create an Expansion Region"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExpansionRegion.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExpansionRegion.gif"
- genNodes="/0/@diagram/@childNodes.57"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Input Expansion Node"
- description="Create an Expansion Node as Input of an Expansion Region"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExpansionNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExpansionNode.gif"
- genNodes="/0/@diagram/@childNodes.58"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Output Expansion Node"
- description="Create an Expansion Node as Output of an Expansion Region"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExpansionNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExpansionNode.gif"
- genNodes="/0/@diagram/@childNodes.59"/>
- </entries>
- <entries
- xsi:type="gmfgen:ToolGroup"
- title="InvocationActions"
- description="InvocationActions"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="InvocationActionsGroup"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Broadcast Signal Action"
- description="Create a Broadcast Signal Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/BroadcastSignalAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/BroadcastSignalAction.gif"
- genNodes="/0/@diagram/@childNodes.90"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Call Behavior Action"
- description="Create an Call Behavior Action node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CallBehaviorAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CallBehaviorAction.gif"
- genNodes="/0/@diagram/@childNodes.11"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Call Operation Action"
- description="Create a Call Operation Action node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CallOperationAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CallOperationAction.gif"
- genNodes="/0/@diagram/@childNodes.16"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Send Object Action"
- description="Create a Send Object Action node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/SendObjectAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/SendObjectAction.gif"
- genNodes="/0/@diagram/@childNodes.37"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Send Signal Action"
- description="Create a Send Signal Action node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/SendSignalAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/SendSignalAction.gif"
- genNodes="/0/@diagram/@childNodes.44"/>
- </entries>
- <entries
- xsi:type="gmfgen:ToolGroup"
- title="ObjectActions"
- description="ObjectActions"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createObjectActionsGroup"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Create Object Action"
- description="Create a Create Object Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CreateObjectAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CreateObjectAction.gif"
- genNodes="/0/@diagram/@childNodes.73"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Destroy Object Action"
- description="Create a Destroy Object Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestroyObjectAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestroyObjectAction.gif"
- genNodes="/0/@diagram/@childNodes.83"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="ReadSelfAction"
- description="Create a ReadSelfAction"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadSelfAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadSelfAction.gif"
- genNodes="/0/@diagram/@childNodes.70"/>
- </entries>
- <entries
- xsi:type="gmfgen:ToolGroup"
- title="StructuredActions"
- description="StructuredActions"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createStructuredActionsGroup"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Structured Activity Node"
- description="Create a Structured Activity Node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StructuredActivityNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StructuredActivityNode.gif"
- genNodes="/0/@diagram/@childNodes.65"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Loop Node"
- description="Create a Loop Node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/LoopNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/LoopNode.gif"
- genNodes="/0/@diagram/@childNodes.60"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Sequence Node"
- description="Create a Sequence Node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/SequenceNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/SequenceNode.gif"
- genNodes="/0/@diagram/@childNodes.64"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Conditional Node"
- description="Create a Conditional Node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConditionalNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConditionalNode.gif"
- genNodes="/0/@diagram/@childNodes.56"/>
- </entries>
- <entries
- xsi:type="gmfgen:ToolGroup"
- title="StructuralFeatureActions"
- description="StructuralFeatureActions"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createStructuralFeatureActionsGroup"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Read Structural Feature Action"
- description="Create Read Structural Feature Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadStructuralFeatureAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadStructuralFeatureAction.gif"
- genNodes="/0/@diagram/@childNodes.76"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Add Structural Feature Value Action"
- description="Create Add Structural Feature Value Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AddStructuralFeatureValueAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AddStructuralFeatureValueAction.gif"
- genNodes="/0/@diagram/@childNodes.79"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Add Structural Feature Value Action"
- description="Create Add Structural Feature Value Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AddStructuralFeatureValueAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AddStructuralFeatureValueAction.gif"
- genNodes="/0/@diagram/@childNodes.79"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Read Structural Feature Action"
- description="Create Read Structural Feature Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadStructuralFeatureAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadStructuralFeatureAction.gif"
- genNodes="/0/@diagram/@childNodes.76"/>
- </entries>
- <entries
- xsi:type="gmfgen:ToolGroup"
- title="VariableActions"
- description="VariableActions"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createVariableActionsGroup"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Add Variable Value Action"
- description="Create Add Variable Value Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AddVariableValueAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AddVariableValueAction.gif"
- genNodes="/0/@diagram/@childNodes.87"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Read Variable Action"
- description="Create a Read Variable Action"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadVariableAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadVariableAction.gif"
- genNodes="/0/@diagram/@childNodes.85"/>
- </entries>
- <entries
- xsi:type="gmfgen:ToolGroup"
- title="MiscellaneousActions"
- description="MiscellaneousActions"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createOtherActionsGroup"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Opaque Action"
- description="Create an Opaque Action node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OpaqueAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OpaqueAction.gif"
- genNodes="/0/@diagram/@childNodes.6"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Value Specification Action"
- description="Create a Value Specification Action node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ValueSpecificationAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ValueSpecificationAction.gif"
- genNodes="/0/@diagram/@childNodes.54"/>
- </entries>
- <entries
- xsi:type="gmfgen:ToolGroup"
- title="AcceptEventActions"
- description="AcceptEventActions"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- stack="true"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Accept Event Action"
- description="Create an Accept Event Action node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AcceptEventAction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AcceptEventAction.gif"
- genNodes="/0/@diagram/@childNodes.52"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Activity"
- description="Create an Activity"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Activity.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Activity.gif"
- genNodes="/0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.72"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Activity Parameter Node"
- description="Create an Activity Parameter Node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActivityParameterNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActivityParameterNode.gif"
- genNodes="/0/@diagram/@childNodes.51"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Central Buffer Node"
- description="Create a Central Buffer Node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataStoreNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataStoreNode.gif"
- genNodes="/0/@diagram/@childNodes.92"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Data Store Node"
- description="Create a Data Store Node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataStoreNode.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataStoreNode.gif"
- genNodes="/0/@diagram/@childNodes.36"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Comment"
- description="Create a Comment"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- genNodes="/0/@diagram/@childNodes.69"/>
- </groups>
- <groups
- title="Edges"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Control Flow"
- description="Create a Control Flow"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ControlFlow.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ControlFlow.gif"
- genLinks="/0/@diagram/@links.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Exception Handler"
- description="Create an Exception Handler"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExceptionHandler.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExceptionHandler.gif"
- genLinks="/0/@diagram/@links.4"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Object Flow"
- description="Create an Object Flow"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ObjectFlow.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ObjectFlow.gif"
- genLinks="/0/@diagram/@links.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Link"
- description="Create of a link for comment"
- largeIconPath="icons/obj16/Link.gif"
- smallIconPath="icons/obj16/Link.gif"
- genLinks="/0/@diagram/@links.5 /0/@diagram/@links.6"/>
- </groups>
- </palette>
- <preferencePages
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.general"
- name="UML Diagram">
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.appearance"
- name="Appearance"
- kind="Appearance"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.connections"
- name="Connections"
- kind="Connections"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.printing"
- name="Printing"
- kind="Printing"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
- name="Rulers And Grid"
- kind="RulersAndGrid"/>
- </preferencePages>
- </diagram>
- <plugin
- iD="org.eclipse.papyrus.uml.diagram.activity"
- name="Papyrus activity editor Plugin"
- provider="Papyrus"
- version="1.1.0.qualifier">
- <requiredPlugins>org.eclipse.draw2d</requiredPlugins>
- <requiredPlugins>org.eclipse.papyrus.uml.diagram.common</requiredPlugins>
- <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
- </plugin>
- <editor/>
- <navigator>
- <childReferences
- child="/0/@diagram"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.0"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.1"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.2"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.3"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.4"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.5"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@childNodes.7"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@childNodes.8"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@childNodes.9"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@childNodes.10"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.6"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@childNodes.12"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@childNodes.13"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@childNodes.14"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@childNodes.15"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.11"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@childNodes.17"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@childNodes.18"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@childNodes.19"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@childNodes.20"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@childNodes.21"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@childNodes.22"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@childNodes.23"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.16"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.24"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.25"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.26"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.27"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.28"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.29"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.30"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.31"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.32"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.33"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.34"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.35"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.36"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@childNodes.38"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@childNodes.39"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@childNodes.40"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@childNodes.41"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@childNodes.42"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@childNodes.43"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.37"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@childNodes.45"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@childNodes.46"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@childNodes.47"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@childNodes.48"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@childNodes.49"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@childNodes.50"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.44"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.51"/>
- <childReferences
- parent="/0/@diagram/@childNodes.52"
- child="/0/@diagram/@childNodes.53"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.52"/>
- <childReferences
- parent="/0/@diagram/@childNodes.54"
- child="/0/@diagram/@childNodes.55"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.54"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.56"/>
- <childReferences
- parent="/0/@diagram/@childNodes.57"
- child="/0/@diagram/@childNodes.58"/>
- <childReferences
- parent="/0/@diagram/@childNodes.57"
- child="/0/@diagram/@childNodes.59"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.57"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.60"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.64"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.65"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.67"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.68"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.69"/>
- <childReferences
- parent="/0/@diagram/@childNodes.70"
- child="/0/@diagram/@childNodes.71"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.70"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.0"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.1"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.2"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.3"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.4"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.5"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.6"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.11"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.16"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.24"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.25"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.26"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.27"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.28"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.29"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.30"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.31"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.32"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.33"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.34"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.35"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.36"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.37"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.44"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.51"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.52"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.54"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.56"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.57"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.60"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.64"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.65"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.67"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.68"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.69"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.70"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.72"/>
- <childReferences
- parent="/0/@diagram/@childNodes.73"
- child="/0/@diagram/@childNodes.74"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.73"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.75"/>
- <childReferences
- parent="/0/@diagram/@childNodes.76"
- child="/0/@diagram/@childNodes.77"/>
- <childReferences
- parent="/0/@diagram/@childNodes.76"
- child="/0/@diagram/@childNodes.78"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.76"/>
- <childReferences
- parent="/0/@diagram/@childNodes.79"
- child="/0/@diagram/@childNodes.80"/>
- <childReferences
- parent="/0/@diagram/@childNodes.79"
- child="/0/@diagram/@childNodes.81"/>
- <childReferences
- parent="/0/@diagram/@childNodes.79"
- child="/0/@diagram/@childNodes.82"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.79"/>
- <childReferences
- parent="/0/@diagram/@childNodes.83"
- child="/0/@diagram/@childNodes.84"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.83"/>
- <childReferences
- parent="/0/@diagram/@childNodes.85"
- child="/0/@diagram/@childNodes.86"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.85"/>
- <childReferences
- parent="/0/@diagram/@childNodes.87"
- child="/0/@diagram/@childNodes.88"/>
- <childReferences
- parent="/0/@diagram/@childNodes.87"
- child="/0/@diagram/@childNodes.89"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.87"/>
- <childReferences
- parent="/0/@diagram/@childNodes.90"
- child="/0/@diagram/@childNodes.91"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.90"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@childNodes.92"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.72"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.73"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.75"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.76"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.79"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.83"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.85"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.87"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.90"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@childNodes.92"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@topLevelNodes.0"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.0"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.24"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.24"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.25"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.25"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.26"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.26"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.27"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.27"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.28"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.28"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.29"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.29"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.30"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.30"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.31"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.31"
- child="/0/@diagram/@links.0"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.6"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.11"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.16"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.37"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.44"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.52"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.52"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.54"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.54"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.56"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.56"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.57"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.57"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.60"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.60"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.64"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.64"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.65"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.65"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.70"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.70"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.73"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.73"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.76"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.76"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.79"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.79"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.83"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.83"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.85"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.85"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.87"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.87"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.0"
- child="/0/@diagram/@childNodes.90"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.90"
- child="/0/@diagram/@links.0"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.1"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.24"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.24"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.25"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.25"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.26"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.26"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.27"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.27"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.28"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.28"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.29"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.29"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.30"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.30"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.31"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.31"
- child="/0/@diagram/@links.1"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.6"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.11"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.16"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.37"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.44"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.52"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.52"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.54"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.54"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.56"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.56"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.57"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.57"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.60"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.60"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.64"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.64"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.65"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.65"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.70"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.70"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.73"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.73"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.76"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.76"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.79"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.79"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.83"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.83"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.85"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.85"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.87"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.87"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.1"
- child="/0/@diagram/@childNodes.90"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.90"
- child="/0/@diagram/@links.1"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.2"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.7"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.8"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.9"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.10"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.11"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.12"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.13"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.14"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.15"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.16"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.17"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.18"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.18"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.19"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.19"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.20"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.20"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.21"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.21"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.22"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.22"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.23"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.23"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.32"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.32"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.33"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.33"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.34"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.34"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.35"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.35"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.36"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.36"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.37"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.38"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.38"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.39"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.39"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.40"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.40"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.41"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.41"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.42"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.42"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.43"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.43"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.44"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.45"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.45"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.46"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.46"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.47"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.47"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.48"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.48"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.49"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.49"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.50"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.50"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.51"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.51"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.52"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.52"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.53"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.53"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.54"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.54"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.55"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.55"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.56"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.56"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.57"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.57"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.58"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.58"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.59"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.59"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.60"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.60"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.64"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.64"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.65"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.65"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.70"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.70"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.71"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.71"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.73"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.73"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.74"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.74"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.76"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.76"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.77"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.77"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.78"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.78"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.79"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.79"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.80"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.80"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.81"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.81"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.82"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.82"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.83"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.83"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.84"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.84"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.85"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.85"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.86"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.86"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.87"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.87"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.88"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.88"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.89"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.89"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.90"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.90"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.91"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.91"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.92"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.92"
- child="/0/@diagram/@links.2"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.3"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.4"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.5"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.6"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.7"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.8"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.9"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.10"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.11"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.12"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.13"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.14"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.15"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.16"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.17"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.18"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.18"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.19"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.19"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.20"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.20"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.21"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.21"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.22"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.22"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.23"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.23"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.32"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.32"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.33"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.33"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.34"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.34"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.35"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.35"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.36"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.36"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.37"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.38"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.38"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.39"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.39"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.40"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.40"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.41"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.41"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.42"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.42"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.43"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.43"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.44"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.45"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.45"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.46"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.46"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.47"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.47"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.48"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.48"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.49"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.49"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.50"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.50"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.51"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.51"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.52"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.52"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.53"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.53"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.54"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.54"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.55"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.55"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.56"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.56"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.57"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.57"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.58"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.58"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.59"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.59"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.60"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.60"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.64"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.64"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.65"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.65"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.70"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.70"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.71"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.71"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.73"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.73"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.74"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.74"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.76"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.76"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.77"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.77"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.78"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.78"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.79"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.79"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.80"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.80"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.81"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.81"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.82"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.82"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.83"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.83"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.84"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.84"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.85"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.85"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.86"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.86"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.87"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.87"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.88"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.88"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.89"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.89"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.90"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.90"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.91"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.91"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@childNodes.92"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.92"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.3"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.7"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.8"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.9"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.10"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.11"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.12"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.13"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.14"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.15"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.16"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.17"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.18"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.18"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.19"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.19"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.20"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.20"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.21"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.21"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.22"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.22"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.23"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.23"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.32"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.32"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.33"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.33"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.34"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.34"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.35"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.35"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.36"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.36"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.37"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.38"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.38"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.39"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.39"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.40"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.40"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.41"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.41"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.42"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.42"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.43"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.43"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.44"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.45"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.45"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.46"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.46"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.47"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.47"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.48"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.48"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.49"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.49"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.50"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.50"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.51"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.51"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.52"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.52"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.53"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.53"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.54"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.54"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.55"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.55"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.56"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.56"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.57"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.57"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.58"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.58"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.59"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.59"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.60"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.60"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.64"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.64"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.65"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.65"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.70"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.70"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.71"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.71"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.73"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.73"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.74"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.74"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.76"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.76"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.77"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.77"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.78"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.78"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.79"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.79"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.80"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.80"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.81"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.81"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.82"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.82"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.83"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.83"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.84"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.84"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.85"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.85"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.86"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.86"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.87"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.87"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.88"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.88"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.89"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.89"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.90"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.90"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.91"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.91"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.92"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.92"
- child="/0/@diagram/@links.3"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.3"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.4"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.5"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.6"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.7"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.8"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.9"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.10"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.11"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.12"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.13"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.14"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.15"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.16"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.17"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.18"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.18"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.19"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.19"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.20"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.20"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.21"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.21"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.22"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.22"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.23"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.23"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.32"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.32"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.33"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.33"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.34"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.34"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.35"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.35"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.36"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.36"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.37"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.38"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.38"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.39"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.39"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.40"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.40"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.41"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.41"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.42"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.42"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.43"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.43"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.44"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.45"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.45"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.46"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.46"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.47"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.47"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.48"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.48"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.49"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.49"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.50"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.50"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.51"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.51"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.52"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.52"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.53"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.53"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.54"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.54"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.55"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.55"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.56"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.56"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.57"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.57"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.58"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.58"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.59"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.59"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.60"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.60"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.64"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.64"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.65"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.65"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.70"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.70"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.71"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.71"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.73"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.73"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.74"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.74"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.76"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.76"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.77"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.77"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.78"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.78"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.79"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.79"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.80"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.80"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.81"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.81"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.82"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.82"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.83"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.83"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.84"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.84"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.85"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.85"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.86"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.86"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.87"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.87"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.88"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.88"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.89"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.89"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.90"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.90"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.91"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.91"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@childNodes.92"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.92"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.4"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.7"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.8"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.9"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.10"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.12"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.13"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.14"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.15"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.17"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.18"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.18"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.19"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.19"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.20"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.20"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.21"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.21"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.22"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.22"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.23"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.23"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.36"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.36"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.38"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.38"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.39"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.39"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.40"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.40"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.41"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.41"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.42"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.42"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.43"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.43"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.45"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.45"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.46"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.46"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.47"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.47"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.48"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.48"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.49"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.49"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.50"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.50"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.51"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.51"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.53"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.53"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.55"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.55"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.58"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.58"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.59"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.59"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.71"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.71"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.74"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.74"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.77"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.77"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.78"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.78"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.80"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.80"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.81"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.81"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.82"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.82"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.84"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.84"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.86"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.86"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.88"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.88"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.89"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.89"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.91"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.91"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.92"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.92"
- child="/0/@diagram/@links.4"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.6"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.11"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.16"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.37"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.44"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.52"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.52"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.54"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.54"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.56"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.56"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.57"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.57"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.60"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.60"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.64"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.64"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.65"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.65"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.70"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.70"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.73"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.73"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.76"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.76"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.79"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.79"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.83"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.83"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.85"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.85"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.87"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.87"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@childNodes.90"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.90"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram"
- child="/0/@diagram/@links.5"
- groupName="links"
- groupIcon="icons/linksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@topLevelNodes.0"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@topLevelNodes.0"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.3"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.4"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.5"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.5"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.6"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.6"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.7"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.7"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.8"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.8"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.9"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.9"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.10"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.10"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.11"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.11"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.12"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.12"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.13"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.13"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.14"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.14"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.15"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.15"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.16"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.16"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.17"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.17"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.18"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.18"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.19"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.19"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.20"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.20"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.21"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.21"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.22"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.22"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.23"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.23"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.24"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.24"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.25"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.25"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.26"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.26"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.27"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.27"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.28"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.28"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.29"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.29"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.30"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.30"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.31"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.31"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.32"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.32"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.33"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.33"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.34"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.34"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.35"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.35"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.36"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.36"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.37"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.37"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.38"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.38"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.39"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.39"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.40"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.40"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.41"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.41"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.42"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.42"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.43"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.43"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.44"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.44"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.45"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.45"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.46"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.46"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.47"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.47"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.48"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.48"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.49"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.49"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.50"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.50"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.51"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.51"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.52"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.52"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.53"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.53"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.54"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.54"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.55"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.55"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.56"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.56"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.57"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.57"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.58"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.58"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.59"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.59"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.60"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.60"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.64"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.64"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.65"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.65"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.67"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.67"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.68"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.68"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.69"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.69"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.70"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.70"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.71"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.71"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.72"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.72"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.73"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.73"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.74"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.74"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.76"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.76"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.77"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.77"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.78"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.78"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.79"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.79"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.80"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.80"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.81"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.81"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.82"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.82"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.83"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.83"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.84"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.84"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.85"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.85"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.86"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.86"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.87"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.87"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.88"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.88"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.89"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.89"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.90"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.90"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.91"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.91"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.92"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.92"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.2"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.2"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.3"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.3"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@links.4"
- referenceType="out_target"
- groupName="target"
- groupIcon="icons/linkTargetNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.4"
- child="/0/@diagram/@links.5"
- referenceType="in_source"
- groupName="incoming links"
- groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@links.5"
- child="/0/@diagram/@childNodes.69"
- referenceType="in_source"
- groupName="source"
- groupIcon="icons/linkSourceNavigatorGroup.gif"/>
- <childReferences
- parent="/0/@diagram/@childNodes.69"
- child="/0/@diagram/@links.5"
- referenceType="out_target"
- groupName="outgoing links"
- groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
- </navigator>
- <diagramUpdater/>
- <propertySheet>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="appearance"/>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="diagram"/>
- <tabs
- xsi:type="gmfgen:GenCustomPropertyTab"
- iD="domain"
- label="Core">
- <filter
- xsi:type="gmfgen:TypeTabFilter">
- <types>org.eclipse.gmf.runtime.notation.View</types>
- <types>org.eclipse.gef.EditPart</types>
- <generatedTypes>abstractNavigatorItem</generatedTypes>
- </filter>
- </tabs>
- </propertySheet>
- <domainGenModel
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
- <expressionProviders>
- <providers
- xsi:type="gmfgen:GenJavaExpressionProvider"
- injectExpressionBody="true">
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return true;"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if(source instanceof Action) {&#xD;&#xA;&#x9;// rule validateObjectFlow_validateNoActions&#xD;&#xA;&#x9;// rule workaround by addition of pins in case of Action&#xD;&#xA;&#x9;if(!ObjectFlowEditHelper.canStartNewObjectFlow((Action)source)) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof InputPin) {&#xD;&#xA;&#x9;// rule validateInputPin_validateOutgoingEdgesStructuredOnly&#xD;&#xA;&#x9;if(source.getOwner() instanceof StructuredActivityNode) {&#xD;&#xA;&#x9;&#x9;if(target != null &amp;&amp; !source.getOwner().equals(target.getInStructuredNode())) {&#xD;&#xA;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;} else {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof InitialNode) {&#xD;&#xA;&#x9;// rule validateInitialNode_validateControlEdges&#xD;&#xA;&#x9;return false;&#xD;&#xA;}&#xD;&#xA;if(source instanceof FinalNode) {&#xD;&#xA;&#x9;// rule validateFinalNode_validateNoOutgoingEdges&#xD;&#xA;&#x9;return false;&#xD;&#xA;}&#xD;&#xA;if(source instanceof JoinNode) {&#xD;&#xA;&#x9;// rule validateJoinNode_validateOneOutgoingEdge&#xD;&#xA;&#x9;if(!source.getOutgoings().isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/*&#xD;&#xA;&#x9; * rule validateJoinNode_validateIncomingObjectFlow :&#xD;&#xA;&#x9; * We do not prevent creation of an outgoing ObjectFlow even if there is no incoming ObjectFlow.&#xD;&#xA;&#x9; * We let the possibility that the user intends to add an incoming ObjectFlow later.&#xD;&#xA;&#x9; */&#xD;&#xA;}&#xD;&#xA;if(source instanceof ForkNode) {&#xD;&#xA;&#x9;// rule validateForkNode_validateEdges on source Fork node&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = source.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;ActivityEdge incomingControlFlow = source.getIncoming(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null || incomingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is a ControlFlow which means there must be no ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof MergeNode) {&#xD;&#xA;&#x9;//rule validateMergeNode_validateOneOutgoingEdge&#xD;&#xA;&#x9;if(!source.getOutgoings().isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateMergeNode_validateEdges on source Merge node&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = source.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;ActivityEdge incomingControlFlow = source.getIncoming(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null || incomingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is a ControlFlow which means there must be no ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof DecisionNode) {&#xD;&#xA;&#x9;// rule validateDecisionNode_validateEdges on source Decision node&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = source.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;ActivityEdge incomingControlFlow = source.getIncoming(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null || incomingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is a ControlFlow which means there must be no ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if (source instanceof ActivityParameterNode) {&#xD;&#xA;&#x9;// rule validateActivityParameterNode_validateIncomingOrOutgoing&#xD;&#xA;&#x9;EList&lt;ActivityEdge> incomings = source.getIncomings();&#xD;&#xA;&#x9;if (!incomings.isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if(target instanceof Action) {&#xD;&#xA;&#x9;// rule validateObjectFlow_validateNoActions&#xD;&#xA;&#x9;// rule workaround by addition of pins in case of Action&#xD;&#xA;&#x9;if(!ObjectFlowEditHelper.canEndNewObjectFlow((Action)target)) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof OutputPin) {&#xD;&#xA;&#x9;// rule validateOutputPin_validateIncomingEdgesStructuredOnly&#xD;&#xA;&#x9;if(target.getOwner() instanceof StructuredActivityNode) {&#xD;&#xA;&#x9;&#x9;if(source != null &amp;&amp; !target.getOwner().equals(source.getInStructuredNode())) {&#xD;&#xA;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;} else {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof InitialNode) {&#xD;&#xA;&#x9;// rule validateInitialNode_validateNoIncomingEdges&#xD;&#xA;&#x9;return false;&#xD;&#xA;}&#xD;&#xA;if(target instanceof JoinNode) {&#xD;&#xA;&#x9;// rule validateJoinNode_validateIncomingObjectFlow&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;// the outgoing edge is a ControlFlow which means there must be no incoming ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof ForkNode) {&#xD;&#xA;&#x9;// rule validateForkNode_validateOneIncomingEdge&#xD;&#xA;&#x9;if(!target.getIncomings().isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateForkNode_validateEdges on target Fork node&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;ActivityEdge incomingControlFlow = target.getIncoming(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null || incomingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is a ControlFlow which means there must be no ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof MergeNode) {&#xD;&#xA;&#x9;// rule validateMergeNode_validateEdges on target Merge node&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;ActivityEdge incomingControlFlow = target.getIncoming(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null || incomingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is a ControlFlow which means there must be no ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof DecisionNode) {&#xD;&#xA;&#x9;// rule validateDecisionNode_validateIncomingOutgoingEdges&#xD;&#xA;&#x9;if(target.getIncomings().size() >= 2) {&#xD;&#xA;&#x9;&#x9;// no more than two incoming edges&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateDecisionNode_validateEdges on target Decision node&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;ActivityEdge incomingControlFlow = target.getIncoming(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null || incomingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;/*&#xD;&#xA;&#x9;&#x9; * There is a ControlFlow which means there must be no&#xD;&#xA;&#x9;&#x9; * ObjectFlow but the decision flow itself.&#xD;&#xA;&#x9;&#x9; * We let the user insert up to one ObjectFlow for being&#xD;&#xA;&#x9;&#x9; * able to select the decision flow among existing&#xD;&#xA;&#x9;&#x9; * input flows.&#xD;&#xA;&#x9;&#x9; */&#xD;&#xA;&#x9;&#x9;if(target.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow()) != null) {&#xD;&#xA;&#x9;&#x9;&#x9;// there is already an object flow which is intended to become the decision flow&#xD;&#xA;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if (target instanceof ActivityParameterNode) {&#xD;&#xA;&#x9;// rule validateActivityParameterNode_validateIncomingOrOutgoing&#xD;&#xA;&#x9;EList&lt;ActivityEdge> outgoings = target.getOutgoings();&#xD;&#xA;&#x9;if (!outgoings.isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;"/>
- <expressions
- body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if(source instanceof ObjectNode) {&#xD;&#xA;&#x9;if(!((ObjectNode)source).isControlType()) {&#xD;&#xA;&#x9;&#x9;// rule validateControlFlow_validateObjectNodes&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof InputPin) {&#xD;&#xA;&#x9;// rule validateInputPin_validateOutgoingEdgesStructuredOnly&#xD;&#xA;&#x9;if(source.getOwner() instanceof StructuredActivityNode) {&#xD;&#xA;&#x9;&#x9;if(target != null &amp;&amp; !source.getOwner().equals(target.getInStructuredNode())) {&#xD;&#xA;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;} else {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof FinalNode) {&#xD;&#xA;&#x9;// rule validateFinalNode_validateNoOutgoingEdges&#xD;&#xA;&#x9;return false;&#xD;&#xA;}&#xD;&#xA;if(source instanceof JoinNode) {&#xD;&#xA;&#x9;// rule validateJoinNode_validateOneOutgoingEdge&#xD;&#xA;&#x9;if(!source.getOutgoings().isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateJoinNode_validateIncomingObjectFlow&#xD;&#xA;&#x9;ActivityEdge incomingObjectFlow = source.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;if(incomingObjectFlow != null) {&#xD;&#xA;&#x9;&#x9;// the outgoing edge must be an ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof ForkNode) {&#xD;&#xA;&#x9;// rule validateForkNode_validateEdges on source Fork node&#xD;&#xA;&#x9;ActivityEdge outgoingObjectFlow = source.getOutgoing(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;ActivityEdge incomingObjectFlow = source.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;if(outgoingObjectFlow != null || incomingObjectFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is an ObjectFlow which means there must be no ControlFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof MergeNode) {&#xD;&#xA;&#x9;//rule validateMergeNode_validateOneOutgoingEdge&#xD;&#xA;&#x9;if(!source.getOutgoings().isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateMergeNode_validateEdges on source Merge node&#xD;&#xA;&#x9;ActivityEdge outgoingObjectFlow = source.getOutgoing(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;ActivityEdge incomingObjectFlow = source.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;if(outgoingObjectFlow != null || incomingObjectFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is an ObjectFlow which means there must be no ControlFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof DecisionNode) {&#xD;&#xA;&#x9;// rule validateDecisionNode_validateEdges on source Decision node&#xD;&#xA;&#x9;ActivityEdge outgoingObjectFlow = source.getOutgoing(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;int incomingObjectFlowNumber = 0;&#xD;&#xA;&#x9;for(ActivityEdge incomingEdge : source.getIncomings()) {&#xD;&#xA;&#x9;&#x9;if(incomingEdge instanceof ObjectFlow) {&#xD;&#xA;&#x9;&#x9;&#x9;incomingObjectFlowNumber++;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;if(outgoingObjectFlow != null || incomingObjectFlowNumber > 1) {&#xD;&#xA;&#x9;&#x9;// there is an ObjectFlow (not intended for decisionInputFlow) which means there must be no ControlFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if(target instanceof ObjectNode) {&#xD;&#xA;&#x9;if(!((ObjectNode)target).isControlType()) {&#xD;&#xA;&#x9;&#x9;// rule validateControlFlow_validateObjectNodes&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof OutputPin) {&#xD;&#xA;&#x9;// rule validateOutputPin_validateIncomingEdgesStructuredOnly&#xD;&#xA;&#x9;if(target.getOwner() instanceof StructuredActivityNode) {&#xD;&#xA;&#x9;&#x9;if(source != null &amp;&amp; !target.getOwner().equals(source.getInStructuredNode())) {&#xD;&#xA;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;} else {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof InitialNode) {&#xD;&#xA;&#x9;// rule validateInitialNode_validateNoIncomingEdges&#xD;&#xA;&#x9;return false;&#xD;&#xA;}&#xD;&#xA;if(target instanceof ForkNode) {&#xD;&#xA;&#x9;// rule validateForkNode_validateOneIncomingEdge&#xD;&#xA;&#x9;if(!target.getIncomings().isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateForkNode_validateEdges on target Fork node&#xD;&#xA;&#x9;ActivityEdge outgoingObjectFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;ActivityEdge incomingObjectFlow = target.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;if(outgoingObjectFlow != null || incomingObjectFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is an ObjectFlow which means there must be no ControlFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof MergeNode) {&#xD;&#xA;&#x9;// rule validateMergeNode_validateEdges on target Merge node&#xD;&#xA;&#x9;ActivityEdge outgoingObjectFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;ActivityEdge incomingObjectFlow = target.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;if(outgoingObjectFlow != null || incomingObjectFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is an ObjectFlow which means there must be no ControlFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof DecisionNode) {&#xD;&#xA;&#x9;// rule validateDecisionNode_validateIncomingOutgoingEdges&#xD;&#xA;&#x9;if(target.getIncomings().size() >= 2) {&#xD;&#xA;&#x9;&#x9;// no more than two incoming edges&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateDecisionNode_validateEdges on target Decision node&#xD;&#xA;&#x9;ActivityEdge outgoingObjectFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;ActivityEdge incomingObjectFlow = null;&#xD;&#xA;&#x9;for(ActivityEdge incomingEdge : target.getIncomings()) {&#xD;&#xA;&#x9;&#x9;// filter the decision flow&#xD;&#xA;&#x9;&#x9;if(incomingEdge instanceof ObjectFlow &amp;&amp; incomingEdge != ((DecisionNode)target).getDecisionInputFlow()) {&#xD;&#xA;&#x9;&#x9;&#x9;incomingObjectFlow = incomingEdge;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;if(outgoingObjectFlow != null || incomingObjectFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is an ObjectFlow which means there must be no ControlFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateInputOutputParameter(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateCompatibleType(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateSourceAndTarget(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateCompatibleTypes(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateSameUpperBounds(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateTarget(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateTransformationBehaviour(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateInputAndOutputParameter(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateIncomingObjectOneInputParameter(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateIncomingControlOneInputParameter(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateTwoInputParameters(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateInterruptibleEdge(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateException_HandlerBody_Constraint4(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateException_StructuredActivityNode_Constraint2(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateException_SourceAndTargetEdge_Constraint1(context, ctx);"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="return UMLValidationHelper.validateException_StructuredActivityNode_Constraint3(context, ctx);"/>
- <expressions
- body="org.eclipse.uml2.uml.LiteralString literalString=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();&#xD;&#xA;literalString.setValue(&quot;&quot;);&#xD;&#xA;return literalString;"/>
- </providers>
- <providers
- xsi:type="gmfgen:GenExpressionInterpreter">
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(CallOperationAction)&#xD;&#xA;then self.owner.oclAsType(CallOperationAction).argument->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(CallOperationAction)&#xD;&#xA;then self.owner.oclAsType(CallOperationAction).argument->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(CallOperationAction)&#xD;&#xA;then self.owner.oclAsType(CallOperationAction).argument->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(CallOperationAction)&#xD;&#xA;then self.owner.oclAsType(CallOperationAction).target = self&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(CallOperationAction)&#xD;&#xA;then self.owner.oclAsType(CallOperationAction).target = self&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(CallOperationAction)&#xD;&#xA;then self.owner.oclAsType(CallOperationAction).target = self&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPrecondition->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPostcondition->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPrecondition->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPostcondition->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPrecondition->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPostcondition->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPrecondition->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPostcondition->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(SendObjectAction)&#xD;&#xA;then self.owner.oclAsType(SendObjectAction).request = self&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(SendObjectAction)&#xD;&#xA;then self.owner.oclAsType(SendObjectAction).request = self&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(SendObjectAction)&#xD;&#xA;then self.owner.oclAsType(SendObjectAction).request = self&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(SendObjectAction)&#xD;&#xA;then self.owner.oclAsType(SendObjectAction).target = self&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(SendObjectAction)&#xD;&#xA;then self.owner.oclAsType(SendObjectAction).target = self&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(SendObjectAction)&#xD;&#xA;then self.owner.oclAsType(SendObjectAction).target = self&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(SendSignalAction)&#xD;&#xA;then self.owner.oclAsType(SendSignalAction).argument->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(SendSignalAction)&#xD;&#xA;then self.owner.oclAsType(SendSignalAction).argument->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(SendSignalAction)&#xD;&#xA;then self.owner.oclAsType(SendSignalAction).argument->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(SendSignalAction)&#xD;&#xA;then self.owner.oclAsType(SendSignalAction).target = self&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(SendSignalAction)&#xD;&#xA;then self.owner.oclAsType(SendSignalAction).target = self&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(SendSignalAction)&#xD;&#xA;then self.owner.oclAsType(SendSignalAction).target = self&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(ExpansionRegion)&#xD;&#xA;then self.owner.oclAsType(ExpansionRegion).inputElement->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(ExpansionRegion)&#xD;&#xA;then self.owner.oclAsType(ExpansionRegion).outputElement->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- body="' '"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(AddStructuralFeatureValueAction)&#xD;&#xA;then self.owner.oclAsType(AddStructuralFeatureValueAction).object->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(AddStructuralFeatureValueAction)&#xD;&#xA;then self.owner.oclAsType(AddStructuralFeatureValueAction).value->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(DestroyObjectAction)&#xD;&#xA;then self.owner.oclAsType(DestroyObjectAction).target->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(ReadVariableAction)&#xD;&#xA;then self.owner.oclAsType(ReadVariableAction).result->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(AddVariableValueAction)&#xD;&#xA;then self.owner.oclAsType(AddVariableValueAction).insertAt->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(AddVariableValueAction)&#xD;&#xA;then self.owner.oclAsType(AddVariableValueAction).value->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(BroadcastSignalAction)&#xD;&#xA;then self.owner.oclAsType(BroadcastSignalAction).argument->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.incoming->isEmpty()"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="not self.source.oclIsKindOf(InitialNode)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.outgoing->isEmpty()"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="-- must be applied on corresponding parameter, if only it exists&#xD;&#xA;true&#xD;&#xA;--not self.isUnique"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="-- must be applied on corresponding parameter, if only it exists&#xD;&#xA;true&#xD;&#xA;--((not self.selection.oclIsUndefined()) implies self.isOrdered) and&#xD;&#xA;--(self.isOrdered implies (not self.selection.oclIsUndefined()))"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="true&#xD;&#xA;-- Already checked by validateControlFlow_validateObjectNodes"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.isControl implies self.isControlType"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.outgoing.target->forAll(inStructuredNode=self.owner)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(not self.fromAction.oclIsUndefined()) implies&#xD;&#xA;self.fromAction.output->size() = 1"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(not self.fromAction.oclIsUndefined()) implies&#xD;&#xA;self.fromAction.input->forAll(oclIsKindOf(ActionInputPin))"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(not self.fromAction.oclIsUndefined()) implies&#xD;&#xA;(self.fromAction.incoming->isEmpty() and self.fromAction.outgoing->isEmpty()&#xD;&#xA;and self.fromAction.input->forAll(incoming->isEmpty() and outgoing->isEmpty())&#xD;&#xA;and self.fromAction.output->forAll(incoming->isEmpty() and outgoing->isEmpty()))"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.incoming->isEmpty()"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.incoming.source->forAll(inStructuredNode=self.owner)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.owner.oclIsKindOf(Activity)&#xD;&#xA;or self.owner.oclIsKindOf(ActivityGroup)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="true&#xD;&#xA;-- constraint is checked by the model structure"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="-- This constraint is implemented separately for not being in live mode.&#xD;&#xA;-- Other constraints have been relaxed to supprot null source and target&#xD;&#xA;not self.source.oclIsUndefined() and not self.target.oclIsUndefined()"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(self.source.oclIsUndefined() or not self.source.oclIsKindOf(Action))&#xD;&#xA;and (self.target.oclIsUndefined() or not self.target.oclIsKindOf(Action))"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(not self.selection.oclIsUndefined()) implies self.source.oclIsKindOf(ObjectNode)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.isMulticast implies not self.isMultireceive"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(self.source.oclIsUndefined() or&#xD;&#xA;&#x9;(self.source.oclIsKindOf(ObjectNode) implies&#xD;&#xA;&#x9;self.source.oclAsType(ObjectNode).isControlType)&#xD;&#xA;) and&#xD;&#xA;(self.target.oclIsUndefined() or&#xD;&#xA;&#x9;(self.target.oclIsKindOf(ObjectNode) implies&#xD;&#xA;&#x9;self.target.oclAsType(ObjectNode).isControlType)&#xD;&#xA;)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.outgoing->size() > 0 and&#xD;&#xA;self.incoming->size() > 0 and&#xD;&#xA;self.incoming->size() &lt;= 2"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(self.incoming->reject(i | i = self.decisionInputFlow)->forAll(oclIsKindOf(ObjectFlow)) and&#xD;&#xA; self.outgoing->forAll(oclIsKindOf(ObjectFlow)) ) or&#xD;&#xA;(self.incoming->reject(i | i = self.decisionInputFlow)->forAll(oclIsKindOf(ControlFlow)) and&#xD;&#xA; self.outgoing->forAll(oclIsKindOf(ControlFlow)) )"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(not self.decisionInputFlow.oclIsUndefined()) implies&#xD;&#xA;self.incoming->includes(self.decisionInputFlow)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(not self.decisionInput.oclIsUndefined()) implies (&#xD;&#xA;self.decisionInput.ownedParameter->select(&#xD;&#xA; direction = ParameterDirectionKind::out or&#xD;&#xA; direction = ParameterDirectionKind::inout)->size() = 0&#xD;&#xA;and self.decisionInput.ownedParameter->select(&#xD;&#xA; direction = ParameterDirectionKind::return)->size() = 1&#xD;&#xA;)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(not self.decisionInput.oclIsUndefined()) implies (&#xD;&#xA; (self.decisionInputFlow.oclIsUndefined() and&#xD;&#xA; self.incoming->select(i | i.oclIsKindOf(ControlFlow))->size() = 1&#xD;&#xA; ) implies&#xD;&#xA; self.decisionInput.ownedParameter->select(&#xD;&#xA; direction = ParameterDirectionKind::_in)->size() = 0&#xD;&#xA;)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.outgoing->size() = 1"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(self.outgoing->exists(e | e.oclIsKindOf(ObjectFlow)) implies&#xD;&#xA; self.incoming->forAll(e | e.oclIsKindOf(ObjectFlow))) and&#xD;&#xA;(self.outgoing->exists(e | e.oclIsKindOf(ControlFlow)) implies&#xD;&#xA; self.incoming->forAll(e | e.oclIsKindOf(ControlFlow)))"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.incoming->size() = 1"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(self.incoming->exists(e | e.oclIsKindOf(ObjectFlow)) implies&#xD;&#xA; self.outgoing->forAll(e | e.oclIsKindOf(ObjectFlow))) and&#xD;&#xA;(self.incoming->exists(e | e.oclIsKindOf(ControlFlow)) implies&#xD;&#xA; self.outgoing->forAll(e | e.oclIsKindOf(ControlFlow)))"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.outgoing->size() = 1"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(self.incoming->select(e | e.oclIsKindOf(ObjectFlow))->notEmpty() implies&#xD;&#xA; self.outgoing->exists(e | e.oclIsKindOf(ObjectFlow))) and&#xD;&#xA;(self.incoming->select(e | e.oclIsKindOf(ObjectFlow))->isEmpty() implies&#xD;&#xA; self.outgoing->exists(e | e.oclIsKindOf(ControlFlow)))"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(self.incoming->notEmpty() implies self.outgoing->isEmpty()) and&#xD;&#xA;(self.outgoing->notEmpty() implies self.incoming->isEmpty())"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(not self.classifier.oclIsUndefined()) implies (self.classifier.isAbstract = false)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(not self.classifier.oclIsUndefined()) implies (not self.classifier.oclIsKindOf(uml::AssociationClass))"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.structuralFeature.featuringClassifier->size() = 1"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.value->notEmpty() implies self.value.type = self.structuralFeature.type"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="result->notEmpty() implies self.result.type = self.object.type"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.value -> notEmpty()"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.structuralFeature.featuringClassifier->size() = 1"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.target.type->size() = 0"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(not self.structuralFeature.oclIsUndefined()) implies (self.structuralFeature.isStatic = false)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.structuralFeature.featuringClassifier.oclAsType(Type)->includes(self.object.type) or&#xD;&#xA;self.structuralFeature.oclAsType(Property).opposite.type = self.object.type"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.object.lowerBound()=1 and self.object.upperBound()=1"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.structuralFeature.featuringClassifier->size() = 1"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.value -> notEmpty()"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.value -> notEmpty() implies self.value.type = self.variable.type"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.value.lowerBound()=1 and self.value.upperBound()=1"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.variable.isAccessibleBy(self)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.result.type =self.variable.type and self.result.isOrdered = self.variable.isOrdered"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(self.result.lowerBound() &lt;= self.variable.lowerBound()) and (self.result.upperBound() >= self.variable.lowerBound())"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="((not self.handlerBody.oclIsUndefined()) and (not self.exceptionInput.oclIsUndefined())) implies( let pins : Collection(Element) = self.handlerBody.allOwnedElements()->select(e : Element | e.oclIsKindOf(Pin)) in pins->forAll(e : Element | e.oclIsKindOf(Pin) implies e = self.exceptionInput))"/>
- </providers>
- </expressionProviders>
- <labelParsers
- extensibleViaService="true">
- <implementations
- xsi:type="gmfgen:PredefinedParser"
- uses="/0/@diagram/@childNodes.6/@labels.0/@modelFacet /0/@diagram/@childNodes.24/@labels.0/@modelFacet /0/@diagram/@childNodes.25/@labels.0/@modelFacet /0/@diagram/@childNodes.26/@labels.0/@modelFacet /0/@diagram/@childNodes.27/@labels.0/@modelFacet /0/@diagram/@childNodes.28/@labels.0/@modelFacet /0/@diagram/@childNodes.29/@labels.0/@modelFacet /0/@diagram/@childNodes.30/@labels.0/@modelFacet /0/@diagram/@childNodes.31/@labels.0/@modelFacet /0/@diagram/@childNodes.37/@labels.0/@modelFacet /0/@diagram/@childNodes.44/@labels.0/@modelFacet /0/@diagram/@childNodes.54/@labels.0/@modelFacet /0/@diagram/@childNodes.67/@labels.0/@modelFacet /0/@diagram/@childNodes.70/@labels.0/@modelFacet /0/@diagram/@childNodes.73/@labels.0/@modelFacet /0/@diagram/@childNodes.76/@labels.0/@modelFacet /0/@diagram/@childNodes.79/@labels.0/@modelFacet /0/@diagram/@childNodes.83/@labels.0/@modelFacet /0/@diagram/@childNodes.85/@labels.0/@modelFacet /0/@diagram/@childNodes.87/@labels.0/@modelFacet /0/@diagram/@childNodes.90/@labels.0/@modelFacet /0/@diagram/@childNodes.72/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@links.2/@labels.0/@modelFacet /0/@diagram/@links.3/@labels.0/@modelFacet /0/@diagram/@childNodes.93/@labels.0/@modelFacet"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.89/@labels.1/@modelFacet /0/@diagram/@childNodes.49/@labels.2/@modelFacet /0/@diagram/@childNodes.82/@labels.1/@modelFacet /0/@diagram/@childNodes.53/@labels.1/@modelFacet /0/@diagram/@childNodes.81/@labels.1/@modelFacet /0/@diagram/@childNodes.12/@labels.2/@modelFacet /0/@diagram/@childNodes.22/@labels.2/@modelFacet /0/@diagram/@childNodes.45/@labels.2/@modelFacet /0/@diagram/@childNodes.47/@labels.1/@modelFacet /0/@diagram/@childNodes.23/@labels.1/@modelFacet /0/@diagram/@links.2/@labels.6/@modelFacet /0/@diagram/@childNodes.19/@labels.1/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.15/@labels.1/@modelFacet /0/@diagram/@childNodes.43/@labels.1/@modelFacet /0/@diagram/@childNodes.80/@labels.1/@modelFacet /0/@diagram/@childNodes.91/@labels.2/@modelFacet /0/@diagram/@childNodes.84/@labels.1/@modelFacet /0/@diagram/@childNodes.13/@labels.2/@modelFacet /0/@diagram/@childNodes.35/@labels.1/@modelFacet /0/@diagram/@childNodes.9/@labels.1/@modelFacet /0/@diagram/@childNodes.33/@labels.0/@modelFacet /0/@diagram/@childNodes.88/@labels.1/@modelFacet /0/@diagram/@childNodes.20/@labels.1/@modelFacet /0/@diagram/@childNodes.52/@labels.2/@modelFacet /0/@diagram/@childNodes.41/@labels.2/@modelFacet /0/@diagram/@childNodes.32/@labels.1/@modelFacet /0/@diagram/@childNodes.77/@labels.1/@modelFacet /0/@diagram/@childNodes.8/@labels.2/@modelFacet /0/@diagram/@childNodes.34/@labels.0/@modelFacet /0/@diagram/@links.3/@labels.3/@modelFacet /0/@diagram/@childNodes.74/@labels.1/@modelFacet /0/@diagram/@childNodes.86/@labels.1/@modelFacet /0/@diagram/@childNodes.17/@labels.2/@modelFacet /0/@diagram/@childNodes.50/@labels.1/@modelFacet /0/@diagram/@childNodes.78/@labels.1/@modelFacet /0/@diagram/@childNodes.10/@labels.1/@modelFacet /0/@diagram/@childNodes.21/@labels.2/@modelFacet /0/@diagram/@childNodes.14/@labels.1/@modelFacet /0/@diagram/@childNodes.55/@labels.1/@modelFacet /0/@diagram/@childNodes.71/@labels.1/@modelFacet /0/@diagram/@childNodes.39/@labels.2/@modelFacet /0/@diagram/@childNodes.18/@labels.2/@modelFacet /0/@diagram/@childNodes.42/@labels.2/@modelFacet /0/@diagram/@childNodes.3/@labels.0/@modelFacet /0/@diagram/@childNodes.46/@labels.2/@modelFacet /0/@diagram/@childNodes.48/@labels.2/@modelFacet /0/@diagram/@childNodes.7/@labels.2/@modelFacet /0/@diagram/@childNodes.38/@labels.2/@modelFacet /0/@diagram/@childNodes.5/@labels.0/@modelFacet /0/@diagram/@childNodes.40/@labels.1/@modelFacet /0/@diagram/@childNodes.66/@labels.1/@modelFacet /0/@diagram/@childNodes.63/@labels.1/@modelFacet /0/@diagram/@childNodes.62/@labels.1/@modelFacet /0/@diagram/@childNodes.61/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.72/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.1/@modelFacet /0/@diagram/@childNodes.75/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivitySingleExecutionParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.0/@labelModelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ParameterParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.16/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.CallOperationActionParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.11/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.CallBehaviorActionParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.15/@labels.0/@modelFacet /0/@diagram/@childNodes.71/@labels.0/@modelFacet /0/@diagram/@childNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.42/@labels.0/@modelFacet /0/@diagram/@childNodes.14/@labels.0/@modelFacet /0/@diagram/@childNodes.21/@labels.0/@modelFacet /0/@diagram/@childNodes.88/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.47/@labels.0/@modelFacet /0/@diagram/@childNodes.50/@labels.0/@modelFacet /0/@diagram/@childNodes.86/@labels.0/@modelFacet /0/@diagram/@childNodes.78/@labels.0/@modelFacet /0/@diagram/@childNodes.89/@labels.0/@modelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet /0/@diagram/@childNodes.38/@labels.0/@modelFacet /0/@diagram/@childNodes.22/@labels.0/@modelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.17/@labels.0/@modelFacet /0/@diagram/@childNodes.81/@labels.0/@modelFacet /0/@diagram/@childNodes.39/@labels.0/@modelFacet /0/@diagram/@childNodes.48/@labels.0/@modelFacet /0/@diagram/@childNodes.91/@labels.0/@modelFacet /0/@diagram/@childNodes.49/@labels.0/@modelFacet /0/@diagram/@childNodes.45/@labels.0/@modelFacet /0/@diagram/@childNodes.77/@labels.0/@modelFacet /0/@diagram/@childNodes.82/@labels.0/@modelFacet /0/@diagram/@childNodes.80/@labels.0/@modelFacet /0/@diagram/@childNodes.20/@labels.0/@modelFacet /0/@diagram/@childNodes.40/@labels.0/@modelFacet /0/@diagram/@childNodes.23/@labels.0/@modelFacet /0/@diagram/@childNodes.74/@labels.0/@modelFacet /0/@diagram/@childNodes.53/@labels.0/@modelFacet /0/@diagram/@childNodes.13/@labels.0/@modelFacet /0/@diagram/@childNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.19/@labels.0/@modelFacet /0/@diagram/@childNodes.41/@labels.0/@modelFacet /0/@diagram/@childNodes.84/@labels.0/@modelFacet /0/@diagram/@childNodes.18/@labels.0/@modelFacet /0/@diagram/@childNodes.43/@labels.0/@modelFacet /0/@diagram/@childNodes.55/@labels.0/@modelFacet /0/@diagram/@childNodes.46/@labels.0/@modelFacet /0/@diagram/@childNodes.66/@labels.0/@modelFacet /0/@diagram/@childNodes.63/@labels.0/@modelFacet /0/@diagram/@childNodes.62/@labels.0/@modelFacet /0/@diagram/@childNodes.61/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.PinParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.8/@labels.1/@modelFacet /0/@diagram/@childNodes.21/@labels.1/@modelFacet /0/@diagram/@childNodes.42/@labels.1/@modelFacet /0/@diagram/@childNodes.38/@labels.1/@modelFacet /0/@diagram/@childNodes.39/@labels.1/@modelFacet /0/@diagram/@childNodes.22/@labels.1/@modelFacet /0/@diagram/@childNodes.13/@labels.1/@modelFacet /0/@diagram/@childNodes.17/@labels.1/@modelFacet /0/@diagram/@childNodes.12/@labels.1/@modelFacet /0/@diagram/@childNodes.49/@labels.1/@modelFacet /0/@diagram/@childNodes.91/@labels.1/@modelFacet /0/@diagram/@childNodes.46/@labels.1/@modelFacet /0/@diagram/@childNodes.41/@labels.1/@modelFacet /0/@diagram/@childNodes.18/@labels.1/@modelFacet /0/@diagram/@childNodes.7/@labels.1/@modelFacet /0/@diagram/@childNodes.48/@labels.1/@modelFacet /0/@diagram/@childNodes.45/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.PinValueParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.3/@labels.1/@modelFacet /0/@diagram/@links.2/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivityEdgeWeightParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.35/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.JoinSpecParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.32/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.InputDecisionParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.2/@labels.3/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectFlowTransformationParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.2/@labels.2/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectFlowSelectionParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.2/@labels.4/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.DecisionInputFlowParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.3/@labels.2/@modelFacet /0/@diagram/@links.2/@labels.5/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.EdgeGuardParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.51/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivityParameterNodeParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.52/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.AcceptEventActionParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.52/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.AcceptTimeEventActionParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.65/@labels.0/@modelFacet /0/@diagram/@childNodes.60/@labels.0/@modelFacet /0/@diagram/@childNodes.56/@labels.0/@modelFacet /0/@diagram/@childNodes.64/@labels.0/@modelFacet /0/@diagram/@childNodes.57/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.StructuredActivityNodeKeywordParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.4/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ExceptionHandlerTypeParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.36/@labels.0/@modelFacet /0/@diagram/@childNodes.92/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectNodeParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.36/@labels.1/@modelFacet /0/@diagram/@childNodes.92/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectNodeSelectionParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.26/@labels.1/@modelFacet /0/@diagram/@childNodes.25/@labels.1/@modelFacet /0/@diagram/@childNodes.28/@labels.1/@modelFacet /0/@diagram/@childNodes.24/@labels.1/@modelFacet /0/@diagram/@childNodes.31/@labels.1/@modelFacet /0/@diagram/@childNodes.30/@labels.1/@modelFacet /0/@diagram/@childNodes.27/@labels.1/@modelFacet /0/@diagram/@childNodes.29/@labels.1/@modelFacet /0/@diagram/@childNodes.93/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.69/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.2/@labelModelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.PostConditionConstraintLabelParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.1/@labelModelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.PreConditionConstraintLabelParser"/>
- </labelParsers>
- <contextMenus
- iD="org.eclipse.papyrus.uml.diagram.activity.part.LoadResourceAction"
- context="/0/@diagram">
- <items
- xsi:type="gmfgen:LoadResourceAction"/>
- </contextMenus>
- </gmfgen:GenEditorGenerator>
- <papyrusgmfgenextension:PapyrusExtensionRootNode
- comment="Papyrus Extensions">
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="This extension enables to draw a rake on a CallBehaviorActionEditPart linked to an activity"
- genView="/0/@diagram/@childNodes.11"
- name="CallBehaviorAction"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart">
- <propRefreshHook
- comment="Add/Remove the RakeFigure when an Activity is selected as behavior or deselected"
- classpath=""
- triggeringCondition="resolveSemanticElement() instanceof CallBehaviorAction &amp;&amp; resolveSemanticElement().equals(event.getNotifier()) &amp;&amp; event.getFeature().equals(UMLPackage.eINSTANCE.getCallBehaviorAction_Behavior())"
- action="CallBehaviorAction action = (CallBehaviorAction) resolveSemanticElement(); if (action.getBehavior() instanceof Activity) { getPrimaryShape().displayRake(true); } else { &#x9;getPrimaryShape().displayRake(false); }"/>
- </extensionNodes>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocator"
- comment="Affixed Pin locator for Actions"
- classpath="org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator"
- genChildSideAffixedNode="/0/@diagram/@childNodes.38 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.20 /0/@diagram/@childNodes.21 /0/@diagram/@childNodes.22 /0/@diagram/@childNodes.23 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.50 /0/@diagram/@childNodes.53 /0/@diagram/@childNodes.55 /0/@diagram/@childNodes.71 /0/@diagram/@childNodes.74 /0/@diagram/@childNodes.77 /0/@diagram/@childNodes.78 /0/@diagram/@childNodes.80 /0/@diagram/@childNodes.81 /0/@diagram/@childNodes.82 /0/@diagram/@childNodes.84 /0/@diagram/@childNodes.86 /0/@diagram/@childNodes.88 /0/@diagram/@childNodes.89 /0/@diagram/@childNodes.91 /0/@diagram/@childNodes.66"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocator"
- comment="Affixed Activity Parameter Node locator for Activity"
- classpath="org.eclipse.papyrus.uml.diagram.activity.locator.ParameterNodeLocator"
- genChildSideAffixedNode="/0/@diagram/@childNodes.51"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocator"
- comment="Affixed Expansion Node locator for Activity"
- classpath="org.eclipse.papyrus.uml.diagram.activity.locator.ExpansionNodePositionLocator"
- genChildSideAffixedNode="/0/@diagram/@childNodes.58 /0/@diagram/@childNodes.59"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Node with label for named element"
- genView="/0/@diagram/@childNodes.36 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.72 /0/@diagram/@topLevelNodes.0"
- name="NamedElementEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Node with no name"
- genView="/0/@diagram/@childNodes.68"
- name="NodeEditPart"
- superOwnedEditPart="org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="link that to intherits from UML specificities"
- genView="/0/@diagram/@links.3 /0/@diagram/@links.2"
- name="UML link inheritance"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="It specify the super class for the shape editpart"
- genView="/0/@diagram/@childNodes.75"
- name="AbstractShapeEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShapeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="this is an extension for constraint "
- genView="/0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.93"
- name="ConstraintEditPart extension"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="this is an extension to manage the comment"
- genView="/0/@diagram/@childNodes.69"
- name="comment extended node"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="elements that intherit form UMLNodeEditpart"
- genView="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57"
- name="UMLNodeEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="add inheritance to BorderNamedElementEditPart"
- genView="/0/@diagram/@childNodes.51"
- name="BorderNamedElementEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.BorderNamedElementEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="HiddenName"
- role="Name"
- iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png"
- linkLabels="/0/@diagram/@links.2/@labels.0 /0/@diagram/@links.3/@labels.0"
- visibleByDefault="false"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Name"
- role="Name"
- iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png"
- externalNodeLabels="/0/@diagram/@childNodes.75/@labels.0"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="HiddenWeight"
- role="Weight"
- linkLabels="/0/@diagram/@links.2/@labels.1 /0/@diagram/@links.3/@labels.1"
- visibleByDefault="false"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Guard"
- role="Guard"
- linkLabels="/0/@diagram/@links.3/@labels.2"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="HiddenGuard"
- role="Guard"
- linkLabels="/0/@diagram/@links.2/@labels.5"
- visibleByDefault="false"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Stereotype"
- role="Stereotype"
- iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/stereotype.gif"
- linkLabels="/0/@diagram/@links.2/@labels.6 /0/@diagram/@links.3/@labels.3"
- externalNodeLabels="/0/@diagram/@childNodes.3/@labels.0 /0/@diagram/@childNodes.4/@labels.0 /0/@diagram/@childNodes.5/@labels.0 /0/@diagram/@childNodes.7/@labels.2 /0/@diagram/@childNodes.8/@labels.2 /0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@childNodes.10/@labels.1 /0/@diagram/@childNodes.12/@labels.2 /0/@diagram/@childNodes.13/@labels.2 /0/@diagram/@childNodes.14/@labels.1 /0/@diagram/@childNodes.15/@labels.1 /0/@diagram/@childNodes.17/@labels.2 /0/@diagram/@childNodes.18/@labels.2 /0/@diagram/@childNodes.19/@labels.1 /0/@diagram/@childNodes.20/@labels.1 /0/@diagram/@childNodes.21/@labels.2 /0/@diagram/@childNodes.22/@labels.2 /0/@diagram/@childNodes.23/@labels.1 /0/@diagram/@childNodes.32/@labels.1 /0/@diagram/@childNodes.33/@labels.0 /0/@diagram/@childNodes.34/@labels.0 /0/@diagram/@childNodes.35/@labels.1 /0/@diagram/@childNodes.38/@labels.2 /0/@diagram/@childNodes.39/@labels.2 /0/@diagram/@childNodes.40/@labels.1 /0/@diagram/@childNodes.41/@labels.2 /0/@diagram/@childNodes.42/@labels.2 /0/@diagram/@childNodes.43/@labels.1 /0/@diagram/@childNodes.45/@labels.2 /0/@diagram/@childNodes.46/@labels.2 /0/@diagram/@childNodes.47/@labels.1 /0/@diagram/@childNodes.48/@labels.2 /0/@diagram/@childNodes.49/@labels.2 /0/@diagram/@childNodes.50/@labels.1 /0/@diagram/@childNodes.52/@labels.2 /0/@diagram/@childNodes.53/@labels.1 /0/@diagram/@childNodes.55/@labels.1 /0/@diagram/@childNodes.71/@labels.1 /0/@diagram/@childNodes.74/@labels.1 /0/@diagram/@childNodes.77/@labels.1 /0/@diagram/@childNodes.80/@labels.1 /0/@diagram/@childNodes.81/@labels.1 /0/@diagram/@childNodes.82/@labels.1 /0/@diagram/@childNodes.84/@labels.1 /0/@diagram/@childNodes.86/@labels.1 /0/@diagram/@childNodes.88/@labels.1 /0/@diagram/@childNodes.89/@labels.1 /0/@diagram/@childNodes.91/@labels.2"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Selection"
- role="Selection"
- linkLabels="/0/@diagram/@links.2/@labels.2"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Transformation"
- role="Transformation"
- linkLabels="/0/@diagram/@links.2/@labels.3"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="DecisionInputFlow"
- role="DecisionInputFlow"
- iconPathRole=""
- linkLabels="/0/@diagram/@links.2/@labels.4"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:EditPartUsingDeleteService"
- comment=""
- name="Delete service elements"
- genView="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.20 /0/@diagram/@childNodes.21 /0/@diagram/@childNodes.22 /0/@diagram/@childNodes.23 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.50 /0/@diagram/@childNodes.53 /0/@diagram/@childNodes.55 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.77 /0/@diagram/@childNodes.78 /0/@diagram/@childNodes.80 /0/@diagram/@childNodes.81 /0/@diagram/@childNodes.82 /0/@diagram/@childNodes.84 /0/@diagram/@childNodes.86 /0/@diagram/@childNodes.88 /0/@diagram/@childNodes.89 /0/@diagram/@childNodes.91 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.72 /0/@diagram/@childNodes.68 /0/@diagram/@childNodes.67 /0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.51 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.93 /0/@diagram/@links.3 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.66 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.71 /0/@diagram/@childNodes.75 /0/@diagram/@links.4 /0/@diagram/@links.2 /0/@diagram/@childNodes.74 /0/@diagram/@childNodes.61 /0/@diagram/@childNodes.63/@labels.0 /0/@diagram/@childNodes.62 /0/@diagram/@childNodes.63 /0/@diagram/@childNodes.58 /0/@diagram/@childNodes.59"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="elements that intherit form UMLNodeEditpart"
- genView="/0/@diagram/@childNodes.67"
- name="UMLNodeEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="set the super class as AbstractLabelEditPart"
- genView="/0/@diagram/@childNodes.3/@labels.0 /0/@diagram/@childNodes.4/@labels.0 /0/@diagram/@childNodes.5/@labels.0 /0/@diagram/@childNodes.7/@labels.2 /0/@diagram/@childNodes.8/@labels.2 /0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@childNodes.10/@labels.1 /0/@diagram/@childNodes.12/@labels.2 /0/@diagram/@childNodes.13/@labels.2 /0/@diagram/@childNodes.14/@labels.1 /0/@diagram/@childNodes.15/@labels.1 /0/@diagram/@childNodes.17/@labels.2 /0/@diagram/@childNodes.18/@labels.2 /0/@diagram/@childNodes.19/@labels.1 /0/@diagram/@childNodes.20/@labels.1 /0/@diagram/@childNodes.21/@labels.2 /0/@diagram/@childNodes.22/@labels.2 /0/@diagram/@childNodes.23/@labels.1 /0/@diagram/@childNodes.32/@labels.1 /0/@diagram/@childNodes.33/@labels.0 /0/@diagram/@childNodes.34/@labels.0 /0/@diagram/@childNodes.35/@labels.1 /0/@diagram/@childNodes.38/@labels.2 /0/@diagram/@childNodes.39/@labels.2 /0/@diagram/@childNodes.40/@labels.1 /0/@diagram/@childNodes.41/@labels.2 /0/@diagram/@childNodes.42/@labels.2 /0/@diagram/@childNodes.43/@labels.1 /0/@diagram/@childNodes.45/@labels.2 /0/@diagram/@childNodes.46/@labels.2 /0/@diagram/@childNodes.47/@labels.1 /0/@diagram/@childNodes.48/@labels.2 /0/@diagram/@childNodes.49/@labels.2 /0/@diagram/@childNodes.50/@labels.1 /0/@diagram/@childNodes.52/@labels.2 /0/@diagram/@childNodes.53/@labels.1 /0/@diagram/@childNodes.55/@labels.1 /0/@diagram/@childNodes.71/@labels.1 /0/@diagram/@childNodes.74/@labels.1 /0/@diagram/@childNodes.77/@labels.1 /0/@diagram/@childNodes.80/@labels.1 /0/@diagram/@childNodes.81/@labels.1 /0/@diagram/@childNodes.82/@labels.1 /0/@diagram/@childNodes.84/@labels.1 /0/@diagram/@childNodes.86/@labels.1 /0/@diagram/@childNodes.88/@labels.1 /0/@diagram/@childNodes.89/@labels.1 /0/@diagram/@childNodes.91/@labels.2 /0/@diagram/@childNodes.61/@labels.1 /0/@diagram/@childNodes.62/@labels.1 /0/@diagram/@childNodes.63/@labels.1 /0/@diagram/@childNodes.66/@labels.1"
- name="AbstractLabelEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="contains methods to display arrows"
- genView="/0/@diagram/@childNodes.13 /0/@diagram/@childNodes.22 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.80 /0/@diagram/@childNodes.81 /0/@diagram/@childNodes.88 /0/@diagram/@childNodes.89 /0/@diagram/@childNodes.91 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.23 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.84 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.77 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.50 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.53 /0/@diagram/@childNodes.82 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.20 /0/@diagram/@childNodes.74 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.78 /0/@diagram/@childNodes.86 /0/@diagram/@childNodes.55 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.21 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.71"
- name="AbstractPinEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.activity.edit.part.AbstractPinEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
- comment="locator for external label of pins"
- classpath="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator"
- genExternalNodeLabel="/0/@diagram/@childNodes.75/@labels.0 /0/@diagram/@childNodes.3/@labels.0 /0/@diagram/@childNodes.4/@labels.0 /0/@diagram/@childNodes.5/@labels.0 /0/@diagram/@childNodes.7/@labels.2 /0/@diagram/@childNodes.8/@labels.2 /0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@childNodes.10/@labels.1 /0/@diagram/@childNodes.12/@labels.2 /0/@diagram/@childNodes.13/@labels.2 /0/@diagram/@childNodes.14/@labels.1 /0/@diagram/@childNodes.15/@labels.1 /0/@diagram/@childNodes.17/@labels.2 /0/@diagram/@childNodes.18/@labels.2 /0/@diagram/@childNodes.19/@labels.1 /0/@diagram/@childNodes.20/@labels.1 /0/@diagram/@childNodes.21/@labels.2 /0/@diagram/@childNodes.22/@labels.2 /0/@diagram/@childNodes.23/@labels.1 /0/@diagram/@childNodes.32/@labels.1 /0/@diagram/@childNodes.33/@labels.0 /0/@diagram/@childNodes.34/@labels.0 /0/@diagram/@childNodes.35/@labels.1 /0/@diagram/@childNodes.38/@labels.2 /0/@diagram/@childNodes.39/@labels.2 /0/@diagram/@childNodes.40/@labels.1 /0/@diagram/@childNodes.41/@labels.2 /0/@diagram/@childNodes.42/@labels.2 /0/@diagram/@childNodes.43/@labels.1 /0/@diagram/@childNodes.45/@labels.2 /0/@diagram/@childNodes.46/@labels.2 /0/@diagram/@childNodes.47/@labels.1 /0/@diagram/@childNodes.48/@labels.2 /0/@diagram/@childNodes.49/@labels.2 /0/@diagram/@childNodes.50/@labels.1 /0/@diagram/@childNodes.52/@labels.2 /0/@diagram/@childNodes.53/@labels.1 /0/@diagram/@childNodes.55/@labels.1 /0/@diagram/@childNodes.71/@labels.1 /0/@diagram/@childNodes.74/@labels.1 /0/@diagram/@childNodes.77/@labels.1 /0/@diagram/@childNodes.80/@labels.1 /0/@diagram/@childNodes.81/@labels.1 /0/@diagram/@childNodes.82/@labels.1 /0/@diagram/@childNodes.84/@labels.1 /0/@diagram/@childNodes.86/@labels.1 /0/@diagram/@childNodes.88/@labels.1 /0/@diagram/@childNodes.89/@labels.1 /0/@diagram/@childNodes.91/@labels.2 /0/@diagram/@childNodes.63/@labels.0 /0/@diagram/@childNodes.61/@labels.1 /0/@diagram/@childNodes.62/@labels.1 /0/@diagram/@childNodes.63/@labels.1 /0/@diagram/@childNodes.66/@labels.1 /0/@diagram/@childNodes.53/@labels.0 /0/@diagram/@childNodes.7/@labels.0 /0/@diagram/@childNodes.7/@labels.1 /0/@diagram/@childNodes.8/@labels.0 /0/@diagram/@childNodes.8/@labels.1 /0/@diagram/@childNodes.9/@labels.0 /0/@diagram/@childNodes.10/@labels.0 /0/@diagram/@childNodes.12/@labels.0 /0/@diagram/@childNodes.12/@labels.1 /0/@diagram/@childNodes.13/@labels.0 /0/@diagram/@childNodes.13/@labels.1 /0/@diagram/@childNodes.14/@labels.0 /0/@diagram/@childNodes.15/@labels.0 /0/@diagram/@childNodes.17/@labels.0 /0/@diagram/@childNodes.17/@labels.1 /0/@diagram/@childNodes.18/@labels.0 /0/@diagram/@childNodes.18/@labels.1 /0/@diagram/@childNodes.19/@labels.0 /0/@diagram/@childNodes.20/@labels.0 /0/@diagram/@childNodes.21/@labels.0 /0/@diagram/@childNodes.21/@labels.1 /0/@diagram/@childNodes.22/@labels.0 /0/@diagram/@childNodes.22/@labels.1 /0/@diagram/@childNodes.23/@labels.0 /0/@diagram/@childNodes.32/@labels.0 /0/@diagram/@childNodes.35/@labels.0 /0/@diagram/@childNodes.36/@labels.1 /0/@diagram/@childNodes.38/@labels.0 /0/@diagram/@childNodes.38/@labels.1 /0/@diagram/@childNodes.39/@labels.0 /0/@diagram/@childNodes.39/@labels.1 /0/@diagram/@childNodes.40/@labels.0 /0/@diagram/@childNodes.41/@labels.0 /0/@diagram/@childNodes.41/@labels.1 /0/@diagram/@childNodes.42/@labels.0 /0/@diagram/@childNodes.42/@labels.1 /0/@diagram/@childNodes.43/@labels.0 /0/@diagram/@childNodes.45/@labels.0 /0/@diagram/@childNodes.45/@labels.1 /0/@diagram/@childNodes.46/@labels.0 /0/@diagram/@childNodes.46/@labels.1 /0/@diagram/@childNodes.47/@labels.0 /0/@diagram/@childNodes.48/@labels.0 /0/@diagram/@childNodes.48/@labels.1 /0/@diagram/@childNodes.49/@labels.0 /0/@diagram/@childNodes.49/@labels.1 /0/@diagram/@childNodes.50/@labels.0 /0/@diagram/@childNodes.52/@labels.1 /0/@diagram/@childNodes.55/@labels.0 /0/@diagram/@childNodes.61/@labels.0 /0/@diagram/@childNodes.62/@labels.0 /0/@diagram/@childNodes.66/@labels.0 /0/@diagram/@childNodes.71/@labels.0 /0/@diagram/@childNodes.74/@labels.0 /0/@diagram/@childNodes.77/@labels.0 /0/@diagram/@childNodes.78/@labels.0 /0/@diagram/@childNodes.78/@labels.1 /0/@diagram/@childNodes.80/@labels.0 /0/@diagram/@childNodes.81/@labels.0 /0/@diagram/@childNodes.82/@labels.0 /0/@diagram/@childNodes.84/@labels.0 /0/@diagram/@childNodes.86/@labels.0 /0/@diagram/@childNodes.88/@labels.0 /0/@diagram/@childNodes.89/@labels.0 /0/@diagram/@childNodes.91/@labels.0 /0/@diagram/@childNodes.91/@labels.1 /0/@diagram/@childNodes.92/@labels.1"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:GenerateUsingElementTypeCreationCommand"/>
- </papyrusgmfgenextension:PapyrusExtensionRootNode>
-</xmi:XMI>
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
+ xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
+ <gmfgen:GenEditorGenerator
+ packageNamePrefix="org.eclipse.papyrus.uml.diagram.activity"
+ modelID="PapyrusUMLActivityDiagram"
+ diagramFileExtension="PapyrusUMLActivity_diagram"
+ domainFileExtension="PapyrusUMLActivity"
+ dynamicTemplates="true"
+ templateDirectory="/org.eclipse.papyrus.def/xtend/">
+ <audits>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validate"
+ name="validateUMLModel"
+ description="Validate the UML model"
+ path="/0/@audits/@categories.0"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateInitialNode"
+ name="validateInitialNode"
+ description="Validate an initial node"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.1"
+ audits="/0/@audits/@rules.0 /0/@audits/@rules.1"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateFinalNode"
+ name="validateFinalNode"
+ description="Validate a final node"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.2"
+ audits="/0/@audits/@rules.2"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateCallBehaviorAction"
+ name="validateCallBehaviorAction"
+ description="Validate a call behavior action"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.3"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateCallOperationAction"
+ name="validateCallOperationAction"
+ description="Validate a call operation action"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.4"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateCallAction"
+ name="validateCallAction"
+ description="Validate a call action"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.5"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateInvocationAction"
+ name="validateInvocationAction"
+ description="Validate an invocation action"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.6"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityNode"
+ name="validateActivityNode"
+ description="Validate an activity node"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.7"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateRedefinableElement"
+ name="validateRedefinableElement"
+ description="Validate a redefineable element"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.8"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateNamedElement"
+ name="validateNamedElement"
+ description="Validate a named element"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.9"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateElement"
+ name="validateElement"
+ description="Validate an element"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.10"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectNode"
+ name="validateObjectNode"
+ description="Validate an object node"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.11"
+ audits="/0/@audits/@rules.3 /0/@audits/@rules.4 /0/@audits/@rules.5 /0/@audits/@rules.6"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateMultiplicityElement"
+ name="validateMultiplicityElement"
+ description="Validate a multilicity element"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.12"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validatePin"
+ name="validatePin"
+ description="Validate a pin"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.13"
+ audits="/0/@audits/@rules.7"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateInputPin"
+ name="validateInputPin"
+ description="Validate an input pin"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.14"
+ audits="/0/@audits/@rules.8"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateActionInputPin"
+ name="validateActionInputPin"
+ description="Validate an action input pin"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.15"
+ audits="/0/@audits/@rules.9 /0/@audits/@rules.10 /0/@audits/@rules.11"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateValuePin"
+ name="validateValuePin"
+ description="Validate a value pin"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.16"
+ audits="/0/@audits/@rules.12 /0/@audits/@rules.13"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateOutputPin"
+ name="validateOutputPin"
+ description="Validate an output pin"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.17"
+ audits="/0/@audits/@rules.14"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityEdge"
+ name="validateActivityEdge"
+ description="Validate an activity edge"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.18"
+ audits="/0/@audits/@rules.15 /0/@audits/@rules.16 /0/@audits/@rules.17 /0/@audits/@rules.18 /0/@audits/@rules.65"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow"
+ name="validateObjectFlow"
+ description="Validate an object flow"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.19"
+ audits="/0/@audits/@rules.19 /0/@audits/@rules.20 /0/@audits/@rules.21 /0/@audits/@rules.22 /0/@audits/@rules.23 /0/@audits/@rules.24 /0/@audits/@rules.25 /0/@audits/@rules.26"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateControlFlow"
+ name="validateControlFlow"
+ description="Validate a control flow"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.20"
+ audits="/0/@audits/@rules.27"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode"
+ name="validateDecisionNode"
+ description="Validate a decision node"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.21"
+ audits="/0/@audits/@rules.28 /0/@audits/@rules.29 /0/@audits/@rules.30 /0/@audits/@rules.31 /0/@audits/@rules.32 /0/@audits/@rules.33 /0/@audits/@rules.34 /0/@audits/@rules.35"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateMergeNode"
+ name="validateMergeNode"
+ description="Validate a merge node"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.22"
+ audits="/0/@audits/@rules.36 /0/@audits/@rules.37"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateForkNode"
+ name="validateForkNode"
+ description="Validate a fork node"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.23"
+ audits="/0/@audits/@rules.38 /0/@audits/@rules.39"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateJoinNode"
+ name="validateJoinNode"
+ description="Validate a join node"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.24"
+ audits="/0/@audits/@rules.40 /0/@audits/@rules.41"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityParameterNode"
+ name="validateActivityParameterNode"
+ description="Validate an activity parameter node"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.25"
+ audits="/0/@audits/@rules.42"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateCreateObjectActionClassifier"
+ name="validateCreateObjectActionClassifier"
+ description="Valide classifier for CreateObjectAction"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.26"
+ audits="/0/@audits/@rules.43 /0/@audits/@rules.44"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validaterReadStructuralFeatureAction"
+ name="validateReadStructuralfeatureAction"
+ description="Constraints for Structural Feature Action"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.27"
+ audits="/0/@audits/@rules.45"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateAddStructuralFeatureValueAction"
+ name="validateAddStructuralFeatureValueAction"
+ description="Constraint for AddStructuralFeatureValueAction"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.28"
+ audits="/0/@audits/@rules.46 /0/@audits/@rules.47 /0/@audits/@rules.48 /0/@audits/@rules.49"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateDestroyObjectAction"
+ name="validateDestroyObjectAction"
+ description="Constraint for DestroyObjectAction"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.29"
+ audits="/0/@audits/@rules.50"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateStructuralFeatureAction"
+ name="validateStructuralfeatureAction"
+ description="Constraint for StructuralFeatureAction"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.30"
+ audits="/0/@audits/@rules.51 /0/@audits/@rules.52 /0/@audits/@rules.53 /0/@audits/@rules.54"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateAddVariableValueAction"
+ name="validateAddvariablevalueAction"
+ description="Constraint for AddVariableValueAction"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.31"
+ audits="/0/@audits/@rules.55"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateWriteVariableAction"
+ name="validateWriteVariableAction"
+ description="Constraint for WriteVariableAction"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.32"
+ audits="/0/@audits/@rules.56 /0/@audits/@rules.57"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateVariableAction"
+ name="validateVariableAction"
+ description="Constraint for VariableAction"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.33"
+ audits="/0/@audits/@rules.58"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateReadVariableAction"
+ name="validateReadVariableAction"
+ description="Constraint for ReadVariableAction"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.34"
+ audits="/0/@audits/@rules.59 /0/@audits/@rules.60"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateBroacastSignalAction"
+ name="validateBroadcastSignalActionTODO"
+ description="Constraint for BraodcastSignalAction"
+ path="/0/@audits/@categories.0 /0/@audits/@categories.35"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateExceptionHandler_validateExceptionHandler"
+ name="validateExceptionHandler"
+ description="Constraint Exception Handler"
+ path="/0/@audits/@categories.10"
+ audits="/0/@audits/@rules.61 /0/@audits/@rules.63 /0/@audits/@rules.64"/>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateInterruptibleEdge"
+ name="validateInterruptibleEdge"
+ description="Constraint for interruptible Edge"
+ path="/0/@audits/@categories.10"
+ audits="/0/@audits/@rules.62"/>
+ <rules
+ name="validateNoIncomingEdges"
+ description="An initial node has no incoming edge"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateInitialNode_validateNoIncomingEdges"
+ rule="/0/@expressionProviders/@providers.1/@expressions.36"
+ message="An initial node must have no incoming edge"
+ useInLiveMode="true"
+ category="/0/@audits/@categories.1">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InitialNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateControlEdges"
+ description="Only control edges can have initial nodes as source"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateInitialNode_validateControlEdges"
+ rule="/0/@expressionProviders/@providers.1/@expressions.37"
+ message="Source of an object flow must not be an initial node"
+ useInLiveMode="true"
+ category="/0/@audits/@categories.1">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
+ </target>
+ </rules>
+ <rules
+ name="validateNoOutgoingEdges"
+ description="A fianl node has no outgoing edge"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateFinalNode_validateNoOutgoingEdges"
+ rule="/0/@expressionProviders/@providers.1/@expressions.38"
+ message="A final node must have no outgoing edge"
+ useInLiveMode="true"
+ category="/0/@audits/@categories.2">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/FinalNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateNotUnique"
+ description="Object nodes are not unique typed elements"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectNode_validateNotUnique"
+ rule="/0/@expressionProviders/@providers.1/@expressions.39"
+ message="isUnique must be false for object nodes."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.11">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateSelectionBehavior"
+ description="If an object node has a selection behavior, then the ordering of the object node is ordered, and vice versa."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectNode_validateSelectionBehavior"
+ rule="/0/@expressionProviders/@providers.1/@expressions.40"
+ message="isOrdered means there is a selection behavior for object nodes."
+ category="/0/@audits/@categories.11">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateObjectFlowEdges"
+ description="All edges coming into or going out of object nodes must be object flow edges."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectNode_validateObjectFlowEdges"
+ rule="/0/@expressionProviders/@providers.1/@expressions.41"
+ message="All edges coming into or going out of object nodes must be object flow edges."
+ category="/0/@audits/@categories.11">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateInputOutputParameter"
+ description="A selection behavior has one input parameter and one output parameter. The input parameter must be a bag of elements of the same type as the object node or a supertype of the type of object node. The output parameter must be the same or a subtype of the type of object node. The behavior cannot have side effects."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectNode_validateInputOutputParameter"
+ rule="/0/@expressionProviders/@providers.0/@expressions.101"
+ message="The selection behavior of an object node must have one input parameter and one output parameter. The parameters types must be compatible with the object node's type."
+ category="/0/@audits/@categories.11">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateControlPins"
+ description="Control pins have a control type"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validatePin_validateControlPins"
+ rule="/0/@expressionProviders/@providers.1/@expressions.42"
+ message="isControl muts imply isControlType for pins."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.13">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pin"/>
+ </target>
+ </rules>
+ <rules
+ name="validateOutgoingEdgesStructuredOnly"
+ description="Input pins may have outgoing edges only when they are on actions that are structured nodes, and these edges must target a node contained by the structured node."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateInputPin_validateOutgoingEdgesStructuredOnly"
+ rule="/0/@expressionProviders/@providers.1/@expressions.43"
+ message="Input pins may have outgoing edges only when they are on actions that are structured nodes, and these edges must target a node contained by the structured node."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.14">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ </target>
+ </rules>
+ <rules
+ name="validateOneOutputPin"
+ description="The fromAction of an action input pin must have exactly one output pin."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateActionInputPin_validateOneOutputPin"
+ rule="/0/@expressionProviders/@providers.1/@expressions.44"
+ message="The fromAction of an action input pin must have exactly one output pin."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.15">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
+ </target>
+ </rules>
+ <rules
+ name="validateInputPin"
+ description="The fromAction of an action input pin must only have action input pins as input pins."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateActionInputPin_validateInputPin"
+ rule="/0/@expressionProviders/@providers.1/@expressions.45"
+ message="The fromAction of an action input pin must only have action input pins as input pins."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.15">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
+ </target>
+ </rules>
+ <rules
+ name="validateNoControlOrDataFlow"
+ description="The fromAction of an action input pin cannot have control or data flows coming into or out of it or its pins."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateActionInputPin_validateNoControlOrDataFlow"
+ rule="/0/@expressionProviders/@providers.1/@expressions.46"
+ message="The fromAction of an action input pin cannot have control or data flows coming into or out of it or its pins."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.15">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
+ </target>
+ </rules>
+ <rules
+ name="validateCompatibleType"
+ description="The type of value specification must be compatible with the type of the value pin."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateValuePin_validateCompatibleType"
+ rule="/0/@expressionProviders/@providers.0/@expressions.102"
+ message="The type of value specification must be compatible with the type of the value pin."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.16">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
+ </target>
+ </rules>
+ <rules
+ name="validateNoIncomingEdges"
+ description="Value pins have no incoming edges."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateValuePin_validateNoIncomingEdges"
+ rule="/0/@expressionProviders/@providers.1/@expressions.47"
+ message="Value pins have no incoming edges."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.16">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
+ </target>
+ </rules>
+ <rules
+ name="validateIncomingEdgesStructuredOnly"
+ description="Output pins may have incoming edges only when they are on actions that are structured nodes, and these edges may not target a node contained by the structured node."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateOutputPin_validateIncomingEdgesStructuredOnly"
+ rule="/0/@expressionProviders/@providers.1/@expressions.48"
+ message="Output pins may have incoming edges only when they are on actions that are structured nodes, and these edges may not target a node contained by the structured node."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.17">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ </target>
+ </rules>
+ <rules
+ name="validateSourceAndTarget"
+ description="The source and target of an edge must be in the same activity as the edge."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityEdge_validateSourceAndTarget"
+ rule="/0/@expressionProviders/@providers.0/@expressions.103"
+ message="The source and target of an edge must be in the same activity as the edge."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.18">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge"/>
+ </target>
+ </rules>
+ <rules
+ name="validateOwned"
+ description="Activity edges may be owned only by activities or groups."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityEdge_validateOwned"
+ rule="/0/@expressionProviders/@providers.1/@expressions.49"
+ message="Activity edges may be owned only by activities or groups."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.18">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge"/>
+ </target>
+ </rules>
+ <rules
+ name="validateStructuredNode"
+ description="Activity edges may be owned by at most one structured node."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityEdge_validateStructuredNode"
+ rule="/0/@expressionProviders/@providers.1/@expressions.50"
+ message="Activity edges may be owned by at most one structured node."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.18">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge"/>
+ </target>
+ </rules>
+ <rules
+ name="validateHasSourceAndTarget"
+ description="The source and target of an edge must be defined."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityEdge_validateHasSourceAndTarget"
+ rule="/0/@expressionProviders/@providers.1/@expressions.51"
+ message="The source and target of an edge must be defined."
+ category="/0/@audits/@categories.18">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge"/>
+ </target>
+ </rules>
+ <rules
+ name="validateNoActions"
+ description="Object flows may not have actions at either end."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateNoActions"
+ rule="/0/@expressionProviders/@providers.1/@expressions.52"
+ message="You can not link an action with an object flow"
+ useInLiveMode="true"
+ category="/0/@audits/@categories.19">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
+ </target>
+ </rules>
+ <rules
+ name="validateCompatibleTypes"
+ description="Object nodes connected by an object flow, with optionally intervening control nodes, must have compatible types. In particular, the downstream object node type must be the same or a supertype of the upstream object node type"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateCompatibleTypes"
+ rule="/0/@expressionProviders/@providers.0/@expressions.104"
+ message="The object flow must link object nodes with compatible types (target type must be a supertype of the source type)."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.19">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
+ </target>
+ </rules>
+ <rules
+ name="validateSameUpperBounds"
+ description="Object nodes connected by an object flow, with optionally intervening control nodes, must have the same upper bounds."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateSameUpperBounds"
+ rule="/0/@expressionProviders/@providers.0/@expressions.105"
+ message="The object flow must link object nodes with the same upper bounds."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.19">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
+ </target>
+ </rules>
+ <rules
+ name="validateTarget"
+ description="An edge with constant weight may not target an object node, or lead to an object node downstream with no intervening actions, that has an upper bound less than the weight."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateTarget"
+ rule="/0/@expressionProviders/@providers.0/@expressions.106"
+ message="The target object node's upper bounds must be less than the object flow weight"
+ useInLiveMode="true"
+ category="/0/@audits/@categories.19">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
+ </target>
+ </rules>
+ <rules
+ name="validateTransformationBehaviour"
+ description="A transformation behavior has one input parameter and one output parameter. The input parameter must be the same as or a supertype of the type of object token coming from the source end. The output parameter must be the same or a subtype of the type of object token expected downstream. The behavior cannot have side effects."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateTransformationBehaviour"
+ rule="/0/@expressionProviders/@providers.0/@expressions.107"
+ message="A transformation behavior has one input parameter and one output parameter. The input parameter must be the same as or a supertype of the type of object token coming from the source end. The output parameter must be the same or a subtype of the type of object token expected downstream. The behavior cannot have side effects."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.19">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
+ </target>
+ </rules>
+ <rules
+ name="validateSelectionBehaviour"
+ description="An object flow may have a selection behavior only if it has an object node as a source."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateSelectionBehaviour"
+ rule="/0/@expressionProviders/@providers.1/@expressions.53"
+ message="Selection behavior is authorized only when the object flow's source is an object node."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.19">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
+ </target>
+ </rules>
+ <rules
+ name="validateInputAndOutputParameter"
+ description="A selection behavior has one input parameter and one output parameter. The input parameter must be a bag of elements of the same as or a supertype of the type of source object node. The output parameter must be the same or a subtype of the type of source object node. The behavior cannot have side effects."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateInputAndOutputParameter"
+ rule="/0/@expressionProviders/@providers.0/@expressions.108"
+ message="A selection behavior has one input parameter and one output parameter. The input parameter must be a bag of elements of the same as or a supertype of the type of source object node. The output parameter must be the same or a subtype of the type of source object node. The behavior cannot have side effects."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.19">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
+ </target>
+ </rules>
+ <rules
+ name="validateIsMulticastOrIsMultireceive"
+ description="isMulticast and isMultireceive cannot both be true."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateObjectFlow_validateIsMulticastOrIsMultireceive"
+ rule="/0/@expressionProviders/@providers.1/@expressions.54"
+ message="isMulticast and isMultireceive cannot both be true."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.19">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
+ </target>
+ </rules>
+ <rules
+ name="validateObjectNodes"
+ description="Control flows may not have object nodes at either end, except for object nodes with control type"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateControlFlow_validateObjectNodes"
+ rule="/0/@expressionProviders/@providers.1/@expressions.55"
+ message="You can not link an object node with a control flow (except if its control type is true)."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.20">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ControlFlow"/>
+ </target>
+ </rules>
+ <rules
+ name="validateIncomingOutgoingEdges"
+ description="A decision node has one or two incoming edges and at least one outgoing edge."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateIncomingOutgoingEdges"
+ rule="/0/@expressionProviders/@providers.1/@expressions.56"
+ message="A decision node has one or two incoming edges and at least one outgoing edge."
+ category="/0/@audits/@categories.21">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateEdges"
+ description="The edges coming into and out of a decision node, other than the decision input flow (if any), must be either all object flows or all control flows."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateEdges"
+ rule="/0/@expressionProviders/@providers.1/@expressions.57"
+ message="Edges linking the decision node must have be of the same type (except decision input flow)."
+ category="/0/@audits/@categories.21">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateDecisionInputFlowIncoming"
+ description="The decisionInputFlow of a decision node must be an incoming edge of the decision node."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateDecisionInputFlowIncoming"
+ rule="/0/@expressionProviders/@providers.1/@expressions.58"
+ message="The decisionInputFlow of a decision node must be an incoming edge of the decision node."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.21">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateParameters"
+ description="A decision input behavior has no output parameters, no in-out parameters and one return parameter."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateParameters"
+ rule="/0/@expressionProviders/@providers.1/@expressions.59"
+ message="A decision input behavior has no output parameters, no in-out parameters and one return parameter."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.21">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateZeroInputParameters"
+ description="If the decision node has no decision input flow and an incoming control flow, then a decision input behavior has zero input parameters."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateZeroInputParameters"
+ rule="/0/@expressionProviders/@providers.1/@expressions.60"
+ message="If the decision node has no decision input flow and an incoming control flow, then a decision input behavior has zero input parameters."
+ category="/0/@audits/@categories.21">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateIncomingObjectOneInputParameter"
+ description="If the decision node has no decision input flow and an incoming object flow, then a decision input behavior has one input parameter whose type is the same as or a supertype of the type of object tokens offered on the incoming edge."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateIncomingObjectOneInputParameter"
+ rule="/0/@expressionProviders/@providers.0/@expressions.109"
+ message="If the decision node has no decision input flow and an incoming object flow, then a decision input behavior has one input parameter whose type is the same as or a supertype of the type of object tokens offered on the incoming edge."
+ category="/0/@audits/@categories.21">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateIncomingControlOneInputParameter"
+ description="If the decision node has a decision input flow and an incoming control flow, then a decision input behavior has one input parameter whose type is the same as or a supertype of the type of object tokens offered on the decision input flow."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateIncomingControlOneInputParameter"
+ rule="/0/@expressionProviders/@providers.0/@expressions.110"
+ message="If the decision node has a decision input flow and an incoming control flow, then a decision input behavior has one input parameter whose type is the same as or a supertype of the type of object tokens offered on the decision input flow."
+ category="/0/@audits/@categories.21">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateTwoInputParameters"
+ description="If the decision node has a decision input flow and an second incoming object flow, then a decision input behavior has two input parameters, the first of which has a type that is the same as or a supertype of the type of the type of object tokens offered on the nondecision input flow and the second of which has a type that is the same as or a supertype of the type of object tokens offered on the decision input flow."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateDecisionNode_validateTwoInputParameters"
+ rule="/0/@expressionProviders/@providers.0/@expressions.111"
+ message="If the decision node has a decision input flow and an incoming control flow, then a decision input behavior has one input parameter whose type is the same as or a supertype of the type of object tokens offered on the decision input flow."
+ category="/0/@audits/@categories.21">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateOneOutgoingEdge"
+ description="A merge node has one outgoing edge."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateMergeNode_validateOneOutgoingEdge"
+ rule="/0/@expressionProviders/@providers.1/@expressions.61"
+ message="A merge node has one outgoing edge."
+ category="/0/@audits/@categories.22">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/MergeNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateEdges"
+ description="The edges coming into and out of a merge node must be either all object flows or all control flows."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateMergeNode_validateEdges"
+ rule="/0/@expressionProviders/@providers.1/@expressions.62"
+ message="The edges coming into and out of a merge node must be either all object flows or all control flows."
+ category="/0/@audits/@categories.22">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/MergeNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateOneIncomingEdge"
+ description="A fork node has one incoming edge."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateForkNode_validateOneIncomingEdge"
+ rule="/0/@expressionProviders/@providers.1/@expressions.63"
+ message="A fork node has one incoming edge."
+ category="/0/@audits/@categories.23">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ForkNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateEdges"
+ description="The edges coming into and out of a fork node must be either all object flows or all control flows."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateForkNode_validateEdges"
+ rule="/0/@expressionProviders/@providers.1/@expressions.64"
+ message="The edges coming into and out of a fork node must be either all object flows or all control flows."
+ category="/0/@audits/@categories.23">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ForkNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateOneOutgoingEdge"
+ description="A join node has one outgoing edge."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateJoinNode_validateOneOutgoingEdge"
+ rule="/0/@expressionProviders/@providers.1/@expressions.65"
+ message="A join node has one outgoing edge."
+ category="/0/@audits/@categories.24">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/JoinNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateIncomingObjectFlow"
+ description="If a join node has an incoming object flow, it must have an outgoing object flow, otherwise, it must have an outgoing control flow."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateJoinNode_validateIncomingObjectFlow"
+ rule="/0/@expressionProviders/@providers.1/@expressions.66"
+ message="If a join node has an incoming object flow, it must have an outgoing object flow, otherwise, it must have an outgoing control flow."
+ category="/0/@audits/@categories.24">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/JoinNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateIncomingOrOutgoing"
+ description="An activity parameter node must not have both incoming and outgoing edges."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateActivityParameterNode_validateIncomingOrOutgoing"
+ rule="/0/@expressionProviders/@providers.1/@expressions.67"
+ message="An activity parameter node must not have both incoming and outgoing edges."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.25">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityParameterNode"/>
+ </target>
+ </rules>
+ <rules
+ name="validateNotAbstract"
+ description="Check that the classifier is not abstract"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateCreateObjectActionClassifier_notAbstract"
+ rule="/0/@expressionProviders/@providers.1/@expressions.68"
+ message="The classifier cannot be abstract."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.26">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CreateObjectAction"/>
+ </target>
+ </rules>
+ <rules
+ name="valideNotAssociationClass"
+ description="Check that the classifier is not an association class"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateCreateObjectActionClassifier_notClassifier"
+ rule="/0/@expressionProviders/@providers.1/@expressions.69"
+ message="The classifier cannot be an association class."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.26">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CreateObjectAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateOnlyOneClassifier"
+ description="Check that a structural feature has exactly one featuringClassifier."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateReadStructuralFeatureAction_onlyOneClassifier"
+ rule="/0/@expressionProviders/@providers.1/@expressions.70"
+ message="A structural feature has exactly one featuringClassifier."
+ category="/0/@audits/@categories.27">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadStructuralFeatureAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateInputPinType"
+ description="Check valide that the type of the input pin is the same than the one from the structural feature"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateAddStructuralFeatureValueAction_ValidInputPinType"
+ rule="/0/@expressionProviders/@providers.1/@expressions.71"
+ message="The type of the value input pin is the same as the type of the structural feature."
+ category="/0/@audits/@categories.28">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddStructuralFeatureValueAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateOutputPinType"
+ description="Check that the type of the result output pin is the same as the type of the inherited object input pin."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateAddStructuralFeatureValueAction_validateOutputPinType"
+ rule="/0/@expressionProviders/@providers.1/@expressions.72"
+ message="The type of the result output pin is the same as the type of the inherited object input pin."
+ category="/0/@audits/@categories.28">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddStructuralFeatureValueAction"/>
+ </target>
+ </rules>
+ <rules
+ name="A value input pin is required"
+ description="Check that a value input pin is required"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateAddStructuralFeatureValueAction_valideTheRequiredValuePin"
+ rule="/0/@expressionProviders/@providers.1/@expressions.73"
+ message="org.eclipse.uml2.uml.util.UMLValidator.validateAddStructuralFeatureValueAction"
+ category="/0/@audits/@categories.28">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddStructuralFeatureValueAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateOnlyOneClassifier"
+ description="Check that a structural feature has exactly one featuringClassifier."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateAddStructuralFeatureValueAction_onlyOneClassifier"
+ rule="/0/@expressionProviders/@providers.1/@expressions.74"
+ message="A structural feature has exactly one featuringClassifier."
+ category="/0/@audits/@categories.28">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddStructuralFeatureValueAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateInputPinHasNoType"
+ description="Check that the input pin has no type"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateDestroyObjectAction_InputPinHasNotType"
+ rule="/0/@expressionProviders/@providers.1/@expressions.75"
+ message="The input pin has no type"
+ useInLiveMode="true"
+ category="/0/@audits/@categories.29">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DestroyObjectAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateFeatureNotStatic"
+ description="Check that the structural feature must not be static."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateStructuralFeatureAction_FeatureNotStatic"
+ rule="/0/@expressionProviders/@providers.1/@expressions.76"
+ message="The structural feature must not be static."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.30">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateValideTypeOwningFeature"
+ description="Check that the structural feature must either be owned by the type of the object input pin, or it must be an owned end of a binary"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateStructuralFeatureAction_validateOwningFeteatringType"
+ rule="/0/@expressionProviders/@providers.1/@expressions.77"
+ message="The structural feature must either be owned by the type of the object input pin, or it must be an owned end of a binary"
+ category="/0/@audits/@categories.30">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateInputPinMultiplicity"
+ description="Check that the multiplicity of the object input pin must be 1..1."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateStructuralFeatureAction_InputPinMulitplicity"
+ rule="/0/@expressionProviders/@providers.1/@expressions.78"
+ message="The multiplicity of the object input pin must be 1..1."
+ category="/0/@audits/@categories.30">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateOnlyOneFeaturingClassifier"
+ description="Check that a structural feature has exactly one featuringClassifier."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateStructuralFeatureAction_OnlyOneFeaturingClassifier"
+ rule="/0/@expressionProviders/@providers.1/@expressions.79"
+ message="A structural feature has exactly one featuringClassifier."
+ category="/0/@audits/@categories.30">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateInputPinAsValueAsAtLeastOneInputPin"
+ description="Check that a value input pin is required."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateAddVariableValueAction_AsAtLeastOneInputPin"
+ rule="/0/@expressionProviders/@providers.1/@expressions.80"
+ message="A value input pin is required."
+ category="/0/@audits/@categories.31">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddVariableValueAction"/>
+ </target>
+ </rules>
+ <rules
+ name="valideInputPinType"
+ description="Check that the type input pin is the same as the type of the variable."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateWriteVariableAction_InputPinValidePin"
+ rule="/0/@expressionProviders/@providers.1/@expressions.81"
+ message="The type input pin is the same as the type of the variable."
+ category="/0/@audits/@categories.32">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteVariableAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateInputPinMultiplicity"
+ description="Check that the multiplicity of the input pin is 1..1."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateWriteVariableAction_valideInputPinMultiplicity"
+ rule="/0/@expressionProviders/@providers.1/@expressions.82"
+ message="The multiplicity of the input pin is 1..1."
+ category="/0/@audits/@categories.32">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteVariableAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateVariableScope"
+ description="Check that the action must be in the scope of the variable."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateVariableAction_VariableScope"
+ rule="/0/@expressionProviders/@providers.1/@expressions.83"
+ message="The action must be in the scope of the variable."
+ category="/0/@audits/@categories.33">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/VariableAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateOutputPinType"
+ description="Check that the type and ordering of the result output pin of a read-variable action are the same as the type and ordering of the"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateReadVariableAction_OutputPinType"
+ rule="/0/@expressionProviders/@providers.1/@expressions.84"
+ message="The type and ordering of the result output pin of a read-variable action are the same as the type and ordering of the"
+ category="/0/@audits/@categories.34">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadVariableAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateOutputPinMultiplicity"
+ description="Check that the multiplicity of the variable must be compatible with the multiplicity of the output pin"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateReadVariableAction_OutputPinMultiplicity"
+ rule="/0/@expressionProviders/@providers.1/@expressions.85"
+ message="The multiplicity of the variable must be compatible with the multiplicity of the output pin"
+ category="/0/@audits/@categories.34">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadVariableAction"/>
+ </target>
+ </rules>
+ <rules
+ name="validateException_HandlerBody_Constraint4"
+ description="The handler body has one input, and that input is the same as the exception input."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateExceptionHandler_validateException_HandlerBody_Constraint4"
+ rule="/0/@expressionProviders/@providers.0/@expressions.113"
+ message="The handler body has one input, and that input is the same as the exception input."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.36">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExceptionHandler"/>
+ </target>
+ </rules>
+ <rules
+ name="validateInterruptibleEdge"
+ description="Validate the constraint for interruptible Edge"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateInterruptibleEdge_validateEdge"
+ rule="/0/@expressionProviders/@providers.0/@expressions.112"
+ message="Interrupting edges of a region must have their source node in the region and their target node outside the region in the"
+ useInLiveMode="true"
+ category="/0/@audits/@categories.37">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge"/>
+ </target>
+ </rules>
+ <rules
+ name="validateException_StructuredActivityNode_Constraint3"
+ description="If the protected node is a StructuredActivityNode with output pins, then the exception handler body must also be a StructuredActivityNode with output pins that correspond in number and types to those of the protected node."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateExceptionHandler_validateException_StructuredActivityNode_Constraint3"
+ rule="/0/@expressionProviders/@providers.0/@expressions.116"
+ message="If the protected node is a StructuredActivityNode with output pins, then the exception handler body must also be a StructuredActivityNode with output pins that correspond in number and types to those of the protected node."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.36">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExceptionHandler"/>
+ </target>
+ </rules>
+ <rules
+ name="validateException_SourceAndTargetEdge_Constraint1"
+ description="The exception handler and its input object node are not the source or target of any edge."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateExceptionHandler_validateException_SourceAndTargetEdge_Constraint1"
+ rule="/0/@expressionProviders/@providers.0/@expressions.115"
+ message="The exception handler and its input object node are not the source or target of any edge."
+ useInLiveMode="true"
+ category="/0/@audits/@categories.36">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExceptionHandler"/>
+ </target>
+ </rules>
+ <rules
+ name="validateException_StructuredActivityNode_Constraint2"
+ description="An edge that has a source in an exception handler structured node must also have its target in the handler, and vice versa."
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateExceptionHandler_validateException_StructuredActivityNode_Constraint2"
+ rule="/0/@expressionProviders/@providers.0/@expressions.114"
+ message="An edge that has a source in an exception handler structured node must also have its target in the handler, and vice versa."
+ category="/0/@audits/@categories.18">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge"/>
+ </target>
+ </rules>
+ <clientContexts
+ ruleTargets="/0/@audits/@rules.0/@target /0/@audits/@rules.1/@target /0/@audits/@rules.2/@target /0/@audits/@rules.3/@target /0/@audits/@rules.4/@target /0/@audits/@rules.5/@target /0/@audits/@rules.6/@target /0/@audits/@rules.7/@target /0/@audits/@rules.8/@target /0/@audits/@rules.9/@target /0/@audits/@rules.10/@target /0/@audits/@rules.11/@target /0/@audits/@rules.12/@target /0/@audits/@rules.13/@target /0/@audits/@rules.14/@target /0/@audits/@rules.15/@target /0/@audits/@rules.16/@target /0/@audits/@rules.17/@target /0/@audits/@rules.18/@target /0/@audits/@rules.19/@target /0/@audits/@rules.20/@target /0/@audits/@rules.21/@target /0/@audits/@rules.22/@target /0/@audits/@rules.23/@target /0/@audits/@rules.24/@target /0/@audits/@rules.25/@target /0/@audits/@rules.26/@target /0/@audits/@rules.27/@target /0/@audits/@rules.28/@target /0/@audits/@rules.29/@target /0/@audits/@rules.30/@target /0/@audits/@rules.31/@target /0/@audits/@rules.32/@target /0/@audits/@rules.33/@target /0/@audits/@rules.34/@target /0/@audits/@rules.35/@target /0/@audits/@rules.36/@target /0/@audits/@rules.37/@target /0/@audits/@rules.38/@target /0/@audits/@rules.39/@target /0/@audits/@rules.40/@target /0/@audits/@rules.41/@target /0/@audits/@rules.42/@target /0/@audits/@rules.43/@target /0/@audits/@rules.44/@target /0/@audits/@rules.45/@target /0/@audits/@rules.46/@target /0/@audits/@rules.47/@target /0/@audits/@rules.48/@target /0/@audits/@rules.49/@target /0/@audits/@rules.50/@target /0/@audits/@rules.51/@target /0/@audits/@rules.52/@target /0/@audits/@rules.53/@target /0/@audits/@rules.54/@target /0/@audits/@rules.55/@target /0/@audits/@rules.56/@target /0/@audits/@rules.57/@target /0/@audits/@rules.58/@target /0/@audits/@rules.59/@target /0/@audits/@rules.60/@target /0/@audits/@rules.61/@target /0/@audits/@rules.62/@target /0/@audits/@rules.63/@target /0/@audits/@rules.64/@target /0/@audits/@rules.65/@target"/>
+ </audits>
+ <diagram
+ visualID="1000"
+ editPartClassName="ActivityDiagramEditPart"
+ itemSemanticEditPolicyClassName="ActivityDiagramItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ActivityDiagramCanonicalEditPolicy"
+ iconProviderPriority="Low"
+ validationProviderPriority="Low"
+ validationEnabled="true"
+ validationDecorators="true"
+ liveValidationUIFeedback="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="PackageEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ <domainDiagramElement
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3001"
+ editPartClassName="ParameterEditPart"
+ itemSemanticEditPolicyClassName="ParameterItemSemanticEditPolicy"
+ notationViewFactoryClassName="ParameterViewFactory"
+ canonicalEditPolicyClassName="ParameterCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ParameterGraphicalNodeEditPolicy"
+ createCommandClassName="ParameterCreateCommand"
+ containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.11">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.Parameter_3001"
+ displayName="Parameter">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.44/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Parameter"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior/ownedParameter"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior/ownedParameter"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ parser="/0/@labelParsers/@implementations.3"/>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3002"
+ editPartClassName="ConstraintInActivityAsPrecondEditPart"
+ itemSemanticEditPolicyClassName="ConstraintInActivityAsPrecondItemSemanticEditPolicy"
+ notationViewFactoryClassName="ConstraintViewFactory"
+ canonicalEditPolicyClassName="ConstraintInActivityAsPrecondCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ConstraintInActivityAsPrecondGraphicalNodeEditPolicy"
+ createCommandClassName="ConstraintInActivityAsPrecondCreateCommand"
+ containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.12">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.0/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior/precondition"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.2">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.25"
+ viewPattern="&lt;&lt;precondition>> {0}"
+ editorPattern="{0}"
+ editPattern="{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3003"
+ editPartClassName="ConstraintInActivityAsPostcondEditPart"
+ itemSemanticEditPolicyClassName="ConstraintInActivityAsPostcondItemSemanticEditPolicy"
+ notationViewFactoryClassName="ConstraintViewFactory"
+ canonicalEditPolicyClassName="ConstraintInActivityAsPostcondCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ConstraintInActivityAsPostcondGraphicalNodeEditPolicy"
+ createCommandClassName="ConstraintInActivityAsPostcondCreateCommand"
+ containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.13">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.0/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior/postcondition"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.3">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.24"
+ viewPattern="&lt;&lt;postcondition>> {0}"
+ editorPattern="{0}"
+ editPattern="{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ visualID="3004"
+ editPartClassName="InitialNodeEditPart"
+ itemSemanticEditPolicyClassName="InitialNodeItemSemanticEditPolicy"
+ notationViewFactoryClassName="InitialNodeViewFactory"
+ canonicalEditPolicyClassName="InitialNodeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InitialNodeGraphicalNodeEditPolicy"
+ createCommandClassName="InitialNodeCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InitialNode_3004"
+ displayName="InitialNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.150/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InitialNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.4">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6034"
+ editPartClassName="InitialNodeFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="InitialNodeFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5080"
+ editPartClassName="InitialNodeAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="InitialNodeAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="InitialNodeLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3005"
+ editPartClassName="ActivityFinalNodeEditPart"
+ itemSemanticEditPolicyClassName="ActivityFinalNodeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityFinalNodeViewFactory"
+ canonicalEditPolicyClassName="ActivityFinalNodeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ActivityFinalNodeGraphicalNodeEditPolicy"
+ createCommandClassName="ActivityFinalNodeCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActivityFinalNode_3005"
+ displayName="ActivityFinalNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.92/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityFinalNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.5">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6033"
+ editPartClassName="ActivityFinalNodeFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="ActivityFinalNodeFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5081"
+ editPartClassName="ActivityFinalNodeAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ActivityFinalNodeAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityFinalNodeLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3006"
+ editPartClassName="FlowFinalNodeEditPart"
+ itemSemanticEditPolicyClassName="FlowFinalNodeItemSemanticEditPolicy"
+ notationViewFactoryClassName="FlowFinalNodeViewFactory"
+ canonicalEditPolicyClassName="FlowFinalNodeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="FlowFinalNodeGraphicalNodeEditPolicy"
+ createCommandClassName="FlowFinalNodeCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.FlowFinalNode_3006"
+ displayName="FlowFinalNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.144/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/FlowFinalNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.6">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6035"
+ editPartClassName="FlowFinalNodeFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="FlowFinalNodeFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5082"
+ editPartClassName="FlowFinalNodeAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="FlowFinalNodeAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="FlowFinalNodeLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3007"
+ editPartClassName="OpaqueActionEditPart"
+ itemSemanticEditPolicyClassName="OpaqueActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="OpaqueActionViewFactory"
+ canonicalEditPolicyClassName="OpaqueActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10"
+ graphicalNodeEditPolicyClassName="OpaqueActionGraphicalNodeEditPolicy"
+ createCommandClassName="OpaqueActionCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OpaqueAction_3007"
+ displayName="OpaqueAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.161/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionObjectFlowWithPinsCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.7">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5003"
+ editPartClassName="OpaqueActionNameEditPart"
+ itemSemanticEditPolicyClassName="OpaqueActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="OpaqueActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6028"
+ editPartClassName="OpaqueActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="OpaqueActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3015"
+ editPartClassName="ValuePinInOpaqueActEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInOpaqueActItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinViewFactory"
+ canonicalEditPolicyClassName="ValuePinInOpaqueActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ValuePinInOpaqueActGraphicalNodeEditPolicy"
+ createCommandClassName="ValuePinInOpaqueActCreateCommand"
+ containers="/0/@diagram/@childNodes.6"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3015"
+ displayName="ValuePin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/inputValue"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/inputValue"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.8">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5011"
+ editPartClassName="ValuePinInOActLabelEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInOActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5024"
+ editPartClassName="ValuePinInOActValueEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInOActValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5083"
+ editPartClassName="ValuePinInOActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInOActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3016"
+ editPartClassName="ActionInputPinInOpaqueActEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInOpaqueActItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinViewFactory"
+ canonicalEditPolicyClassName="ActionInputPinInOpaqueActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ActionInputPinInOpaqueActGraphicalNodeEditPolicy"
+ createCommandClassName="ActionInputPinInOpaqueActCreateCommand"
+ containers="/0/@diagram/@childNodes.6"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3016"
+ displayName="ActionInputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/inputValue"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/inputValue"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.9">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5012"
+ editPartClassName="ActionInputPinInOActLabelEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInOActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5025"
+ editPartClassName="ActionInputPinInOActValueEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInOActValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5084"
+ editPartClassName="ActionInputPinInOActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInOActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3013"
+ editPartClassName="InputPinInOpaqueActEditPart"
+ itemSemanticEditPolicyClassName="InputPinInOpaqueActItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInOpaqueActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInOpaqueActGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInOpaqueActCreateCommand"
+ containers="/0/@diagram/@childNodes.6"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3013"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/inputValue"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/inputValue"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.10">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5009"
+ editPartClassName="InputPinInOActLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInOActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5085"
+ editPartClassName="InputPinInOActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="InputPinInOActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3014"
+ editPartClassName="OutputPinInOpaqueActEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInOpaqueActItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinViewFactory"
+ canonicalEditPolicyClassName="OutputPinInOpaqueActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OutputPinInOpaqueActGraphicalNodeEditPolicy"
+ createCommandClassName="OutputPinInOpaqueActCreateCommand"
+ containers="/0/@diagram/@childNodes.6"
+ preferredSideName="EAST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3014"
+ displayName="OutputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/outputValue"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueAction/outputValue"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.11">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5010"
+ editPartClassName="OutputPinInOActLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInOActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5086"
+ editPartClassName="OutputPinInOActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInOActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3008"
+ editPartClassName="CallBehaviorActionEditPart"
+ itemSemanticEditPolicyClassName="CallBehaviorActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="CallBehaviorActionViewFactory"
+ canonicalEditPolicyClassName="CallBehaviorActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15"
+ graphicalNodeEditPolicyClassName="CallBehaviorActionGraphicalNodeEditPolicy"
+ createCommandClassName="CallBehaviorActionCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.CallBehaviorAction_3008"
+ displayName="CallBehaviorAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.100/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.CallBehaviorActionFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallBehaviorAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.12">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5004"
+ editPartClassName="CallBehaviorActionNameEditPart"
+ itemSemanticEditPolicyClassName="CallBehaviorActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="CallBehaviorActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.5"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6029"
+ editPartClassName="CallBehaviorActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="CallBehaviorActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3017"
+ editPartClassName="ValuePinInCallBeActEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInCallBeActItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinViewFactory"
+ canonicalEditPolicyClassName="ValuePinInCallBeActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ValuePinInCallBeActGraphicalNodeEditPolicy"
+ createCommandClassName="ValuePinInCallBeActCreateCommand"
+ containers="/0/@diagram/@childNodes.11"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3017"
+ displayName="ValuePin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.13">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5013"
+ editPartClassName="ValuePinInCBActLabelEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInCBActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5026"
+ editPartClassName="ValuePinInCBActValueEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInCBActValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5087"
+ editPartClassName="ValuePinInCBActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInCBActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3018"
+ editPartClassName="ActionInputPinInCallBeActEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInCallBeActItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinViewFactory"
+ canonicalEditPolicyClassName="ActionInputPinInCallBeActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ActionInputPinInCallBeActGraphicalNodeEditPolicy"
+ createCommandClassName="ActionInputPinInCallBeActCreateCommand"
+ containers="/0/@diagram/@childNodes.11"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3018"
+ displayName="ActionInputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.14">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5014"
+ editPartClassName="ActionInputPinInCBActLabelEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInCBActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5027"
+ editPartClassName="ActionInputPinInCBActValueEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInCBActValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5088"
+ editPartClassName="ActionInputPinInCBActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInCBActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3019"
+ editPartClassName="InputPinInCallBeActEditPart"
+ itemSemanticEditPolicyClassName="InputPinInCallBeActItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInCallBeActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInCallBeActGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInCallBeActCreateCommand"
+ containers="/0/@diagram/@childNodes.11"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3019"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.15">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5015"
+ editPartClassName="InputPinInCBActLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInCBActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5089"
+ editPartClassName="InputPinInCBActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="InputPinInCBActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3020"
+ editPartClassName="OutputPinInCallBeActEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInCallBeActItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinViewFactory"
+ canonicalEditPolicyClassName="OutputPinInCallBeActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OutputPinInCallBeActGraphicalNodeEditPolicy"
+ createCommandClassName="OutputPinInCallBeActCreateCommand"
+ containers="/0/@diagram/@childNodes.11"
+ preferredSideName="EAST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3020"
+ displayName="OutputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallAction/result"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallAction/result"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.16">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5016"
+ editPartClassName="OutputPinInCBActLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInCBActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5090"
+ editPartClassName="OutputPinInCBActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInCBActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3010"
+ editPartClassName="CallOperationActionEditPart"
+ itemSemanticEditPolicyClassName="CallOperationActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="CallOperationActionViewFactory"
+ canonicalEditPolicyClassName="CallOperationActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.17 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.20 /0/@diagram/@childNodes.21 /0/@diagram/@childNodes.22 /0/@diagram/@childNodes.23"
+ graphicalNodeEditPolicyClassName="CallOperationActionGraphicalNodeEditPolicy"
+ createCommandClassName="CallOperationActionCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.CallOperationAction_3010"
+ displayName="CallOperationAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.102/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.17">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5006"
+ editPartClassName="CallOperationActionNameEditPart"
+ itemSemanticEditPolicyClassName="CallOperationActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="CallOperationActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.4"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6020"
+ editPartClassName="CallOperationActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="CallOperationActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3021"
+ editPartClassName="ActionInputPinInCallOpActEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInCallOpActItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinViewFactory"
+ canonicalEditPolicyClassName="ActionInputPinInCallOpActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ActionInputPinInCallOpActGraphicalNodeEditPolicy"
+ createCommandClassName="ActionInputPinInCallOpActCreateCommand"
+ containers="/0/@diagram/@childNodes.16"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3021"
+ displayName="ActionInputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.0">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.18">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5017"
+ editPartClassName="ActionInputPinInCOActLabelEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInCOActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5028"
+ editPartClassName="ActionInputPinInCOActValueEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInCOActValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5091"
+ editPartClassName="ActionInputPinInCOActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInCOActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3022"
+ editPartClassName="ValuePinInCallOpActEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInCallOpActItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinViewFactory"
+ canonicalEditPolicyClassName="ValuePinInCallOpActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ValuePinInCallOpActGraphicalNodeEditPolicy"
+ createCommandClassName="ValuePinInCallOpActCreateCommand"
+ containers="/0/@diagram/@childNodes.16"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3022"
+ displayName="ValuePin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.1">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.19">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5018"
+ editPartClassName="ValuePinInCOActLabelEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInCOActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5029"
+ editPartClassName="ValuePinInCOActValueEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInCOActValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5092"
+ editPartClassName="ValuePinInCOActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInCOActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3023"
+ editPartClassName="InputPinInCallOpActEditPart"
+ itemSemanticEditPolicyClassName="InputPinInCallOpActItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInCallOpActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInCallOpActGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInCallOpActCreateCommand"
+ containers="/0/@diagram/@childNodes.16"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3023"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.2">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5019"
+ editPartClassName="InputPinInCOActLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInCOActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5093"
+ editPartClassName="InputPinInCOActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="InputPinInCOActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3024"
+ editPartClassName="OutputPinInCallOpActEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInCallOpActItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinViewFactory"
+ canonicalEditPolicyClassName="OutputPinInCallOpActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OutputPinInCallOpActGraphicalNodeEditPolicy"
+ createCommandClassName="OutputPinInCallOpActCreateCommand"
+ containers="/0/@diagram/@childNodes.16"
+ preferredSideName="EAST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3024"
+ displayName="OutputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallAction/result"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallAction/result"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.21">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5020"
+ editPartClassName="OutputPinInCOActLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInCOActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5094"
+ editPartClassName="OutputPinInCOActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInCOActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3025"
+ editPartClassName="ValuePinInCallOpActAsTargetEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInCallOpActAsTargetItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinViewFactory"
+ canonicalEditPolicyClassName="ValuePinInCallOpActAsTargetCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ValuePinInCallOpActAsTargetGraphicalNodeEditPolicy"
+ createCommandClassName="ValuePinInCallOpActAsTargetCreateCommand"
+ containers="/0/@diagram/@childNodes.16"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3025"
+ displayName="ValuePin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.3">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction/target"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction/target"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.22">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5021"
+ editPartClassName="ValuePinInCOActAsTargetLabelEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInCOActAsTargetLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5030"
+ editPartClassName="ValuePinInCOActAsTargetValueEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInCOActAsTargetValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5095"
+ editPartClassName="ValuePinInCOActAsTargetAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInCOActAsTargetAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3026"
+ editPartClassName="ActionInputPinInCallOpActAsTargetEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInCallOpActAsTargetItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinViewFactory"
+ canonicalEditPolicyClassName="ActionInputPinInCallOpActAsTargetCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ActionInputPinInCallOpActAsTargetGraphicalNodeEditPolicy"
+ createCommandClassName="ActionInputPinInCallOpActAsTargetCreateCommand"
+ containers="/0/@diagram/@childNodes.16"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3026"
+ displayName="ActionInputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.4">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction/target"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction/target"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.23">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5022"
+ editPartClassName="ActionInputPinInCOActAsTargetLabelEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInCOActAsTargetLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5031"
+ editPartClassName="ActionInputPinInCOActAsTargetValueEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInCOActAsTargetValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5096"
+ editPartClassName="ActionInputPinInCOActAsTargetAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInCOActAsTargetAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3027"
+ editPartClassName="InputPinInCallOpActAsTargetEditPart"
+ itemSemanticEditPolicyClassName="InputPinInCallOpActAsTargetItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInCallOpActAsTargetCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInCallOpActAsTargetGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInCallOpActAsTargetCreateCommand"
+ containers="/0/@diagram/@childNodes.16"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3027"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.5">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction/target"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CallOperationAction/target"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.24">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5023"
+ editPartClassName="InputPinInCOActAsTargetLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInCOActAsTargetLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5097"
+ editPartClassName="InputPinInCOActAsTargetAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="InputPinInCOActAsTargetAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3034"
+ editPartClassName="DurationConstraintAsLocalPrecondEditPart"
+ itemSemanticEditPolicyClassName="DurationConstraintAsLocalPrecondItemSemanticEditPolicy"
+ notationViewFactoryClassName="DurationConstraintViewFactory"
+ canonicalEditPolicyClassName="DurationConstraintAsLocalPrecondCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DurationConstraintAsLocalPrecondGraphicalNodeEditPolicy"
+ createCommandClassName="DurationConstraintAsLocalPrecondCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.DurationConstraint_3034"
+ displayName="DurationConstraint">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.134/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPreconditionConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.6">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationConstraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.25">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenReferenceNewElementSpec">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <newElementInitializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.26">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <elementClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationInterval"/>
+ </newElementInitializers>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5038"
+ editPartClassName="DurationConstraintAsLocalPrecondNameEditPart"
+ itemSemanticEditPolicyClassName="DurationConstraintAsLocalPrecondNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="DurationConstraintNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5130"
+ editPartClassName="DurationConstraintAsLocalPrecondBodyEditPart"
+ itemSemanticEditPolicyClassName="DurationConstraintAsLocalPrecondBodyItemSemanticEditPolicy"
+ notationViewFactoryClassName="DurationConstraintSpecificationViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.22"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3035"
+ editPartClassName="DurationConstraintAsLocalPostcondEditPart"
+ itemSemanticEditPolicyClassName="DurationConstraintAsLocalPostcondItemSemanticEditPolicy"
+ notationViewFactoryClassName="DurationConstraintViewFactory"
+ canonicalEditPolicyClassName="DurationConstraintAsLocalPostcondCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DurationConstraintAsLocalPostcondGraphicalNodeEditPolicy"
+ createCommandClassName="DurationConstraintAsLocalPostcondCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.DurationConstraint_3035"
+ displayName="DurationConstraint">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.134/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPostconditionConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.7">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationConstraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.27">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenReferenceNewElementSpec">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <newElementInitializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.28">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <elementClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationInterval"/>
+ </newElementInitializers>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5039"
+ editPartClassName="DurationConstraintAsLocalPostcondNameEditPart"
+ itemSemanticEditPolicyClassName="DurationConstraintAsLocalPostcondNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="DurationConstraintNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5131"
+ editPartClassName="DurationConstraintAsLocalPostcondBodyEditPart"
+ itemSemanticEditPolicyClassName="DurationConstraintAsLocalPostcondBodyItemSemanticEditPolicy"
+ notationViewFactoryClassName="DurationConstraintSpecificationViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.22"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3036"
+ editPartClassName="TimeConstraintAsLocalPrecondEditPart"
+ itemSemanticEditPolicyClassName="TimeConstraintAsLocalPrecondItemSemanticEditPolicy"
+ notationViewFactoryClassName="TimeConstraintViewFactory"
+ canonicalEditPolicyClassName="TimeConstraintAsLocalPrecondCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="TimeConstraintAsLocalPrecondGraphicalNodeEditPolicy"
+ createCommandClassName="TimeConstraintAsLocalPrecondCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.TimeConstraint_3036"
+ displayName="TimeConstraint">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.185/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPreconditionConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.8">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeConstraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.29">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenReferenceNewElementSpec">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <newElementInitializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.30">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <elementClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeInterval"/>
+ </newElementInitializers>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5040"
+ editPartClassName="TimeConstraintAsLocalPrecondNameEditPart"
+ itemSemanticEditPolicyClassName="TimeConstraintAsLocalPrecondNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="TimeConstraintNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5132"
+ editPartClassName="TimeConstraintAsLocalPrecondBodyEditPart"
+ itemSemanticEditPolicyClassName="TimeConstraintAsLocalPrecondBodyItemSemanticEditPolicy"
+ notationViewFactoryClassName="TimeConstraintSpecificationViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.22"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3037"
+ editPartClassName="TimeConstraintAsLocalPostcondEditPart"
+ itemSemanticEditPolicyClassName="TimeConstraintAsLocalPostcondItemSemanticEditPolicy"
+ notationViewFactoryClassName="TimeConstraintViewFactory"
+ canonicalEditPolicyClassName="TimeConstraintAsLocalPostcondCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="TimeConstraintAsLocalPostcondGraphicalNodeEditPolicy"
+ createCommandClassName="TimeConstraintAsLocalPostcondCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.TimeConstraint_3037"
+ displayName="TimeConstraint">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.185/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPostconditionConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.9">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeConstraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.31">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenReferenceNewElementSpec">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <newElementInitializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.32">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <elementClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeInterval"/>
+ </newElementInitializers>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5041"
+ editPartClassName="TimeConstraintAsLocalPostcondNameEditPart"
+ itemSemanticEditPolicyClassName="TimeConstraintAsLocalPostcondNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="TimeConstraintNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5133"
+ editPartClassName="TimeConstraintAsLocalPostcondBodyEditPart"
+ itemSemanticEditPolicyClassName="TimeConstraintAsLocalPostcondBodyItemSemanticEditPolicy"
+ notationViewFactoryClassName="TimeConstraintSpecificationViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.22"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3032"
+ editPartClassName="IntervalConstraintAsLocalPrecondEditPart"
+ itemSemanticEditPolicyClassName="IntervalConstraintAsLocalPrecondItemSemanticEditPolicy"
+ notationViewFactoryClassName="IntervalConstraintViewFactory"
+ canonicalEditPolicyClassName="IntervalConstraintAsLocalPrecondCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="IntervalConstraintAsLocalPrecondGraphicalNodeEditPolicy"
+ createCommandClassName="IntervalConstraintAsLocalPrecondCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.IntervalConstraint_3032"
+ displayName="IntervalConstraint">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.135/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPreconditionConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.10">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/IntervalConstraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.33">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenReferenceNewElementSpec">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <newElementInitializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.34">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <elementClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interval"/>
+ </newElementInitializers>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5036"
+ editPartClassName="IntervalConstraintAsLocalPrecondNameEditPart"
+ itemSemanticEditPolicyClassName="IntervalConstraintAsLocalPrecondNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="IntervalConstraintNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5134"
+ editPartClassName="IntervalConstraintAsLocalPrecondBodyEditPart"
+ itemSemanticEditPolicyClassName="IntervalConstraintAsLocalPrecondBodyItemSemanticEditPolicy"
+ notationViewFactoryClassName="IntervalConstraintSpecificationViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.22"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3033"
+ editPartClassName="IntervalConstraintAsLocalPostcondEditPart"
+ itemSemanticEditPolicyClassName="IntervalConstraintAsLocalPostcondItemSemanticEditPolicy"
+ notationViewFactoryClassName="IntervalConstraintViewFactory"
+ canonicalEditPolicyClassName="IntervalConstraintAsLocalPostcondCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="IntervalConstraintAsLocalPostcondGraphicalNodeEditPolicy"
+ createCommandClassName="IntervalConstraintAsLocalPostcondCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.IntervalConstraint_3033"
+ displayName="IntervalConstraint">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.135/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPostconditionConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.11">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/IntervalConstraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.35">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenReferenceNewElementSpec">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <newElementInitializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.36">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <elementClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interval"/>
+ </newElementInitializers>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5037"
+ editPartClassName="IntervalConstraintAsLocalPostcondNameEditPart"
+ itemSemanticEditPolicyClassName="IntervalConstraintAsLocalPostcondNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="IntervalConstraintNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5135"
+ editPartClassName="IntervalConstraintAsLocalPostcondBodyEditPart"
+ itemSemanticEditPolicyClassName="IntervalConstraintAsLocalPostcondBodyItemSemanticEditPolicy"
+ notationViewFactoryClassName="IntervalConstraintSpecificationViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.22"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3011"
+ editPartClassName="ConstraintAsLocalPrecondEditPart"
+ itemSemanticEditPolicyClassName="ConstraintAsLocalPrecondItemSemanticEditPolicy"
+ notationViewFactoryClassName="ConstraintViewFactory"
+ canonicalEditPolicyClassName="ConstraintAsLocalPrecondCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ConstraintAsLocalPrecondGraphicalNodeEditPolicy"
+ createCommandClassName="ConstraintAsLocalPrecondCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.0/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPreconditionConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.12">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.37">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenReferenceNewElementSpec">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <newElementInitializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.38">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <elementClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueExpression"/>
+ </newElementInitializers>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5007"
+ editPartClassName="ConstraintAsLocalPrecondNameEditPart"
+ itemSemanticEditPolicyClassName="ConstraintAsLocalPrecondNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ConstraintNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5136"
+ editPartClassName="ConstraintAsLocalPrecondBodyEditPart"
+ itemSemanticEditPolicyClassName="ConstraintAsLocalPrecondBodyItemSemanticEditPolicy"
+ notationViewFactoryClassName="ConstraintSpecificationViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.22"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3012"
+ editPartClassName="ConstraintAsLocalPostcondEditPart"
+ itemSemanticEditPolicyClassName="ConstraintAsLocalPostcondItemSemanticEditPolicy"
+ notationViewFactoryClassName="ConstraintViewFactory"
+ canonicalEditPolicyClassName="ConstraintAsLocalPostcondCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ConstraintAsLocalPostcondGraphicalNodeEditPolicy"
+ createCommandClassName="ConstraintAsLocalPostcondCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.0/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LocalPostconditionConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.13">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.39">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenReferenceNewElementSpec">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <newElementInitializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.40">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <elementClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OpaqueExpression"/>
+ </newElementInitializers>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5008"
+ editPartClassName="ConstraintAsLocalPostcondNameEditPart"
+ itemSemanticEditPolicyClassName="ConstraintAsLocalPostcondNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ConstraintNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5137"
+ editPartClassName="ConstraintAsLocalPostcondBodyEditPart"
+ itemSemanticEditPolicyClassName="ConstraintAsLocalPostcondBodyItemSemanticEditPolicy"
+ notationViewFactoryClassName="ConstraintSpecificationViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.22"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3038"
+ editPartClassName="DecisionNodeEditPart"
+ itemSemanticEditPolicyClassName="DecisionNodeItemSemanticEditPolicy"
+ notationViewFactoryClassName="DecisionNodeViewFactory"
+ canonicalEditPolicyClassName="DecisionNodeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DecisionNodeGraphicalNodeEditPolicy"
+ createCommandClassName="DecisionNodeCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.DecisionNode_3038"
+ displayName="DecisionNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.124/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DecisionNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.41">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6036"
+ editPartClassName="DecisionNodeFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="DecisionNodeFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5043"
+ editPartClassName="DecisionInputEditPart"
+ itemSemanticEditPolicyClassName="DecisionInputItemSemanticEditPolicy"
+ notationViewFactoryClassName="DecisionNodeLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="LinkAndCornerBentWithTextFigure"
+ classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class LinkAndCornerBentWithTextFigure extends org.eclipse.papyrus.uml.diagram.common.figure.node.CornerBentFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel fCornerBentContent; &#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.PolylineShape fLinkToBehaviorProperty; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public LinkAndCornerBentWithTextFigure() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;this.setBackgroundColor(THIS_BACK&#xD;&#xA;);&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fCornerBentContent = new org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this.add(fCornerBentContent);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fLinkToBehaviorProperty = new org.eclipse.draw2d.PolylineShape();&#xD;&#xA;fLinkToBehaviorProperty.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;this.add(fLinkToBehaviorProperty);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel getCornerBentContent() {&#xD;&#xA;&#x9;&#x9;return fCornerBentContent;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.PolylineShape getLinkToBehaviorProperty() {&#xD;&#xA;&#x9;&#x9;return fLinkToBehaviorProperty;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;static final org.eclipse.swt.graphics.Color THIS_BACK = new org.eclipse.swt.graphics.Color(null, 248, 249, 214);&#xD;&#xA;&#xD;&#xA;"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.10"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5098"
+ editPartClassName="DecisionNodeAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="DecisionNodeAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="DecisionNodeLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3039"
+ editPartClassName="MergeNodeEditPart"
+ itemSemanticEditPolicyClassName="MergeNodeItemSemanticEditPolicy"
+ notationViewFactoryClassName="MergeNodeViewFactory"
+ canonicalEditPolicyClassName="MergeNodeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="MergeNodeGraphicalNodeEditPolicy"
+ createCommandClassName="MergeNodeCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.MergeNode_3039"
+ displayName="MergeNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.160/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/MergeNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.42">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6037"
+ editPartClassName="MergeNodeFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="MergeNodeFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5099"
+ editPartClassName="MergeNodeAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="MergeNodeAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="MergeNodeLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3040"
+ editPartClassName="ForkNodeEditPart"
+ itemSemanticEditPolicyClassName="ForkNodeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ForkNodeViewFactory"
+ canonicalEditPolicyClassName="ForkNodeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ForkNodeGraphicalNodeEditPolicy"
+ createCommandClassName="ForkNodeCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ForkNode_3040"
+ displayName="ForkNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.145/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="10"
+ height="40"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ForkNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.43">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6038"
+ editPartClassName="ForkNodeFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="ForkNodeFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5100"
+ editPartClassName="ForkNodeAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ForkNodeAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ForkNodeLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3041"
+ editPartClassName="JoinNodeEditPart"
+ itemSemanticEditPolicyClassName="JoinNodeItemSemanticEditPolicy"
+ notationViewFactoryClassName="JoinNodeViewFactory"
+ canonicalEditPolicyClassName="JoinNodeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="JoinNodeGraphicalNodeEditPolicy"
+ createCommandClassName="JoinNodeCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.JoinNode_3041"
+ displayName="JoinNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.152/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="10"
+ height="40"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/JoinNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.44">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5042"
+ editPartClassName="JoinSpecEditPart"
+ itemSemanticEditPolicyClassName="JoinSpecItemSemanticEditPolicy"
+ notationViewFactoryClassName="JoinNodeLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.9"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6039"
+ editPartClassName="JoinNodeFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="JoinNodeFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5101"
+ editPartClassName="JoinNodeAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="JoinNodeAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="JoinNodeLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3078"
+ editPartClassName="DataStoreNodeEditPart"
+ itemSemanticEditPolicyClassName="DataStoreNodeItemSemanticEditPolicy"
+ notationViewFactoryClassName="DataStoreNodeViewFactory"
+ canonicalEditPolicyClassName="DataStoreNodeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DataStoreNodeGraphicalNodeEditPolicy"
+ createCommandClassName="DataStoreNodeCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.DataStoreNode_3078"
+ displayName="DataStoreNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.123/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataStoreNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.45">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5127"
+ editPartClassName="DataStoreNodeLabelEditPart"
+ itemSemanticEditPolicyClassName="DataStoreNodeLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="DataStoreNodeLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.20"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5128"
+ editPartClassName="DataStoreSelectionEditPart"
+ itemSemanticEditPolicyClassName="DataStoreSelectionItemSemanticEditPolicy"
+ notationViewFactoryClassName="DataStoreNodeLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="LinkAndCornerBentWithTextFigure"
+ classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class LinkAndCornerBentWithTextFigure extends org.eclipse.papyrus.uml.diagram.common.figure.node.CornerBentFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel fCornerBentContent; &#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.PolylineShape fLinkToBehaviorProperty; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public LinkAndCornerBentWithTextFigure() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;this.setBackgroundColor(THIS_BACK&#xD;&#xA;);&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fCornerBentContent = new org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this.add(fCornerBentContent);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fLinkToBehaviorProperty = new org.eclipse.draw2d.PolylineShape();&#xD;&#xA;fLinkToBehaviorProperty.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;this.add(fLinkToBehaviorProperty);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel getCornerBentContent() {&#xD;&#xA;&#x9;&#x9;return fCornerBentContent;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.PolylineShape getLinkToBehaviorProperty() {&#xD;&#xA;&#x9;&#x9;return fLinkToBehaviorProperty;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;static final org.eclipse.swt.graphics.Color THIS_BACK = new org.eclipse.swt.graphics.Color(null, 248, 249, 214);&#xD;&#xA;&#xD;&#xA;"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.21"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6031"
+ editPartClassName="DataStoreNodeFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="DataStoreNodeFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3042"
+ editPartClassName="SendObjectActionEditPart"
+ itemSemanticEditPolicyClassName="SendObjectActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="SendObjectActionViewFactory"
+ canonicalEditPolicyClassName="SendObjectActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.38 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.43"
+ graphicalNodeEditPolicyClassName="SendObjectActionGraphicalNodeEditPolicy"
+ createCommandClassName="SendObjectActionCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.SendObjectAction_3042"
+ displayName="SendObjectAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.177/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.46">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5059"
+ editPartClassName="SendObjectActionNameEditPart"
+ itemSemanticEditPolicyClassName="SendObjectActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="SendObjectActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6027"
+ editPartClassName="SendObjectActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="SendObjectActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3046"
+ editPartClassName="ValuePinInSendObjActAsReqEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendObjActAsReqItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinViewFactory"
+ canonicalEditPolicyClassName="ValuePinInSendObjActAsReqCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ValuePinInSendObjActAsReqGraphicalNodeEditPolicy"
+ createCommandClassName="ValuePinInSendObjActAsReqCreateCommand"
+ containers="/0/@diagram/@childNodes.37"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3046"
+ displayName="ValuePin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.14">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/request"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/request"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.47">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5049"
+ editPartClassName="ValuePinInSendObjActAsReqLabelEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendObjActAsReqLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5050"
+ editPartClassName="ValuePinInSendObjActAsReqValueEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendObjActAsReqValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5102"
+ editPartClassName="ValuePinInSendObjActAsReqAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendObjActAsReqAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3047"
+ editPartClassName="ActionInputPinInSendObjActAsReqEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsReqItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinViewFactory"
+ canonicalEditPolicyClassName="ActionInputPinInSendObjActAsReqCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ActionInputPinInSendObjActAsReqGraphicalNodeEditPolicy"
+ createCommandClassName="ActionInputPinInSendObjActAsReqCreateCommand"
+ containers="/0/@diagram/@childNodes.37"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3047"
+ displayName="ActionInputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.15">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/request"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/request"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.48">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5051"
+ editPartClassName="ActionInputPinInSendObjActAsReqLabelEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsReqLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5052"
+ editPartClassName="ActionInputPinInSendObjActAsReqValueEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsReqValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5103"
+ editPartClassName="ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsReqAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3048"
+ editPartClassName="InputPinInSendObjActAsReqEditPart"
+ itemSemanticEditPolicyClassName="InputPinInSendObjActAsReqItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInSendObjActAsReqCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInSendObjActAsReqGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInSendObjActAsReqCreateCommand"
+ containers="/0/@diagram/@childNodes.37"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3048"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.16">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/request"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/request"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.49">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5053"
+ editPartClassName="InputPinInSendObjActAsReqLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInSendObjActAsReqLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5104"
+ editPartClassName="InputPinInSendObjActAsReqAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="InputPinInSendObjActAsReqAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3049"
+ editPartClassName="ValuePinInSendObjActAsTargetEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendObjActAsTargetItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinViewFactory"
+ canonicalEditPolicyClassName="ValuePinInSendObjActAsTargetCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ValuePinInSendObjActAsTargetGraphicalNodeEditPolicy"
+ createCommandClassName="ValuePinInSendObjActAsTargetCreateCommand"
+ containers="/0/@diagram/@childNodes.37"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3049"
+ displayName="ValuePin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.17">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/target"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/target"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.50">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5054"
+ editPartClassName="ValuePinInSendObjActAsTargetLabelEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendObjActAsTargetLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5055"
+ editPartClassName="ValuePinInSendObjActAsTargetValueEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendObjActAsTargetItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5105"
+ editPartClassName="ValuePinInSendObjActAsTargetAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendObjActAsTargetAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3050"
+ editPartClassName="ActionInputPinInSendObjActAsTargetEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsTargetItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinViewFactory"
+ canonicalEditPolicyClassName="ActionInputPinInSendObjActAsTargetCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ActionInputPinInSendObjActAsTargetGraphicalNodeEditPolicy"
+ createCommandClassName="ActionInputPinInSendObjActAsTargetCreateCommand"
+ containers="/0/@diagram/@childNodes.37"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3050"
+ displayName="ActionInputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.18">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/target"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/target"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.51">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5056"
+ editPartClassName="ActionInputPinInSendObjActAsTargetLabelEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsTargetLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5057"
+ editPartClassName="ActionInputPinInSendObjActAsTargetValueEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsTargetValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5106"
+ editPartClassName="ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendObjActAsTargetAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3051"
+ editPartClassName="InputPinInSendObjActAsTargetEditPart"
+ itemSemanticEditPolicyClassName="InputPinInSendObjActAsTargetItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInSendObjActAsTargetCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInSendObjActAsTargetGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInSendObjActAsTargetCreateCommand"
+ containers="/0/@diagram/@childNodes.37"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3051"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.19">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/target"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendObjectAction/target"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.52">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5058"
+ editPartClassName="InputPinInSendObjActAsTargetLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInSendObjActAsTargetLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5107"
+ editPartClassName="InputPinInSendObjActAsTargetAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="InputPinInSendObjActAsTargetAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3052"
+ editPartClassName="SendSignalActionEditPart"
+ itemSemanticEditPolicyClassName="SendSignalActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="SendSignalActionViewFactory"
+ canonicalEditPolicyClassName="SendSignalActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.45 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.50"
+ graphicalNodeEditPolicyClassName="SendSignalActionGraphicalNodeEditPolicy"
+ createCommandClassName="SendSignalActionCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.SendSignalAction_3052"
+ displayName="SendSignalAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.178/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendSignalActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.53">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5060"
+ editPartClassName="SendSignalActionNameEditPart"
+ itemSemanticEditPolicyClassName="SendSignalActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="SendSignalActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6032"
+ editPartClassName="SendSignalActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="SendSignalActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3053"
+ editPartClassName="ActionInputPinInSendSigActEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendSigActItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinViewFactory"
+ canonicalEditPolicyClassName="ActionInputPinInSendSigActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ActionInputPinInSendSigActGraphicalNodeEditPolicy"
+ createCommandClassName="ActionInputPinInSendSigActCreateCommand"
+ containers="/0/@diagram/@childNodes.44"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3053"
+ displayName="ActionInputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.20">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.54">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5061"
+ editPartClassName="ActionInputPinInSendSigActLabelEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendSigActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5062"
+ editPartClassName="ActionInputPinInSendSigActValueEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendSigActValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5108"
+ editPartClassName="ActionInputPinInSendSigActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendSigActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3054"
+ editPartClassName="ValuePinInSendSigActEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendSigActItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinViewFactory"
+ canonicalEditPolicyClassName="ValuePinInSendSigActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ValuePinInSendSigActGraphicalNodeEditPolicy"
+ createCommandClassName="ValuePinInSendSigActCreateCommand"
+ containers="/0/@diagram/@childNodes.44"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3054"
+ displayName="ValuePin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.21">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.55">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5063"
+ editPartClassName="ValuePinInSendSigActLabelEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendSigActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5064"
+ editPartClassName="ValuePinInSendSigActValueEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendSigActValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5109"
+ editPartClassName="ValuePinInSendSigActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendSigActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3055"
+ editPartClassName="InputPinInSendSigActEditPart"
+ itemSemanticEditPolicyClassName="InputPinInSendSigActItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInSendSigActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInSendSigActGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInSendSigActCreateCommand"
+ containers="/0/@diagram/@childNodes.44"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3055"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.22">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.56">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5065"
+ editPartClassName="InputPinInSendSigActLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInSendSigActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5110"
+ editPartClassName="InputPinInSendSigActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="InputPinInSendSigActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3060"
+ editPartClassName="ValuePinInSendSigActAsTargetEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendSigActAsTargetItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinViewFactory"
+ canonicalEditPolicyClassName="ValuePinInSendSigActAsTargetCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ValuePinInSendSigActAsTargetGraphicalNodeEditPolicy"
+ createCommandClassName="ValuePinInSendSigActAsTargetCreateCommand"
+ containers="/0/@diagram/@childNodes.44"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValuePin_3060"
+ displayName="ValuePin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.191/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.PinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.23">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValuePin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction/target"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction/target"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.57">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5072"
+ editPartClassName="ValuePinInSendSigActAsTargetLabelEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendSigActAsTargetLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5073"
+ editPartClassName="ValuePinInSendSigActAsTargetValueEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendSigActAsTargetValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5111"
+ editPartClassName="ValuePinInSendSigActAsTargetAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ValuePinInSendSigActAsTargetAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValuePinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3061"
+ editPartClassName="ActionInputPinInSendSigActAsTargetEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendSigActAsTargetItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinViewFactory"
+ canonicalEditPolicyClassName="ActionInputPinInSendSigActAsTargetCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ActionInputPinInSendSigActAsTargetGraphicalNodeEditPolicy"
+ createCommandClassName="ActionInputPinInSendSigActAsTargetCreateCommand"
+ containers="/0/@diagram/@childNodes.44"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActionInputPin_3061"
+ displayName="ActionInputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.91/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.24">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActionInputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction/target"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction/target"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.58">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5074"
+ editPartClassName="ActionInputPinInSendSigActAsTargetLabelEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendSigActAsTargetLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5075"
+ editPartClassName="ActionInputPinInSendSigActAsTargetValueEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendSigActAsTargetValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5112"
+ editPartClassName="ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ActionInputPinInSendSigActAsTargetAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionInputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3062"
+ editPartClassName="InputPinInSendSigActAsTargetEditPart"
+ itemSemanticEditPolicyClassName="InputPinInSendSigActAsTargetItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInSendSigActAsTargetCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInSendSigActAsTargetGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInSendSigActAsTargetCreateCommand"
+ containers="/0/@diagram/@childNodes.44"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3062"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.25">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction/target"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SendSignalAction/target"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.59">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5076"
+ editPartClassName="InputPinInSendSigActAsTargetLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInSendSigActAsTargetLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5113"
+ editPartClassName="InputPinInSendSigActAsTargetAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="InputPinInSendSigActAsTargetAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3059"
+ editPartClassName="ActivityParameterNodeEditPart"
+ itemSemanticEditPolicyClassName="ActivityParameterNodeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityParameterNodeViewFactory"
+ canonicalEditPolicyClassName="ActivityParameterNodeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ActivityParameterNodeGraphicalNodeEditPolicy"
+ createCommandClassName="ActivityParameterNodeCreateCommand"
+ containers="/0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.72 /0/@diagram/@compartments.14"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActivityParameterNode_3059"
+ displayName="ActivityParameterNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.93/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityParameterNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.60">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.61">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectNode/isControlType"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5071"
+ editPartClassName="ParameterNodeNameEditPart"
+ itemSemanticEditPolicyClassName="ParameterNodeNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityParameterNodeLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.15"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3063"
+ editPartClassName="AcceptEventActionEditPart"
+ itemSemanticEditPolicyClassName="AcceptEventActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="AcceptEventActionViewFactory"
+ canonicalEditPolicyClassName="AcceptEventActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.53"
+ graphicalNodeEditPolicyClassName="AcceptEventActionGraphicalNodeEditPolicy"
+ createCommandClassName="AcceptEventActionCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.AcceptEventAction_3063"
+ displayName="AcceptEventAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.71/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.AcceptEventActionFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.AcceptEventActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AcceptEventAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.62">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5078"
+ editPartClassName="AcceptEventActionLabelEditPart"
+ itemSemanticEditPolicyClassName="AcceptEventActionLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="AcceptEventActionLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.16"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5079"
+ editPartClassName="AcceptTimeEventActionLabelEditPart"
+ itemSemanticEditPolicyClassName="AcceptTimeEventActionLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="AcceptEventActionLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.17"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5115"
+ editPartClassName="AcceptTimeEventActionAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="AcceptTimeEventActionAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="AcceptEventActionLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.AcceptTimeEventActionStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6040"
+ editPartClassName="AcceptEventActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="AcceptEventActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3064"
+ editPartClassName="OutputPinInAcceptEventActionEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInAcceptEventActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinViewFactory"
+ canonicalEditPolicyClassName="OutputPinInAcceptEventActionCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OutputPinInAcceptEventActionGraphicalNodeEditPolicy"
+ createCommandClassName="OutputPinInAcceptEventActionCreateCommand"
+ containers="/0/@diagram/@childNodes.52"
+ preferredSideName="EAST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3064"
+ displayName="OutputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AcceptEventAction/result"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AcceptEventAction/result"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.63">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5077"
+ editPartClassName="OutputPinInAcceptEventActionLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInAcceptEventActionLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5114"
+ editPartClassName="OutputPinInAcceptEventActionAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInAcceptEventActionAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3076"
+ editPartClassName="ValueSpecificationActionEditPart"
+ itemSemanticEditPolicyClassName="ValueSpecificationActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValueSpecificationActionViewFactory"
+ canonicalEditPolicyClassName="ValueSpecificationActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.55"
+ graphicalNodeEditPolicyClassName="ValueSpecificationActionGraphicalNodeEditPolicy"
+ createCommandClassName="ValueSpecificationActionCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ValueSpecificationAction_3076"
+ displayName="ValueSpecificationAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.192/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValueSpecificationAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.64">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5126"
+ editPartClassName="ValueSpecificationActionNameEditPart"
+ itemSemanticEditPolicyClassName="ValueSpecificationActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ValueSpecificationActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6026"
+ editPartClassName="ValueSpecificationActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="ValueSpecificationActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3077"
+ editPartClassName="OutputPinInValSpecActEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInValSpecActItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinViewFactory"
+ canonicalEditPolicyClassName="OutputPinInValSpecActCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OutputPinInValSpecActGraphicalNodeEditPolicy"
+ createCommandClassName="OutputPinInValSpecActCreateCommand"
+ containers="/0/@diagram/@childNodes.54"
+ preferredSideName="EAST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3077"
+ displayName="OutputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValueSpecificationAction/result"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ValueSpecificationAction/result"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.65">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5124"
+ editPartClassName="OutputPinInValSpecActLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInValSpecActLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5125"
+ editPartClassName="OutputPinInValSpecActAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInValSpecActAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3069"
+ editPartClassName="ConditionalNodeEditPart"
+ itemSemanticEditPolicyClassName="ConditionalNodeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ConditionalNodeViewFactory"
+ canonicalEditPolicyClassName="ConditionalNodeCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.4"
+ graphicalNodeEditPolicyClassName="ConditionalNodeGraphicalNodeEditPolicy"
+ createCommandClassName="ConditionalNodeCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ConditionalNode_3069"
+ displayName="ConditionalNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.113/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ConditionalNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/structuredNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.66">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5119"
+ editPartClassName="ConditionalNodeKeywordEditPart"
+ itemSemanticEditPolicyClassName="ConditionalNodeKeywordItemSemanticEditPolicy"
+ notationViewFactoryClassName="ConditionalNodeLabelViewFactory"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.18"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3070"
+ editPartClassName="ExpansionRegionEditPart"
+ itemSemanticEditPolicyClassName="ExpansionRegionItemSemanticEditPolicy"
+ notationViewFactoryClassName="ExpansionRegionViewFactory"
+ canonicalEditPolicyClassName="ExpansionRegionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.58 /0/@diagram/@childNodes.59"
+ compartments="/0/@diagram/@compartments.5"
+ graphicalNodeEditPolicyClassName="ExpansionRegionGraphicalNodeEditPolicy"
+ createCommandClassName="ExpansionRegionCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ExpansionRegion_3070"
+ displayName="ExpansionRegion">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.142/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExpansionRegion"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/structuredNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.67">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5120"
+ editPartClassName="ExpansionRegionKeywordEditPart"
+ itemSemanticEditPolicyClassName="ExpansionRegionKeywordItemSemanticEditPolicy"
+ notationViewFactoryClassName="ExpansionRegionLabelViewFactory"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.18"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3074"
+ editPartClassName="ExpansionNodeAsInEditPart"
+ itemSemanticEditPolicyClassName="ExpansionNodeAsInItemSemanticEditPolicy"
+ notationViewFactoryClassName="ExpansionNodeViewFactory"
+ canonicalEditPolicyClassName="ExpansionNodeAsInCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ExpansionNodeAsInGraphicalNodeEditPolicy"
+ createCommandClassName="ExpansionNodeAsInCreateCommand"
+ containers="/0/@diagram/@childNodes.57"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ExpansionNode_3074"
+ displayName="ExpansionNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.141/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="ExpansionNodeDescriptor"
+ classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class ExpansionNodeDescriptor extends org.eclipse.draw2d.ScalablePolygonShape {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public ExpansionNodeDescriptor() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(48)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(48)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(36)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(36)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(36)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(24)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(24)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(24)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(12)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(12)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(12)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.setFill(true);&#xD;&#xA;this.setMaximumSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(48)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="48"
+ height="16"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.26">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExpansionNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredActivityNode/node"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExpansionRegion/inputElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.68">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3075"
+ editPartClassName="ExpansionNodeAsOutEditPart"
+ itemSemanticEditPolicyClassName="ExpansionNodeAsOutItemSemanticEditPolicy"
+ notationViewFactoryClassName="ExpansionNodeViewFactory"
+ canonicalEditPolicyClassName="ExpansionNodeAsOutCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ExpansionNodeAsOutGraphicalNodeEditPolicy"
+ createCommandClassName="ExpansionNodeAsOutCreateCommand"
+ containers="/0/@diagram/@childNodes.57"
+ preferredSideName="SOUTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ExpansionNode_3075"
+ displayName="ExpansionNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.141/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="ExpansionNodeDescriptor"
+ classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class ExpansionNodeDescriptor extends org.eclipse.draw2d.ScalablePolygonShape {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public ExpansionNodeDescriptor() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(48)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(48)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(36)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(36)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(36)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(24)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(24)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(24)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(12)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(12)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(12)&#xD;&#xA;, getMapMode().DPtoLP(0)&#xD;&#xA;));&#xD;&#xA;this.setFill(true);&#xD;&#xA;this.setMaximumSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(48)&#xD;&#xA;, getMapMode().DPtoLP(16)&#xD;&#xA;));&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="48"
+ height="16"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.27">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExpansionNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredActivityNode/node"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExpansionRegion/outputElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.69">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ </childNodes>
+ <childNodes
+ visualID="3071"
+ editPartClassName="LoopNodeEditPart"
+ itemSemanticEditPolicyClassName="LoopNodeItemSemanticEditPolicy"
+ notationViewFactoryClassName="LoopNodeViewFactory"
+ canonicalEditPolicyClassName="LoopNodeCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.66 /0/@diagram/@childNodes.63 /0/@diagram/@childNodes.61 /0/@diagram/@childNodes.62"
+ compartments="/0/@diagram/@compartments.6"
+ graphicalNodeEditPolicyClassName="LoopNodeGraphicalNodeEditPolicy"
+ createCommandClassName="LoopNodeCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.LoopNode_3071"
+ displayName="LoopNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.159/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/structuredNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.70">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5121"
+ editPartClassName="LoopNodeKeywordEditPart"
+ itemSemanticEditPolicyClassName="LoopNodeKeywordItemSemanticEditPolicy"
+ notationViewFactoryClassName="LoopNodeLabelViewFactory"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.18"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3109"
+ editPartClassName="OutputPinInLoopNodeAsBodyOutputEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsBodyOutputItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="OutputPinInLoopNodeAsBodyOutputCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OutputPinInLoopNodeAsBodyOutputGraphicalNodeEditPolicy"
+ createCommandClassName="OutputPinInLoopNodeAsBodyOutputVariableCreateCommand"
+ containers="/0/@diagram/@childNodes.60"
+ preferredSideName="EAST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3109"
+ displayName="OutputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/bodyOutput"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/bodyOutput"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.63">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5184"
+ editPartClassName="OutputPinInLoopNodeAsBodyOutputLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsBodyOutputLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5185"
+ editPartClassName="OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsBodyOutputAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3110"
+ editPartClassName="OutputPinInLoopNodeAsLoopVariableEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsLoopVariableItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="OutputPinInLoopNodeAsLoopVariableCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OutputPinInLoopNodeAsLoopVariableGraphicalNodeEditPolicy"
+ createCommandClassName="OutputPinInLoopNodeAsLoopVariableCreateCommand"
+ containers="/0/@diagram/@childNodes.60"
+ preferredSideName="EAST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3110"
+ displayName="OutputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/loopVariable"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/loopVariable"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.63">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5186"
+ editPartClassName="OutputPinInLoopNodeAsLoopVariableLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsLoopVariableLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5183"
+ editPartClassName="OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsLoopVariableAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3111"
+ editPartClassName="OutputPinInLoopNodeAsResultEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsResultItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="OutputPinInLoopNodeAsResultCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OutputPinInLoopNodeAsResultGraphicalNodeEditPolicy"
+ createCommandClassName="OutputPinInLoopNodeAsResultCreateCommand"
+ containers="/0/@diagram/@childNodes.60"
+ preferredSideName="EAST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3111"
+ displayName="OutputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/result"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/result"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.63">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5187"
+ editPartClassName="OutputPinInLoopNodeAsResultLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsResultLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5188"
+ editPartClassName="OutputPinInLoopNodeAsResultAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInLoopNodeAsResultAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3073"
+ editPartClassName="SequenceNodeEditPart"
+ itemSemanticEditPolicyClassName="SequenceNodeItemSemanticEditPolicy"
+ notationViewFactoryClassName="SequenceNodeViewFactory"
+ canonicalEditPolicyClassName="SequenceNodeCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.7"
+ graphicalNodeEditPolicyClassName="SequenceNodeGraphicalNodeEditPolicy"
+ createCommandClassName="SequenceNodeCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.SequenceNode_3073"
+ displayName="SequenceNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.179/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/SequenceNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/structuredNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.71">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5123"
+ editPartClassName="SequenceNodeKeywordEditPart"
+ itemSemanticEditPolicyClassName="SequenceNodeKeywordItemSemanticEditPolicy"
+ notationViewFactoryClassName="SequenceNodeLabelViewFactory"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.18"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3065"
+ editPartClassName="StructuredActivityNodeEditPart"
+ itemSemanticEditPolicyClassName="StructuredActivityNodeItemSemanticEditPolicy"
+ notationViewFactoryClassName="StructuredActivityNodeViewFactory"
+ canonicalEditPolicyClassName="StructuredActivityNodeCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.8"
+ graphicalNodeEditPolicyClassName="StructuredActivityNodeGraphicalNodeEditPolicy"
+ createCommandClassName="StructuredActivityNodeCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.StructuredActivityNode_3065"
+ displayName="StructuredActivityNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.74/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredActivityNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/structuredNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.72">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5117"
+ editPartClassName="StructuredActivityNodeKeywordEditPart"
+ itemSemanticEditPolicyClassName="StructuredActivityNodeKeywordItemSemanticEditPolicy"
+ notationViewFactoryClassName="StructuredActivityNodeLabelViewFactory"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.18"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3105"
+ editPartClassName="InputPinInLoopNodeAsVariableEditPart"
+ itemSemanticEditPolicyClassName="InputPinInLoopNodeAsVariableItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InputPinInLoopNodeAsVariableCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInLoopNodeAsVariableGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInLoopNodeAsVariableCreateCommand"
+ containers="/0/@diagram/@childNodes.60"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3105"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/loopVariableInput"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/LoopNode/loopVariableInput"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.49">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5178"
+ editPartClassName="InputPinInLoopNodeAsVariableLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInLoopNodeAsVariableLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5179"
+ editPartClassName="InputPinInStructuredActivityNodeAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="InputPinInStructuredActivityNodeAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3067"
+ editPartClassName="ActivityPartitionEditPart"
+ itemSemanticEditPolicyClassName="ActivityPartitionItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityPartitionViewFactory"
+ canonicalEditPolicyClassName="ActivityPartitionCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.9"
+ graphicalNodeEditPolicyClassName="ActivityPartitionGraphicalNodeEditPolicy"
+ createCommandClassName="ActivityPartitionCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.9">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ActivityPartition_3067"
+ displayName="ActivityPartition">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.73/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.ActivityPartitionFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityPartition"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.73">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5118"
+ editPartClassName="ActivityPartitionNameEditPart"
+ itemSemanticEditPolicyClassName="ActivityPartitionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityPartitionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPartitionLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6016"
+ editPartClassName="ActivityPartitionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="ActivityPartitionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3068"
+ editPartClassName="InterruptibleActivityRegionEditPart"
+ itemSemanticEditPolicyClassName="InterruptibleActivityRegionItemSemanticEditPolicy"
+ notationViewFactoryClassName="InterruptibleActivityRegionViewFactory"
+ canonicalEditPolicyClassName="InterruptibleActivityRegionCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.10"
+ graphicalNodeEditPolicyClassName="InterruptibleActivityRegionGraphicalNodeEditPolicy"
+ createCommandClassName="InterruptibleActivityRegionCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InterruptibleActivityRegion_3068"
+ displayName="InterruptibleActivityRegion">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.78/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figures.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InterruptibleActivityRegion"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedGroup"/>
+ </modelFacet>
+ </childNodes>
+ <childNodes
+ visualID="3080"
+ editPartClassName="CommentEditPartCN"
+ itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicy"
+ notationViewFactoryClassName="CommentViewFactory"
+ canonicalEditPolicyClassName="CommentCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicy"
+ createCommandClassName="CommentCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.8 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.Comment_3080"
+ displayName="Comment">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.4/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.28">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5138"
+ editPartClassName="CommentBodyLabelEditPart"
+ itemSemanticEditPolicyClassName="CommentBodyLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="CommentBodyViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCornerBentFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.23">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3081"
+ editPartClassName="ReadSelfActionEditPart"
+ itemSemanticEditPolicyClassName="ReadSelfActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="ReadSelfActionViewFactory"
+ canonicalEditPolicyClassName="ReadSelfActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.71"
+ graphicalNodeEditPolicyClassName="ReadSelfActionGraphicalNodeEditPolicy"
+ createCommandClassName="ReadSelfActionCreateCommand"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.14 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ReadSelfAction_3081"
+ displayName="ReadSelfAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.169/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadSelfAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.74">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5139"
+ editPartClassName="ReadSelfActionNameEditPart"
+ itemSemanticEditPolicyClassName="ReadSelfActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ReadSelfActionLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6025"
+ editPartClassName="ReadSelfActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="ReadSelfActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3084"
+ editPartClassName="ReadSelfActionOutputPinEditPart"
+ itemSemanticEditPolicyClassName="ReadSelfActionOutputPinItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinViewFactory"
+ canonicalEditPolicyClassName="ReadSelfActionOutputPinCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ReadSelfActionOutputPinGraphicalNodeEditPolicy"
+ createCommandClassName="ReadSelfActionOutputPinCreateCommand"
+ containers="/0/@diagram/@childNodes.70"
+ preferredSideName="EAST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadSelfAction/result"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadSelfAction/result"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.75">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5144"
+ editPartClassName="OutputPinInReadSelfActionLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInReadSelfActionLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5145"
+ editPartClassName="OutputPinInReadSelfActionAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInReadSelfActionAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3083"
+ editPartClassName="ActivityEditPartCN"
+ itemSemanticEditPolicyClassName="ActivityItemSemanticEditPolicyCN"
+ notationViewFactoryClassName="ActivityViewFactory"
+ canonicalEditPolicyClassName="ActivityCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.51"
+ compartments="/0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14"
+ graphicalNodeEditPolicyClassName="ActivityGraphicalNodeEditPolicyCN"
+ createCommandClassName="ActivityCreateCommandCN"
+ containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.72/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="200"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/BehavioredClassifier/ownedBehavior"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/BehavioredClassifier/ownedBehavior"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5142"
+ editPartClassName="ActivityNameEditPartCN"
+ itemSemanticEditPolicyClassName="ActivityNameEditPartItemSemanticEditPolicyCN"
+ notationViewFactoryClassName="OpaqueActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5143"
+ editPartClassName="ActivityIsSingleExecutionCNEditPart"
+ itemSemanticEditPolicyClassName="ActivityIsSingleExecutionCNItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityIsSingleExecutionViewFactory"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getHeaderSingleExecution"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.2">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/isSingleExecution"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3086"
+ editPartClassName="CreateObjectActionEditPart"
+ itemSemanticEditPolicyClassName="CreateObjectActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="CreateObjectActionViewFactory"
+ canonicalEditPolicyClassName="CreateObjectActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.74"
+ graphicalNodeEditPolicyClassName="CreateObjectActionGraphicalNodeEditPolicy"
+ createCommandClassName="CreateObjectActionCreateCommand"
+ containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.CreateObjectAction_3086"
+ displayName="CreateObjectAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.122/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CreateObjectAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.76">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5148"
+ editPartClassName="CreateObjectActionNameEditPart"
+ itemSemanticEditPolicyClassName="CreateObjectActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="CreateObjectActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6024"
+ editPartClassName="CreateObjectActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="CreateObjectActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3087"
+ editPartClassName="OutputPinInCreateObjectActionAsResultEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInCreateObjectActionAsResultItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinViewFactory"
+ canonicalEditPolicyClassName="OutputPinInCreateObjectActionAsResultCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OutputPinInCreateObjectActionAsResultGraphicalNodeEditPolicy"
+ createCommandClassName="OutputPinInCreateObjectActionAsResultCreateCommand"
+ containers="/0/@diagram/@childNodes.73"
+ preferredSideName="SOUTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3087"
+ displayName="OutputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CreateObjectAction/result"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CreateObjectAction/result"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.77">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5146"
+ editPartClassName="OutputPinInCreateObjectActionAsResultLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInCreateObjectActionAsResultLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5147"
+ editPartClassName="OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3085"
+ editPartClassName="ShapeNamedElementEditPart"
+ itemSemanticEditPolicyClassName="ShapeNamedElementItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ShapeNamedElementCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ShapeNamedElementGraphicalNodeEditPolicy"
+ createCommandClassName="ShapeNamedElementCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.NamedElement_3085"
+ displayName="ShapeNamedElement"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ShapeNamedElementFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedElement"/>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5129"
+ editPartClassName="ShapeNamedElementNameEditPart"
+ itemSemanticEditPolicyClassName="ShapeNamedElementNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.2">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3088"
+ editPartClassName="ReadStructuralFeatureActionEditPart"
+ itemSemanticEditPolicyClassName="ReadStructuralFeatureActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="ReadStructuralFeatureActionViewFactory"
+ canonicalEditPolicyClassName="ReadStructuralFeatureActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.77 /0/@diagram/@childNodes.78"
+ graphicalNodeEditPolicyClassName="ReadStructuralFeatureActionGraphicalNodeEditPolicy"
+ createCommandClassName="ReadStructuralFeatureActionCreateCommand"
+ containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ReadStructuralFeatureAction_3088"
+ displayName="ReadStructuralFeatureAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.170/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadStructuralFeatureAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.78">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5153"
+ editPartClassName="ReadStructuralFeatureActionNameEditPart"
+ itemSemanticEditPolicyClassName="ReadStructuralFeatureActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ReadStructuralFeatureActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6023"
+ editPartClassName="ReadStructuralFeatureActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="ReadStructuralFeatureActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3089"
+ editPartClassName="InputPinInReadStructuralFeatureAsObjectEditPart"
+ itemSemanticEditPolicyClassName="InputPinInReadStructuralFeatureAsObjectItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInReadStructuralFeatureAsObjectCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInReadStructuralFeatureAsObjectGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInReadStructuralFeatureAsObjectCreateCommand"
+ containers="/0/@diagram/@childNodes.76"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3089"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction/object"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction/object"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.79">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5149"
+ editPartClassName="InputPinInReadStructuralFeatureAsObjectLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInReadStructuralFeatureAsObjectLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5150"
+ editPartClassName="InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3090"
+ editPartClassName="OutputPinInReadStructuralFeatureAsResultEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInReadStructuralFeatureAsResultItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinViewFactory"
+ canonicalEditPolicyClassName="OutputPinInReadStructuralFeatureAsResultCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OutputPinInReadStructuralFeatureAsResultGraphicalNodeEditPolicy"
+ createCommandClassName="OutputPinInReadStructuralFeatureAsResultCreateCommand"
+ containers="/0/@diagram/@childNodes.76"
+ preferredSideName="SOUTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3090"
+ displayName="OutputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadStructuralFeatureAction/result"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadStructuralFeatureAction/result"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.80">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5151"
+ editPartClassName="OutputPinInReadStructuralFeatureAsResultLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInReadStructuralFeatureAsResultLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5152"
+ editPartClassName="InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInReadStructuralFeatureAsResultAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3091"
+ editPartClassName="AddStructuralFeatureValueActionEditPart"
+ itemSemanticEditPolicyClassName="AddStructuralFeatureValueActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="AddStructuralFeatureValueActionViewFactory"
+ canonicalEditPolicyClassName="AddStructuralFeatureValueActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.80 /0/@diagram/@childNodes.81 /0/@diagram/@childNodes.82"
+ graphicalNodeEditPolicyClassName="AddStructuralFeatureValueActionGraphicalNodeEditPolicy"
+ createCommandClassName="AddStructuralFeatureValueActionCreateCommand"
+ containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.AddStructuralFeatureValueAction_3091"
+ displayName="AddStructuralFeatureValueAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.95/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddStructuralFeatureValueAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.81">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5160"
+ editPartClassName="AddStructuralFeatureValueActionNameEditPart"
+ itemSemanticEditPolicyClassName="AddStructuralFeatureValueActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="AddStructuralFeatureValueActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6019"
+ editPartClassName="AddStructuralFeatureValueActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="AddStructuralFeatureValueActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3092"
+ editPartClassName="InputPinInAddStructuralFeatureValueActionAsObjectEditPart"
+ itemSemanticEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsObjectItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsObjectCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsObjectGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand"
+ containers="/0/@diagram/@childNodes.79"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3092"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.29">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction/object"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuralFeatureAction/object"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.82">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5154"
+ editPartClassName="InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsObjectLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5155"
+ editPartClassName="InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3093"
+ editPartClassName="InputPinInAddStructuralFeatureValueActionAsValueEditPart"
+ itemSemanticEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsValueCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsValueGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInAddStructuralFeatureValueActionAsValueCreateCommand"
+ containers="/0/@diagram/@childNodes.79"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3093"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.30">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteStructuralFeatureAction/value"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteStructuralFeatureAction/value"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.83">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5156"
+ editPartClassName="InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart"
+ itemSemanticEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsValueLabel2ItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5157"
+ editPartClassName="InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart"
+ itemSemanticEditPolicyClassName="InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2ItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3094"
+ editPartClassName="OutputPinInAddStructuralFeatureValueActionAsResultEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInAddStructuralFeatureValueActionAsResultItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinViewFactory"
+ canonicalEditPolicyClassName="OutputPinInAddStructuralFeatureValueActionAsResultCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OutputPinInAddStructuralFeatureValueActionAsResultGraphicalNodeEditPolicy"
+ createCommandClassName="OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand"
+ containers="/0/@diagram/@childNodes.79"
+ preferredSideName="SOUTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3094"
+ displayName="OutputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteStructuralFeatureAction/result"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteStructuralFeatureAction/result"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.84">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5158"
+ editPartClassName="OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart"
+ itemSemanticEditPolicyClassName="OutputPinInAddStructuralFeatureValueActionAsResultLabel3ItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5159"
+ editPartClassName="OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart"
+ itemSemanticEditPolicyClassName="OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3ItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3095"
+ editPartClassName="DestroyObjectActionEditPart"
+ itemSemanticEditPolicyClassName="DestroyObjectActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="DestroyObjectActionViewFactory"
+ canonicalEditPolicyClassName="DestroyObjectActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.84"
+ graphicalNodeEditPolicyClassName="DestroyObjectActionGraphicalNodeEditPolicy"
+ createCommandClassName="DestroyObjectActionCreateCommand"
+ containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.DestroyObjectAction_3095"
+ displayName="DestroyObjectAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.128/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DestroyObjectAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.85">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5163"
+ editPartClassName="DestroyObjectActionNameEditPart"
+ itemSemanticEditPolicyClassName="DestroyObjectActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="DestroyObjectActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6022"
+ editPartClassName="DestroyObjectActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="DestroyObjectActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3096"
+ editPartClassName="InputPinInDestroyObjectActionEditPart"
+ itemSemanticEditPolicyClassName="InputPinInDestroyObjectActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInDestroyObjectActionCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInDestroyObjectActionGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInDestroyObjectActionCreateCommand"
+ containers="/0/@diagram/@childNodes.83"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3096"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.31">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DestroyObjectAction/target"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DestroyObjectAction/target"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.86">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5161"
+ editPartClassName="InputPinInDestroyObjectActionLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInDestroyObjectActionLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5162"
+ editPartClassName="InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3097"
+ editPartClassName="ReadVariableActionEditPart"
+ itemSemanticEditPolicyClassName="ReadVariableActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="ReadVariableActionViewFactory"
+ canonicalEditPolicyClassName="ReadVariableActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.86"
+ graphicalNodeEditPolicyClassName="ReadVariableActionGraphicalNodeEditPolicy"
+ createCommandClassName="ReadVariableActionCreateCommand"
+ containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ReadVariableAction_3097"
+ displayName="ReadVariableAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.171/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadVariableAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.87">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5166"
+ editPartClassName="ReadVariableActionNameEditPart"
+ itemSemanticEditPolicyClassName="ReadVariableActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ReadVariableActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6021"
+ editPartClassName="ReadVariableActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="ReadVariableActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3098"
+ editPartClassName="OutputPinInReadVariableActionAsResultEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInReadVariableActionAsResultItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinViewFactory"
+ canonicalEditPolicyClassName="OutputPinInReadVariableActionAsResultCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OutputPinInReadVariableActionAsResultGraphicalNodeEditPolicy"
+ createCommandClassName="OutputPinInReadVariableActionAsResultCreateCommand"
+ containers="/0/@diagram/@childNodes.85">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.OutputPin_3098"
+ displayName="OutputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.76/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.OutputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.32">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OutputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadVariableAction/result"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ReadVariableAction/result"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.88">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5164"
+ editPartClassName="OutputPinInReadVariableActionAsResultLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInReadVariableActionAsResultLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5165"
+ editPartClassName="OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart"
+ itemSemanticEditPolicyClassName="OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="OutputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3099"
+ editPartClassName="AddVariableValueActionEditPart"
+ itemSemanticEditPolicyClassName="AddVariableValueActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="AddVariableValueActionViewFactory"
+ canonicalEditPolicyClassName="AddVariableValueActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.88 /0/@diagram/@childNodes.89"
+ graphicalNodeEditPolicyClassName="AddVariableValueActionGraphicalNodeEditPolicy"
+ createCommandClassName="AddVariableValueActionCreateCommand"
+ containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.AddVariableValueAction_3099"
+ displayName="AddVariableValueAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.1/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddVariableValueAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.89">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5171"
+ editPartClassName="AddVariableValueActionNameEditPart"
+ itemSemanticEditPolicyClassName="AddVariableValueActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="AddVariableValueActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6018"
+ editPartClassName="AddVariableValueActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="AddVariableValueActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3100"
+ editPartClassName="InputPinInAddVariableValueActionAsInsertAtEditPart"
+ itemSemanticEditPolicyClassName="InputPinInAddVariableValueActionAsInsertAtItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInAddVariableValueActionAsInsertAtCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInAddVariableValueActionAsInsertAtGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInAddVariableValueActionAsInsertAtCreateCommand"
+ containers="/0/@diagram/@childNodes.87"
+ preferredSideName="WEST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3100"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.33">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddVariableValueAction/insertAt"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AddVariableValueAction/insertAt"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.90">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5167"
+ editPartClassName="InputPinInAddVariableValueActionAsInsertAtLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInAddVariableValueActionAsInsertAtLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5168"
+ editPartClassName="InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3101"
+ editPartClassName="InputPinInAddVariableValueActionAsValueEditPart"
+ itemSemanticEditPolicyClassName="InputPinInAddVariableValueActionAsValueItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInAddVariableValueActionAsValueCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInAddVariableValueActionAsValueGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInAddVariableValueActionAsValueCreateCommand"
+ containers="/0/@diagram/@childNodes.87"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3101"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.34">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteVariableAction/value"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/WriteVariableAction/value"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.91">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5169"
+ editPartClassName="InputPinInAddVariableValueActionAsValueLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInAddVariableValueActionAsValueSimpleLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5170"
+ editPartClassName="InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3102"
+ editPartClassName="BroadcastSignalActionEditPart"
+ itemSemanticEditPolicyClassName="BroadcastSignalActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="BroadcastSignalActionViewFactory"
+ canonicalEditPolicyClassName="BroadcastSignalActionCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.91"
+ graphicalNodeEditPolicyClassName="BroadcastSignalActionGraphicalNodeEditPolicy"
+ createCommandClassName="BroadcastSignalActionCreateCommand"
+ containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.BroadcastSignalAction_3102"
+ displayName="BroadcastSignalAction">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.99/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_CREATE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/BroadcastSignalAction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.92">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5175"
+ editPartClassName="BroadcastSignalActionNameEditPart"
+ itemSemanticEditPolicyClassName="BroadcastSignalActionNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="BroadcastSignalActionNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6017"
+ editPartClassName="BroadcastSignalActionFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="BroadcastSignalActionFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3103"
+ editPartClassName="InputPinInBroadcastSignalActionEditPart"
+ itemSemanticEditPolicyClassName="InputPinInBroadcastSignalActionItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinViewFactory"
+ canonicalEditPolicyClassName="InputPinInBroadcastSignalActionCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InputPinInBroadcastSignalActionGraphicalNodeEditPolicy"
+ createCommandClassName="InputPinInBroadcastSignalActionCreateCommand"
+ containers="/0/@diagram/@childNodes.90"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.InputPin_3103"
+ displayName="InputPin">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.75/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InputPinFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.35">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InputPin"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InvocationAction/argument"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.93">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5172"
+ editPartClassName="InputPinInBroadcastSignalActionLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInBroadcastSignalActionLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5173"
+ editPartClassName="InputPinInBroadcastSignalActionValueLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInBroadcastSignalActionValueLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.7"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5174"
+ editPartClassName="InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart"
+ itemSemanticEditPolicyClassName="InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelItemSemanticEditPolicy"
+ notationViewFactoryClassName="InputPinLabelViewFactory"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3104"
+ editPartClassName="CentralBufferNodeEditPart"
+ itemSemanticEditPolicyClassName="CentralBufferNodeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="CentralBufferNodeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="CentralBufferNodeGraphicalNodeEditPolicy"
+ createCommandClassName="CentralBufferNodeCreateCommand"
+ containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.CentralBufferNode_3104"
+ displayName="CentralBufferNode">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.103/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/CentralBufferNode"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/ownedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.94">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5176"
+ editPartClassName="CentralBufferNodeLabelEditPart"
+ itemSemanticEditPolicyClassName="CentralBufferNodeWrappingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.20"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5177"
+ editPartClassName="CentralBufferNodeSelectionEditPart"
+ itemSemanticEditPolicyClassName="CentralBufferNodeSelectionItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="LinkAndCornerBentWithTextFigure"
+ classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class LinkAndCornerBentWithTextFigure extends org.eclipse.papyrus.uml.diagram.common.figure.node.CornerBentFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel fCornerBentContent; &#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.PolylineShape fLinkToBehaviorProperty; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public LinkAndCornerBentWithTextFigure() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;this.setBackgroundColor(THIS_BACK&#xD;&#xA;);&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fCornerBentContent = new org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this.add(fCornerBentContent);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fLinkToBehaviorProperty = new org.eclipse.draw2d.PolylineShape();&#xD;&#xA;fLinkToBehaviorProperty.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;this.add(fLinkToBehaviorProperty);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel getCornerBentContent() {&#xD;&#xA;&#x9;&#x9;return fCornerBentContent;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.PolylineShape getLinkToBehaviorProperty() {&#xD;&#xA;&#x9;&#x9;return fLinkToBehaviorProperty;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;static final org.eclipse.swt.graphics.Color THIS_BACK = new org.eclipse.swt.graphics.Color(null, 248, 249, 214);&#xD;&#xA;&#xD;&#xA;"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.21"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6030"
+ editPartClassName="CentralBufferNodeFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="CentralBufferNodeFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3112"
+ editPartClassName="ConstraintEditPartCN"
+ itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyCN"
+ createCommandClassName="ConstraintCreateCommandCN"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.Constraint_3112"
+ displayName="Constraint">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.0/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.117">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5189"
+ editPartClassName="ConstraintNameEditPartCN"
+ itemSemanticEditPolicyClassName="ConstraintName2ItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5190"
+ editPartClassName="ConstraintBodyEditPartCN"
+ itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.22"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <topLevelNodes
+ visualID="2001"
+ editPartClassName="ActivityEditPart"
+ itemSemanticEditPolicyClassName="ActivityItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityViewFactory"
+ canonicalEditPolicyClassName="ActivityCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.51"
+ compartments="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3"
+ graphicalNodeEditPolicyClassName="ActivityGraphicalNodeEditPolicy"
+ createCommandClassName="ActivityCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.Activity_2001"
+ displayName="Activity">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.72/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="857"
+ height="757"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.gef.editpolicies.RootComponentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ResizeActivityEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5001"
+ editPartClassName="ActivityNameEditPart"
+ itemSemanticEditPolicyClassName="ActivityNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityNameViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5002"
+ editPartClassName="ActivityIsSingleExecutionEditPart"
+ itemSemanticEditPolicyClassName="ActivityIsSingleExecutionItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityIsSingleExecutionViewFactory"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getHeaderSingleExecution"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.2">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/isSingleExecution"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <links
+ visualID="4001"
+ editPartClassName="ActionLocalPreconditionEditPart"
+ itemSemanticEditPolicyClassName="ActionLocalPreconditionItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionLocalPreconditionViewFactory"
+ createCommandClassName="ActionLocalPreconditionCreateCommand"
+ reorientCommandClassName="ActionLocalPreconditionReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="DashedLinkDescriptor"
+ classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DashedLinkDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DashedLinkDescriptor() {&#xD;&#xA;&#x9;&#x9;this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPrecondition"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4002"
+ editPartClassName="ActionLocalPostconditionEditPart"
+ itemSemanticEditPolicyClassName="ActionLocalPostconditionItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActionLocalPostconditionViewFactory"
+ createCommandClassName="ActionLocalPostconditionCreateCommand"
+ reorientCommandClassName="ActionLocalPostconditionReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="DashedLinkDescriptor"
+ classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DashedLinkDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DashedLinkDescriptor() {&#xD;&#xA;&#x9;&#x9;this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Action/localPostcondition"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4003"
+ editPartClassName="ObjectFlowEditPart"
+ itemSemanticEditPolicyClassName="ObjectFlowItemSemanticEditPolicy"
+ notationViewFactoryClassName="ObjectFlowViewFactory"
+ createCommandClassName="ObjectFlowCreateCommand"
+ reorientCommandClassName="ObjectFlowReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ObjectFlow_4003"
+ displayName="ObjectFlow">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.125/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.ActivityEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.activity.edit.policies.InterruptibleEdgeEditPolicy.INTERRUPTIBLE_ICON_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.InterruptibleEdgeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ObjectFlow"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/edge"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/edge"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.95">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge/source"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge/target"/>
+ </modelFacet>
+ <labels
+ visualID="6001"
+ editPartClassName="ObjectFlowNameEditPart"
+ itemSemanticEditPolicyClassName="ObjectFlowNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ObjectFlowNameViewFactory"
+ alignment="SOURCE">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6002"
+ editPartClassName="ObjectFlowWeightEditPart"
+ itemSemanticEditPolicyClassName="ObjectFlowWeightItemSemanticEditPolicy"
+ notationViewFactoryClassName="ObjectFlowLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.8"/>
+ </labels>
+ <labels
+ visualID="6005"
+ editPartClassName="ObjectFlowSelectionEditPart"
+ itemSemanticEditPolicyClassName="ObjectFlowSelectionItemSemanticEditPolicy"
+ notationViewFactoryClassName="ObjectFlowLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="LinkAndCornerBentWithTextFigure"
+ classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class LinkAndCornerBentWithTextFigure extends org.eclipse.papyrus.uml.diagram.common.figure.node.CornerBentFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel fCornerBentContent; &#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.PolylineShape fLinkToBehaviorProperty; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public LinkAndCornerBentWithTextFigure() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;this.setBackgroundColor(THIS_BACK&#xD;&#xA;);&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fCornerBentContent = new org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this.add(fCornerBentContent);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fLinkToBehaviorProperty = new org.eclipse.draw2d.PolylineShape();&#xD;&#xA;fLinkToBehaviorProperty.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;this.add(fLinkToBehaviorProperty);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel getCornerBentContent() {&#xD;&#xA;&#x9;&#x9;return fCornerBentContent;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.PolylineShape getLinkToBehaviorProperty() {&#xD;&#xA;&#x9;&#x9;return fLinkToBehaviorProperty;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;static final org.eclipse.swt.graphics.Color THIS_BACK = new org.eclipse.swt.graphics.Color(null, 248, 249, 214);&#xD;&#xA;&#xD;&#xA;">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="20"
+ y="40"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.12"/>
+ </labels>
+ <labels
+ visualID="6006"
+ editPartClassName="ObjectFlowTransformationEditPart"
+ itemSemanticEditPolicyClassName="ObjectFlowTransformationItemSemanticEditPolicy"
+ notationViewFactoryClassName="ObjectFlowLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:InnerClassViewmap"
+ className="LinkAndCornerBentWithTextFigure"
+ classBody="&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class LinkAndCornerBentWithTextFigure extends org.eclipse.papyrus.uml.diagram.common.figure.node.CornerBentFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel fCornerBentContent; &#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.PolylineShape fLinkToBehaviorProperty; &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public LinkAndCornerBentWithTextFigure() {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;this.setBackgroundColor(THIS_BACK&#xD;&#xA;);&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fCornerBentContent = new org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;this.add(fCornerBentContent);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;fLinkToBehaviorProperty = new org.eclipse.draw2d.PolylineShape();&#xD;&#xA;fLinkToBehaviorProperty.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);&#xD;&#xA;&#xD;&#xA;this.add(fLinkToBehaviorProperty);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel getCornerBentContent() {&#xD;&#xA;&#x9;&#x9;return fCornerBentContent;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.PolylineShape getLinkToBehaviorProperty() {&#xD;&#xA;&#x9;&#x9;return fLinkToBehaviorProperty;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;static final org.eclipse.swt.graphics.Color THIS_BACK = new org.eclipse.swt.graphics.Color(null, 248, 249, 214);&#xD;&#xA;&#xD;&#xA;">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="-20"
+ y="-60"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.11"/>
+ </labels>
+ <labels
+ visualID="6007"
+ editPartClassName="DecisionInputFlowEditPart"
+ itemSemanticEditPolicyClassName="DecisionInputFlowItemSemanticEditPolicy"
+ notationViewFactoryClassName="ObjectFlowLabelViewFactory"
+ alignment="SOURCE">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.13"/>
+ </labels>
+ <labels
+ visualID="6008"
+ editPartClassName="ObjectFlowGuardEditPart"
+ itemSemanticEditPolicyClassName="ObjectFlowGuardItemSemanticEditPolicy"
+ notationViewFactoryClassName="ObjectFlowLabelViewFactory"
+ alignment="TARGET">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.14"/>
+ </labels>
+ <labels
+ visualID="6010"
+ editPartClassName="ObjectFlowAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ObjectFlowAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ObjectFlowLabelViewFactory"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ <labels
+ visualID="6014"
+ editPartClassName="ObjectFlowInterruptibleIconEditPart"
+ itemSemanticEditPolicyClassName="ObjectFlowInterruptibleIconItemSemanticEditPolicy"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InterruptibleEdgeExternalIconFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ </labels>
+ <creationConstraints
+ sourceEnd="/0/@expressionProviders/@providers.0/@expressions.96"
+ targetEnd="/0/@expressionProviders/@providers.0/@expressions.97"/>
+ </links>
+ <links
+ visualID="4004"
+ editPartClassName="ControlFlowEditPart"
+ itemSemanticEditPolicyClassName="ControlFlowItemSemanticEditPolicy"
+ notationViewFactoryClassName="ControlFlowViewFactory"
+ createCommandClassName="ControlFlowCreateCommand"
+ reorientCommandClassName="ControlFlowReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ControlFlow_4004"
+ displayName="ControlFlow">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.116/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.ActivityEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.activity.edit.policies.InterruptibleEdgeEditPolicy.INTERRUPTIBLE_ICON_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.InterruptibleEdgeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ControlFlow"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/edge"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Activity/edge"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.98">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge/source"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ActivityEdge/target"/>
+ </modelFacet>
+ <labels
+ visualID="6003"
+ editPartClassName="ControlFlowNameEditPart"
+ itemSemanticEditPolicyClassName="ControlFlowNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ControlFlowNameViewFactory"
+ alignment="SOURCE">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6004"
+ editPartClassName="ControlFlowWeightEditPart"
+ itemSemanticEditPolicyClassName="ControlFlowWeightItemSemanticEditPolicy"
+ notationViewFactoryClassName="ControlFlowLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.8"/>
+ </labels>
+ <labels
+ visualID="6009"
+ editPartClassName="ControlFlowGuardEditPart"
+ itemSemanticEditPolicyClassName="ControlFlowGuardItemSemanticEditPolicy"
+ notationViewFactoryClassName="ControlFlowLabelViewFactory"
+ alignment="TARGET">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.14"/>
+ </labels>
+ <labels
+ visualID="6011"
+ editPartClassName="ControlFlowAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ControlFlowAppliedStereotypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ControlFlowLabelViewFactory"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ <labels
+ visualID="6013"
+ editPartClassName="ControlFlowInterruptibleIconEditPart"
+ itemSemanticEditPolicyClassName="ControlFlowInterruptibleIconItemSemanticEditPolicy"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InterruptibleEdgeExternalIconFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ </labels>
+ <creationConstraints
+ sourceEnd="/0/@expressionProviders/@providers.0/@expressions.99"
+ targetEnd="/0/@expressionProviders/@providers.0/@expressions.100"/>
+ </links>
+ <links
+ visualID="4005"
+ editPartClassName="ExceptionHandlerEditPart"
+ itemSemanticEditPolicyClassName="ExceptionHandlerItemSemanticEditPolicy"
+ notationViewFactoryClassName="ExceptionHandlerViewFactory"
+ createCommandClassName="ExceptionHandlerCreateCommand"
+ reorientCommandClassName="ExceptionHandlerReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ExceptionHandler_4005"
+ displayName="ExceptionHandler">
+ <metamodelType
+ href="../../org.eclipse.papyrus.uml.diagram.common/model/GenericUML.gmfgen#//@diagram/@topLevelNodes.79/@elementType"/>
+ </elementType>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.ExceptionHandlerFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExceptionHandler"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExecutableNode/handler"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExecutableNode/handler"/>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExceptionHandler/protectedNode"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExceptionHandler/exceptionInput"/>
+ </modelFacet>
+ <labels
+ visualID="6012"
+ editPartClassName="ExceptionHandlerTypeEditPart"
+ itemSemanticEditPolicyClassName="ExceptionHandlerTypeItemSemanticEditPolicy"
+ notationViewFactoryClassName="ExceptionHandlerLabelViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.19"/>
+ </labels>
+ <labels
+ visualID="6015"
+ editPartClassName="ExceptionHandlerIconEditPart"
+ itemSemanticEditPolicyClassName="ExceptionHandlerIconItemSemanticEditPolicy"
+ readOnly="true"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InterruptibleEdgeExternalIconFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.RequestConstants.REQ_DELETE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.NoDeleteFromDiagramEditPolicy"/>
+ </labels>
+ </links>
+ <links
+ visualID="4006"
+ editPartClassName="CommentLinkEditPart"
+ itemSemanticEditPolicyClassName="CommentLinkItemSemanticEditPolicy"
+ notationViewFactoryClassName="CommentAnnotatedElementViewFactory"
+ createCommandClassName="CommentLinkCreateCommand"
+ reorientCommandClassName="CommentLinkReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LinkFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4007"
+ editPartClassName="ConstraintConstrainedElementEditPart"
+ createCommandClassName="ConstraintConstrainedElementCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.activity.ConstraintConstrainedElement_4007"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.LinkFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
+ </modelFacet>
+ </links>
+ <compartments
+ visualID="7001"
+ editPartClassName="ActivityActivityParametersCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ActivityActivityParametersCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityActivityParametersCompartmentViewFactory"
+ canonicalEditPolicyClassName="ActivityActivityParametersCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.0"
+ title="ActivityFigureParameterCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@topLevelNodes.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getParameterFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityActivityParametersCompartmentCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7002"
+ editPartClassName="ActivityActivityPreConditionsCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ActivityActivityPreConditionsCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityActivityPreConditionsCompartmentViewFactory"
+ canonicalEditPolicyClassName="ActivityActivityPreConditionsCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1"
+ title="ActivityFigurePreconditionCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@topLevelNodes.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPreconditionFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityActivityPreConditionsCompartmentCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7003"
+ editPartClassName="ActivityActivityPostConditionsCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ActivityActivityPostConditionsCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityActivityPostConditionsCompartmentViewFactory"
+ canonicalEditPolicyClassName="ActivityActivityPostConditionsCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.2"
+ title="ActivityFigurePostCondtionCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@topLevelNodes.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPostconditionFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityActivityPostConditionsCompartmentCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7004"
+ editPartClassName="ActivityActivityContentCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ActivityActivityContentCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityActivityContentCompartmentViewFactory"
+ canonicalEditPolicyClassName="ActivityActivityContentCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.67 /0/@diagram/@childNodes.68 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.72 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.93"
+ title="ActivityFigureContentCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@topLevelNodes.0"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getContentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityParameterNodeInCompartmentCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CompartmentXYLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomActivityActivityContentCompartmentItemSemanticEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7008"
+ editPartClassName="ConditionalNodeStructuredActivityNodeContentCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ConditionalNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="ConditionalNodeStructuredActivityNodeContentCompartmentViewFactory"
+ canonicalEditPolicyClassName="ConditionalNodeStructuredActivityNodeContentCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
+ title="StructuredActivityNodeContentCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.56"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getStructuredActivityNodeCompartment"
+ figureQualifiedClassName="org.eclipse.draw2d.RoundedRectangle"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityGroupCustomDragAndDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomConditionalNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7009"
+ editPartClassName="ExpansionRegionStructuredActivityNodeContentCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ExpansionRegionStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="ExpansionRegionStructuredActivityNodeContentCompartmentViewFactory"
+ canonicalEditPolicyClassName="ExpansionRegionStructuredActivityNodeContentCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
+ title="StructuredActivityNodeContentCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.57"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getStructuredActivityNodeCompartment"
+ figureQualifiedClassName="org.eclipse.draw2d.RoundedRectangle"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.activitygroup.editpolicy.ExpansionRegionCompartmentDnDEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomExpansionRegionStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7010"
+ editPartClassName="LoopNodeStructuredActivityNodeContentCompartmentEditPart"
+ itemSemanticEditPolicyClassName="LoopNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="LoopNodeStructuredActivityNodeContentCompartmentViewFactory"
+ canonicalEditPolicyClassName="LoopNodeStructuredActivityNodeContentCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
+ title="StructuredActivityNodeContentCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.60"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getStructuredActivityNodeCompartment"
+ figureQualifiedClassName="org.eclipse.draw2d.RoundedRectangle"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityGroupCustomDragAndDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomLoopNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7012"
+ editPartClassName="SequenceNodeStructuredActivityNodeContentCompartmentEditPart"
+ itemSemanticEditPolicyClassName="SequenceNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="SequenceNodeStructuredActivityNodeContentCompartmentViewFactory"
+ canonicalEditPolicyClassName="SequenceNodeStructuredActivityNodeContentCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
+ title="StructuredActivityNodeContentCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.64"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getStructuredActivityNodeCompartment"
+ figureQualifiedClassName="org.eclipse.draw2d.RoundedRectangle"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityGroupCustomDragAndDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomSequenceNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7005"
+ editPartClassName="StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart"
+ itemSemanticEditPolicyClassName="StructuredActivityNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="StructuredActivityNodeStructuredActivityNodeContentCompartmentViewFactory"
+ canonicalEditPolicyClassName="StructuredActivityNodeStructuredActivityNodeContentCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
+ title="StructuredActivityNodeContentCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.65"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getStructuredActivityNodeCompartment"
+ figureQualifiedClassName="org.eclipse.draw2d.RoundedRectangle"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityGroupCustomDragAndDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomStructuredActivityNodeStructuredActivityNodeContentCompartmentItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7006"
+ editPartClassName="ActivityPartitionActivityPartitionContentCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ActivityPartitionActivityPartitionContentCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityPartitionActivityPartitionContentCompartmentViewFactory"
+ canonicalEditPolicyClassName="ActivityPartitionActivityPartitionContentCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.67 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
+ title="ActivityPartitionContentCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.67"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getActivityPartitionCompartment"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityGroupCustomDragAndDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomActivityPartitionActivityPartitionContentCompartmentItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.activitygroup.editpolicy.ActivityPartitionCompartmentCreationEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7007"
+ editPartClassName="InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart"
+ itemSemanticEditPolicyClassName="InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentViewFactory"
+ canonicalEditPolicyClassName="InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.93"
+ title="InterruptibleActivityRegionContentCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.68"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.figures.InterruptibleActivityRegionFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityGroupCustomDragAndDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomInterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.activitygroup.editpolicy.InterruptibleActivityRegionCompartmentCreationEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7014"
+ editPartClassName="ActivityCNParametersCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ActivityCNParametersCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityActivityParametersCompartmentViewFactory"
+ canonicalEditPolicyClassName="ActivityCNParametersCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.0"
+ title="ActivityFigureParameterCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.72">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getParameterFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityActivityParametersCompartmentCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7015"
+ editPartClassName="ActivityCNPreConditionsCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ActivityCNPreConditionsCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityActivityPreConditionsCompartmentViewFactory"
+ canonicalEditPolicyClassName="ActivityCNPreConditionsCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1"
+ title="ActivityFigurePreconditionCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.72">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPreconditionFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityActivityPreConditionsCompartmentCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7016"
+ editPartClassName="ActivityCNPostConditionsCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ActivityCNPostConditionsCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityActivityPostConditionsCompartmentViewFactory"
+ canonicalEditPolicyClassName="ActivityCNPostConditionsCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.2"
+ title="ActivityFigurePostCondtionCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.72">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPostconditionFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityActivityPostConditionsCompartmentCanonicalEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7013"
+ editPartClassName="ActivityCNContentCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ActivityCNContentCompartmentItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActivityActivityContentCompartmentViewFactory"
+ canonicalEditPolicyClassName="ActivityCNContentCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.67 /0/@diagram/@childNodes.68 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.72 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.51"
+ title="ActivityFigureContentCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.72"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getContentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityParameterNodeInCompartmentCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.activity.edit.policies.CompartmentXYLayoutEditPolicy"/>
+ </compartments>
+ <palette
+ packageName="org.eclipse.papyrus.uml.diagram.activity.part">
+ <groups
+ title="Nodes"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolGroup"
+ title="ActivityGroup"
+ description="ActivityGroup"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createActivityGroupGroup"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Activity Partition"
+ description="Create an Activity Partition"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActivityPartition.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActivityPartition.gif"
+ genNodes="/0/@diagram/@childNodes.67"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Interruptible Activity Region"
+ description="Create an Interruptible Activity Region"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterruptibleActivityRegion.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterruptibleActivityRegion.gif"
+ genNodes="/0/@diagram/@childNodes.68"/>
+ </entries>
+ <entries
+ xsi:type="gmfgen:ToolGroup"
+ title="ControlNodes"
+ description="ControlNodes"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createControlNodesGroup"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Initial node"
+ description="Create an Initial node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InitialNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InitialNode.gif"
+ genNodes="/0/@diagram/@childNodes.3"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Activity final"
+ description="Create an Activity final node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActivityFinalNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActivityFinalNode.gif"
+ genNodes="/0/@diagram/@childNodes.4"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Flow final"
+ description="Create a Flow final node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FlowFinalNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FlowFinalNode.gif"
+ genNodes="/0/@diagram/@childNodes.5"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Decision node"
+ description="Create a Decision node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DecisionNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DecisionNode.gif"
+ genNodes="/0/@diagram/@childNodes.32"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Merge node"
+ description="Create a Merge node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/MergeNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/MergeNode.gif"
+ genNodes="/0/@diagram/@childNodes.33"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Join node"
+ description="Create a Merge node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/JoinNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/JoinNode.gif"
+ genNodes="/0/@diagram/@childNodes.35"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Fork node"
+ description="Create a Fork node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ForkNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ForkNode.gif"
+ genNodes="/0/@diagram/@childNodes.34"/>
+ </entries>
+ <entries
+ xsi:type="gmfgen:ToolGroup"
+ title="Constraints"
+ description="Constraints"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createConstraintsGroup"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Local Precondition Constraint"
+ description="Create a Constraint as Local Precondition for an Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ genNodes="/0/@diagram/@childNodes.30"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Local Precondition Interaction Constraint"
+ description="Create an Interaction Constraint as Local Precondition for an Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionConstraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionConstraint.gif"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Local Precondition Interval Constraint"
+ description="Create an Interval Constraint as Local Precondition for an Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/IntervalConstraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/IntervalConstraint.gif"
+ genNodes="/0/@diagram/@childNodes.28"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Local Precondition Duration Constraint"
+ description="Create a Duration Constraint as Local Precondition for an Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
+ genNodes="/0/@diagram/@childNodes.24"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Local Precondition Time Constraint"
+ description="Create a Time Constraint as Local Precondition for an Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif"
+ genNodes="/0/@diagram/@childNodes.26"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Local Postcondition Constraint"
+ description="Create a Constraint as Local Postcondition for an Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ genNodes="/0/@diagram/@childNodes.31"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Local Postcondition Interaction Constraint"
+ description="Create an Interaction Constraint as Local Postcondition for an Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionConstraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InteractionConstraint.gif"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Local Postcondition Interval Constraint"
+ description="Create an Interval Constraint as Local Postcondition for an Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/IntervalConstraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/IntervalConstraint.gif"
+ genNodes="/0/@diagram/@childNodes.29"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Local Postcondition Duration Constraint"
+ description="Create a Duration Constraint as Local Postcondition for an Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationConstraint.gif"
+ genNodes="/0/@diagram/@childNodes.25"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Local Postcondition Time Constraint"
+ description="Create a Time Constraint as Local Postcondition for an Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeConstraint.gif"
+ genNodes="/0/@diagram/@childNodes.27"/>
+ </entries>
+ <entries
+ xsi:type="gmfgen:ToolGroup"
+ title="Pins"
+ description="Pins"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createPinsGroup"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Output Pin"
+ description="Create an Output Pin"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OutputPin.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OutputPin.gif"
+ genNodes="/0/@diagram/@childNodes.10 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.20 /0/@diagram/@childNodes.53 /0/@diagram/@childNodes.55 /0/@diagram/@childNodes.71 /0/@diagram/@childNodes.61 /0/@diagram/@childNodes.62 /0/@diagram/@childNodes.63"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Input Pin"
+ description="Create an Input Pin"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InputPin.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InputPin.gif"
+ genNodes="/0/@diagram/@childNodes.9 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.66"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Action Input Pin"
+ description="Create an Action Input Pin"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActionInputPin.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActionInputPin.gif"
+ genNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.45"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Value Pin"
+ description="Create a Value Pin"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ValuePin.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ValuePin.gif"
+ genNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.46"/>
+ </entries>
+ <entries
+ xsi:type="gmfgen:ToolGroup"
+ title="ExpansionRegions"
+ description="ExpansionRegions"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createExpansionRegionsGroup"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Expansion Region"
+ description="Create an Expansion Region"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExpansionRegion.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExpansionRegion.gif"
+ genNodes="/0/@diagram/@childNodes.57"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Input Expansion Node"
+ description="Create an Expansion Node as Input of an Expansion Region"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExpansionNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExpansionNode.gif"
+ genNodes="/0/@diagram/@childNodes.58"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Output Expansion Node"
+ description="Create an Expansion Node as Output of an Expansion Region"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExpansionNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExpansionNode.gif"
+ genNodes="/0/@diagram/@childNodes.59"/>
+ </entries>
+ <entries
+ xsi:type="gmfgen:ToolGroup"
+ title="InvocationActions"
+ description="InvocationActions"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="InvocationActionsGroup"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Broadcast Signal Action"
+ description="Create a Broadcast Signal Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/BroadcastSignalAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/BroadcastSignalAction.gif"
+ genNodes="/0/@diagram/@childNodes.90"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Call Behavior Action"
+ description="Create an Call Behavior Action node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CallBehaviorAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CallBehaviorAction.gif"
+ genNodes="/0/@diagram/@childNodes.11"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Call Operation Action"
+ description="Create a Call Operation Action node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CallOperationAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CallOperationAction.gif"
+ genNodes="/0/@diagram/@childNodes.16"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Send Object Action"
+ description="Create a Send Object Action node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/SendObjectAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/SendObjectAction.gif"
+ genNodes="/0/@diagram/@childNodes.37"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Send Signal Action"
+ description="Create a Send Signal Action node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/SendSignalAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/SendSignalAction.gif"
+ genNodes="/0/@diagram/@childNodes.44"/>
+ </entries>
+ <entries
+ xsi:type="gmfgen:ToolGroup"
+ title="ObjectActions"
+ description="ObjectActions"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createObjectActionsGroup"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Create Object Action"
+ description="Create a Create Object Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CreateObjectAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CreateObjectAction.gif"
+ genNodes="/0/@diagram/@childNodes.73"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Destroy Object Action"
+ description="Create a Destroy Object Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestroyObjectAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DestroyObjectAction.gif"
+ genNodes="/0/@diagram/@childNodes.83"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="ReadSelfAction"
+ description="Create a ReadSelfAction"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadSelfAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadSelfAction.gif"
+ genNodes="/0/@diagram/@childNodes.70"/>
+ </entries>
+ <entries
+ xsi:type="gmfgen:ToolGroup"
+ title="StructuredActions"
+ description="StructuredActions"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createStructuredActionsGroup"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Structured Activity Node"
+ description="Create a Structured Activity Node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StructuredActivityNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/StructuredActivityNode.gif"
+ genNodes="/0/@diagram/@childNodes.65"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Loop Node"
+ description="Create a Loop Node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/LoopNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/LoopNode.gif"
+ genNodes="/0/@diagram/@childNodes.60"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Sequence Node"
+ description="Create a Sequence Node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/SequenceNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/SequenceNode.gif"
+ genNodes="/0/@diagram/@childNodes.64"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Conditional Node"
+ description="Create a Conditional Node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConditionalNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConditionalNode.gif"
+ genNodes="/0/@diagram/@childNodes.56"/>
+ </entries>
+ <entries
+ xsi:type="gmfgen:ToolGroup"
+ title="StructuralFeatureActions"
+ description="StructuralFeatureActions"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createStructuralFeatureActionsGroup"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Read Structural Feature Action"
+ description="Create Read Structural Feature Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadStructuralFeatureAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadStructuralFeatureAction.gif"
+ genNodes="/0/@diagram/@childNodes.76"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Add Structural Feature Value Action"
+ description="Create Add Structural Feature Value Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AddStructuralFeatureValueAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AddStructuralFeatureValueAction.gif"
+ genNodes="/0/@diagram/@childNodes.79"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Add Structural Feature Value Action"
+ description="Create Add Structural Feature Value Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AddStructuralFeatureValueAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AddStructuralFeatureValueAction.gif"
+ genNodes="/0/@diagram/@childNodes.79"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Read Structural Feature Action"
+ description="Create Read Structural Feature Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadStructuralFeatureAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadStructuralFeatureAction.gif"
+ genNodes="/0/@diagram/@childNodes.76"/>
+ </entries>
+ <entries
+ xsi:type="gmfgen:ToolGroup"
+ title="VariableActions"
+ description="VariableActions"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createVariableActionsGroup"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Add Variable Value Action"
+ description="Create Add Variable Value Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AddVariableValueAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AddVariableValueAction.gif"
+ genNodes="/0/@diagram/@childNodes.87"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Read Variable Action"
+ description="Create a Read Variable Action"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadVariableAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ReadVariableAction.gif"
+ genNodes="/0/@diagram/@childNodes.85"/>
+ </entries>
+ <entries
+ xsi:type="gmfgen:ToolGroup"
+ title="MiscellaneousActions"
+ description="MiscellaneousActions"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createOtherActionsGroup"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Opaque Action"
+ description="Create an Opaque Action node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OpaqueAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OpaqueAction.gif"
+ genNodes="/0/@diagram/@childNodes.6"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Value Specification Action"
+ description="Create a Value Specification Action node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ValueSpecificationAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ValueSpecificationAction.gif"
+ genNodes="/0/@diagram/@childNodes.54"/>
+ </entries>
+ <entries
+ xsi:type="gmfgen:ToolGroup"
+ title="AcceptEventActions"
+ description="AcceptEventActions"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ stack="true"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Accept Event Action"
+ description="Create an Accept Event Action node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AcceptEventAction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AcceptEventAction.gif"
+ genNodes="/0/@diagram/@childNodes.52"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Activity"
+ description="Create an Activity"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Activity.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Activity.gif"
+ genNodes="/0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.72"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Activity Parameter Node"
+ description="Create an Activity Parameter Node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActivityParameterNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ActivityParameterNode.gif"
+ genNodes="/0/@diagram/@childNodes.51"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Central Buffer Node"
+ description="Create a Central Buffer Node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataStoreNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataStoreNode.gif"
+ genNodes="/0/@diagram/@childNodes.92"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Data Store Node"
+ description="Create a Data Store Node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataStoreNode.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataStoreNode.gif"
+ genNodes="/0/@diagram/@childNodes.36"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Comment"
+ description="Create a Comment"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ genNodes="/0/@diagram/@childNodes.69"/>
+ </groups>
+ <groups
+ title="Edges"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Control Flow"
+ description="Create a Control Flow"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ControlFlow.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ControlFlow.gif"
+ genLinks="/0/@diagram/@links.3"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Exception Handler"
+ description="Create an Exception Handler"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExceptionHandler.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExceptionHandler.gif"
+ genLinks="/0/@diagram/@links.4"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Object Flow"
+ description="Create an Object Flow"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ObjectFlow.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ObjectFlow.gif"
+ genLinks="/0/@diagram/@links.2"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Link"
+ description="Create of a link for comment"
+ largeIconPath="icons/obj16/Link.gif"
+ smallIconPath="icons/obj16/Link.gif"
+ genLinks="/0/@diagram/@links.5 /0/@diagram/@links.6"/>
+ </groups>
+ </palette>
+ <preferencePages
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.general"
+ name="UML Diagram">
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.appearance"
+ name="Appearance"
+ kind="Appearance"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.connections"
+ name="Connections"
+ kind="Connections"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.printing"
+ name="Printing"
+ kind="Printing"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
+ name="Rulers And Grid"
+ kind="RulersAndGrid"/>
+ </preferencePages>
+ </diagram>
+ <plugin
+ iD="org.eclipse.papyrus.uml.diagram.activity"
+ name="Papyrus activity editor Plugin"
+ provider="Papyrus"
+ version="1.1.0.qualifier">
+ <requiredPlugins>org.eclipse.draw2d</requiredPlugins>
+ <requiredPlugins>org.eclipse.papyrus.uml.diagram.common</requiredPlugins>
+ <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
+ </plugin>
+ <editor/>
+ <navigator>
+ <childReferences
+ child="/0/@diagram"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.0"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.1"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.2"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.3"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.4"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.5"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.6"
+ child="/0/@diagram/@childNodes.7"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.6"
+ child="/0/@diagram/@childNodes.8"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.6"
+ child="/0/@diagram/@childNodes.9"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.6"
+ child="/0/@diagram/@childNodes.10"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.6"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.11"
+ child="/0/@diagram/@childNodes.12"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.11"
+ child="/0/@diagram/@childNodes.13"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.11"
+ child="/0/@diagram/@childNodes.14"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.11"
+ child="/0/@diagram/@childNodes.15"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.11"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@childNodes.17"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@childNodes.18"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@childNodes.19"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@childNodes.20"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@childNodes.21"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@childNodes.22"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@childNodes.23"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.16"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.24"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.25"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.26"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.27"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.28"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.29"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.30"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.31"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.32"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.33"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.34"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.35"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.36"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@childNodes.38"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@childNodes.39"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@childNodes.40"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@childNodes.41"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@childNodes.42"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@childNodes.43"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.37"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@childNodes.45"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@childNodes.46"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@childNodes.47"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@childNodes.48"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@childNodes.49"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@childNodes.50"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.44"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.51"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.52"
+ child="/0/@diagram/@childNodes.53"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.52"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.54"
+ child="/0/@diagram/@childNodes.55"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.54"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.56"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.57"
+ child="/0/@diagram/@childNodes.58"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.57"
+ child="/0/@diagram/@childNodes.59"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.57"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.60"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.64"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.65"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.67"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.68"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.69"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.70"
+ child="/0/@diagram/@childNodes.71"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.70"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.0"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.1"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.2"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.3"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.4"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.5"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.6"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.11"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.16"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.24"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.25"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.26"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.27"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.28"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.29"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.30"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.31"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.32"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.33"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.34"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.35"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.36"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.37"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.44"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.51"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.52"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.54"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.56"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.57"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.60"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.64"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.65"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.67"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.68"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.69"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.70"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.72"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.73"
+ child="/0/@diagram/@childNodes.74"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.73"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.75"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.76"
+ child="/0/@diagram/@childNodes.77"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.76"
+ child="/0/@diagram/@childNodes.78"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.76"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.79"
+ child="/0/@diagram/@childNodes.80"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.79"
+ child="/0/@diagram/@childNodes.81"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.79"
+ child="/0/@diagram/@childNodes.82"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.79"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.83"
+ child="/0/@diagram/@childNodes.84"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.83"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.85"
+ child="/0/@diagram/@childNodes.86"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.85"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.87"
+ child="/0/@diagram/@childNodes.88"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.87"
+ child="/0/@diagram/@childNodes.89"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.87"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.90"
+ child="/0/@diagram/@childNodes.91"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.90"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@childNodes.92"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.72"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.73"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.75"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.76"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.79"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.83"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.85"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.87"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.90"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@childNodes.92"/>
+ <childReferences
+ parent="/0/@diagram"
+ child="/0/@diagram/@topLevelNodes.0"/>
+ <childReferences
+ parent="/0/@diagram"
+ child="/0/@diagram/@links.0"
+ groupName="links"
+ groupIcon="icons/linksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.24"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.24"
+ child="/0/@diagram/@links.0"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.25"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.25"
+ child="/0/@diagram/@links.0"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.26"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.26"
+ child="/0/@diagram/@links.0"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.27"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.27"
+ child="/0/@diagram/@links.0"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.28"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.28"
+ child="/0/@diagram/@links.0"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.29"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.29"
+ child="/0/@diagram/@links.0"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.30"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.30"
+ child="/0/@diagram/@links.0"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.31"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.31"
+ child="/0/@diagram/@links.0"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.6"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.6"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.11"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.11"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.16"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.37"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.44"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.52"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.52"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.54"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.54"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.56"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.56"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.57"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.57"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.60"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.60"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.64"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.64"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.65"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.65"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.70"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.70"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.73"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.73"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.76"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.76"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.79"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.79"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.83"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.83"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.85"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.85"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.87"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.87"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.0"
+ child="/0/@diagram/@childNodes.90"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.90"
+ child="/0/@diagram/@links.0"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram"
+ child="/0/@diagram/@links.1"
+ groupName="links"
+ groupIcon="icons/linksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.24"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.24"
+ child="/0/@diagram/@links.1"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.25"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.25"
+ child="/0/@diagram/@links.1"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.26"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.26"
+ child="/0/@diagram/@links.1"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.27"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.27"
+ child="/0/@diagram/@links.1"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.28"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.28"
+ child="/0/@diagram/@links.1"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.29"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.29"
+ child="/0/@diagram/@links.1"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.30"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.30"
+ child="/0/@diagram/@links.1"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.31"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.31"
+ child="/0/@diagram/@links.1"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.6"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.6"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.11"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.11"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.16"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.37"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.44"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.52"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.52"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.54"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.54"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.56"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.56"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.57"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.57"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.60"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.60"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.64"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.64"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.65"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.65"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.70"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.70"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.73"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.73"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.76"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.76"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.79"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.79"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.83"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.83"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.85"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.85"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.87"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.87"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.1"
+ child="/0/@diagram/@childNodes.90"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.90"
+ child="/0/@diagram/@links.1"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram"
+ child="/0/@diagram/@links.2"
+ groupName="links"
+ groupIcon="icons/linksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.3"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.3"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.4"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.4"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.5"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.5"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.6"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.6"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.7"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.7"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.8"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.8"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.9"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.9"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.10"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.10"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.11"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.11"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.12"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.12"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.13"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.13"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.14"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.14"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.15"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.15"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.16"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.17"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.17"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.18"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.18"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.19"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.19"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.20"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.20"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.21"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.21"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.22"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.22"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.23"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.23"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.32"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.32"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.33"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.33"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.34"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.34"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.35"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.35"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.36"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.36"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.37"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.38"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.38"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.39"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.39"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.40"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.40"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.41"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.41"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.42"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.42"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.43"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.43"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.44"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.45"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.45"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.46"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.46"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.47"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.47"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.48"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.48"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.49"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.49"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.50"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.50"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.51"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.51"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.52"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.52"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.53"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.53"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.54"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.54"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.55"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.55"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.56"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.56"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.57"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.57"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.58"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.58"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.59"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.59"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.60"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.60"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.64"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.64"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.65"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.65"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.70"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.70"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.71"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.71"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.73"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.73"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.74"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.74"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.76"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.76"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.77"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.77"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.78"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.78"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.79"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.79"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.80"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.80"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.81"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.81"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.82"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.82"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.83"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.83"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.84"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.84"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.85"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.85"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.86"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.86"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.87"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.87"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.88"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.88"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.89"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.89"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.90"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.90"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.91"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.91"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.92"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.92"
+ child="/0/@diagram/@links.2"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.3"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.3"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.4"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.4"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.5"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.5"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.6"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.6"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.7"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.7"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.8"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.8"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.9"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.9"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.10"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.10"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.11"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.11"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.12"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.12"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.13"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.13"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.14"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.14"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.15"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.15"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.16"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.17"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.17"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.18"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.18"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.19"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.19"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.20"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.20"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.21"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.21"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.22"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.22"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.23"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.23"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.32"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.32"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.33"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.33"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.34"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.34"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.35"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.35"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.36"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.36"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.37"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.38"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.38"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.39"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.39"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.40"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.40"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.41"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.41"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.42"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.42"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.43"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.43"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.44"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.45"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.45"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.46"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.46"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.47"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.47"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.48"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.48"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.49"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.49"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.50"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.50"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.51"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.51"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.52"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.52"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.53"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.53"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.54"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.54"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.55"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.55"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.56"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.56"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.57"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.57"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.58"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.58"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.59"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.59"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.60"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.60"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.64"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.64"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.65"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.65"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.70"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.70"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.71"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.71"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.73"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.73"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.74"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.74"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.76"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.76"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.77"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.77"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.78"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.78"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.79"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.79"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.80"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.80"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.81"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.81"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.82"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.82"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.83"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.83"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.84"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.84"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.85"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.85"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.86"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.86"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.87"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.87"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.88"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.88"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.89"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.89"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.90"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.90"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.91"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.91"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@childNodes.92"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.92"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram"
+ child="/0/@diagram/@links.3"
+ groupName="links"
+ groupIcon="icons/linksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.3"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.3"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.4"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.4"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.5"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.5"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.6"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.6"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.7"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.7"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.8"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.8"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.9"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.9"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.10"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.10"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.11"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.11"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.12"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.12"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.13"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.13"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.14"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.14"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.15"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.15"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.16"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.17"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.17"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.18"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.18"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.19"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.19"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.20"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.20"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.21"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.21"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.22"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.22"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.23"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.23"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.32"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.32"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.33"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.33"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.34"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.34"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.35"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.35"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.36"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.36"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.37"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.38"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.38"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.39"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.39"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.40"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.40"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.41"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.41"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.42"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.42"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.43"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.43"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.44"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.45"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.45"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.46"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.46"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.47"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.47"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.48"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.48"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.49"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.49"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.50"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.50"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.51"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.51"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.52"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.52"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.53"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.53"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.54"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.54"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.55"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.55"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.56"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.56"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.57"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.57"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.58"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.58"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.59"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.59"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.60"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.60"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.64"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.64"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.65"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.65"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.70"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.70"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.71"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.71"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.73"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.73"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.74"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.74"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.76"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.76"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.77"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.77"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.78"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.78"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.79"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.79"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.80"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.80"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.81"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.81"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.82"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.82"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.83"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.83"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.84"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.84"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.85"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.85"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.86"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.86"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.87"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.87"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.88"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.88"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.89"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.89"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.90"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.90"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.91"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.91"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.92"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.92"
+ child="/0/@diagram/@links.3"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.3"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.3"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.4"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.4"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.5"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.5"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.6"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.6"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.7"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.7"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.8"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.8"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.9"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.9"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.10"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.10"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.11"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.11"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.12"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.12"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.13"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.13"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.14"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.14"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.15"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.15"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.16"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.17"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.17"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.18"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.18"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.19"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.19"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.20"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.20"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.21"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.21"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.22"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.22"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.23"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.23"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.32"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.32"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.33"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.33"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.34"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.34"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.35"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.35"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.36"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.36"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.37"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.38"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.38"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.39"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.39"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.40"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.40"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.41"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.41"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.42"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.42"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.43"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.43"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.44"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.45"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.45"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.46"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.46"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.47"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.47"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.48"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.48"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.49"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.49"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.50"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.50"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.51"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.51"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.52"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.52"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.53"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.53"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.54"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.54"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.55"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.55"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.56"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.56"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.57"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.57"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.58"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.58"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.59"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.59"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.60"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.60"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.64"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.64"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.65"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.65"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.70"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.70"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.71"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.71"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.73"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.73"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.74"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.74"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.76"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.76"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.77"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.77"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.78"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.78"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.79"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.79"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.80"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.80"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.81"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.81"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.82"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.82"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.83"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.83"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.84"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.84"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.85"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.85"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.86"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.86"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.87"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.87"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.88"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.88"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.89"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.89"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.90"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.90"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.91"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.91"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@childNodes.92"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.92"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram"
+ child="/0/@diagram/@links.4"
+ groupName="links"
+ groupIcon="icons/linksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.7"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.7"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.8"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.8"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.9"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.9"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.10"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.10"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.12"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.12"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.13"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.13"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.14"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.14"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.15"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.15"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.17"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.17"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.18"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.18"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.19"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.19"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.20"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.20"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.21"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.21"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.22"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.22"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.23"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.23"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.36"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.36"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.38"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.38"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.39"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.39"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.40"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.40"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.41"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.41"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.42"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.42"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.43"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.43"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.45"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.45"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.46"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.46"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.47"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.47"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.48"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.48"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.49"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.49"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.50"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.50"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.51"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.51"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.53"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.53"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.55"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.55"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.58"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.58"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.59"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.59"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.71"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.71"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.74"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.74"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.77"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.77"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.78"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.78"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.80"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.80"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.81"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.81"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.82"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.82"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.84"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.84"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.86"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.86"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.88"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.88"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.89"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.89"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.91"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.91"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.92"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.92"
+ child="/0/@diagram/@links.4"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.6"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.6"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.11"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.11"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.16"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.37"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.44"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.52"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.52"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.54"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.54"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.56"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.56"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.57"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.57"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.60"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.60"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.64"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.64"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.65"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.65"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.70"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.70"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.73"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.73"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.76"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.76"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.79"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.79"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.83"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.83"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.85"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.85"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.87"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.87"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@childNodes.90"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.90"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram"
+ child="/0/@diagram/@links.5"
+ groupName="links"
+ groupIcon="icons/linksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@topLevelNodes.0"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@topLevelNodes.0"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.3"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.3"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.4"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.4"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.5"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.5"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.6"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.6"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.7"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.7"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.8"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.8"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.9"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.9"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.10"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.10"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.11"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.11"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.12"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.12"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.13"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.13"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.14"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.14"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.15"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.15"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.16"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.16"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.17"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.17"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.18"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.18"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.19"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.19"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.20"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.20"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.21"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.21"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.22"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.22"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.23"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.23"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.24"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.24"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.25"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.25"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.26"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.26"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.27"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.27"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.28"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.28"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.29"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.29"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.30"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.30"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.31"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.31"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.32"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.32"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.33"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.33"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.34"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.34"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.35"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.35"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.36"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.36"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.37"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.37"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.38"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.38"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.39"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.39"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.40"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.40"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.41"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.41"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.42"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.42"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.43"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.43"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.44"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.44"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.45"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.45"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.46"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.46"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.47"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.47"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.48"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.48"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.49"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.49"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.50"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.50"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.51"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.51"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.52"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.52"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.53"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.53"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.54"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.54"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.55"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.55"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.56"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.56"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.57"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.57"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.58"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.58"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.59"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.59"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.60"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.60"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.64"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.64"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.65"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.65"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.67"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.67"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.68"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.68"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.69"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.69"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.70"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.70"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.71"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.71"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.72"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.72"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.73"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.73"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.74"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.74"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.76"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.76"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.77"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.77"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.78"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.78"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.79"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.79"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.80"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.80"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.81"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.81"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.82"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.82"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.83"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.83"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.84"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.84"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.85"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.85"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.86"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.86"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.87"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.87"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.88"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.88"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.89"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.89"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.90"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.90"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.91"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.91"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.92"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.92"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@links.2"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.2"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@links.3"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.3"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@links.4"
+ referenceType="out_target"
+ groupName="target"
+ groupIcon="icons/linkTargetNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.4"
+ child="/0/@diagram/@links.5"
+ referenceType="in_source"
+ groupName="incoming links"
+ groupIcon="icons/incomingLinksNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@links.5"
+ child="/0/@diagram/@childNodes.69"
+ referenceType="in_source"
+ groupName="source"
+ groupIcon="icons/linkSourceNavigatorGroup.gif"/>
+ <childReferences
+ parent="/0/@diagram/@childNodes.69"
+ child="/0/@diagram/@links.5"
+ referenceType="out_target"
+ groupName="outgoing links"
+ groupIcon="icons/outgoingLinksNavigatorGroup.gif"/>
+ </navigator>
+ <diagramUpdater/>
+ <propertySheet>
+ <tabs
+ xsi:type="gmfgen:GenStandardPropertyTab"
+ iD="appearance"/>
+ <tabs
+ xsi:type="gmfgen:GenStandardPropertyTab"
+ iD="diagram"/>
+ <tabs
+ xsi:type="gmfgen:GenCustomPropertyTab"
+ iD="domain"
+ label="Core">
+ <filter
+ xsi:type="gmfgen:TypeTabFilter">
+ <types>org.eclipse.gmf.runtime.notation.View</types>
+ <types>org.eclipse.gef.EditPart</types>
+ <generatedTypes>abstractNavigatorItem</generatedTypes>
+ </filter>
+ </tabs>
+ </propertySheet>
+ <domainGenModel
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
+ <expressionProviders>
+ <providers
+ xsi:type="gmfgen:GenJavaExpressionProvider"
+ injectExpressionBody="true">
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return true;"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if(source instanceof Action) {&#xD;&#xA;&#x9;// rule validateObjectFlow_validateNoActions&#xD;&#xA;&#x9;// rule workaround by addition of pins in case of Action&#xD;&#xA;&#x9;if(!ObjectFlowEditHelper.canStartNewObjectFlow((Action)source)) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof InputPin) {&#xD;&#xA;&#x9;// rule validateInputPin_validateOutgoingEdgesStructuredOnly&#xD;&#xA;&#x9;if(source.getOwner() instanceof StructuredActivityNode) {&#xD;&#xA;&#x9;&#x9;if(target != null &amp;&amp; !source.getOwner().equals(target.getInStructuredNode())) {&#xD;&#xA;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;} else {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof InitialNode) {&#xD;&#xA;&#x9;// rule validateInitialNode_validateControlEdges&#xD;&#xA;&#x9;return false;&#xD;&#xA;}&#xD;&#xA;if(source instanceof FinalNode) {&#xD;&#xA;&#x9;// rule validateFinalNode_validateNoOutgoingEdges&#xD;&#xA;&#x9;return false;&#xD;&#xA;}&#xD;&#xA;if(source instanceof JoinNode) {&#xD;&#xA;&#x9;// rule validateJoinNode_validateOneOutgoingEdge&#xD;&#xA;&#x9;if(!source.getOutgoings().isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;/*&#xD;&#xA;&#x9; * rule validateJoinNode_validateIncomingObjectFlow :&#xD;&#xA;&#x9; * We do not prevent creation of an outgoing ObjectFlow even if there is no incoming ObjectFlow.&#xD;&#xA;&#x9; * We let the possibility that the user intends to add an incoming ObjectFlow later.&#xD;&#xA;&#x9; */&#xD;&#xA;}&#xD;&#xA;if(source instanceof ForkNode) {&#xD;&#xA;&#x9;// rule validateForkNode_validateEdges on source Fork node&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = source.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;ActivityEdge incomingControlFlow = source.getIncoming(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null || incomingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is a ControlFlow which means there must be no ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof MergeNode) {&#xD;&#xA;&#x9;//rule validateMergeNode_validateOneOutgoingEdge&#xD;&#xA;&#x9;if(!source.getOutgoings().isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateMergeNode_validateEdges on source Merge node&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = source.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;ActivityEdge incomingControlFlow = source.getIncoming(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null || incomingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is a ControlFlow which means there must be no ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof DecisionNode) {&#xD;&#xA;&#x9;// rule validateDecisionNode_validateEdges on source Decision node&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = source.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;ActivityEdge incomingControlFlow = source.getIncoming(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null || incomingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is a ControlFlow which means there must be no ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if (source instanceof ActivityParameterNode) {&#xD;&#xA;&#x9;// rule validateActivityParameterNode_validateIncomingOrOutgoing&#xD;&#xA;&#x9;EList&lt;ActivityEdge> incomings = source.getIncomings();&#xD;&#xA;&#x9;if (!incomings.isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if(target instanceof Action) {&#xD;&#xA;&#x9;// rule validateObjectFlow_validateNoActions&#xD;&#xA;&#x9;// rule workaround by addition of pins in case of Action&#xD;&#xA;&#x9;if(!ObjectFlowEditHelper.canEndNewObjectFlow((Action)target)) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof OutputPin) {&#xD;&#xA;&#x9;// rule validateOutputPin_validateIncomingEdgesStructuredOnly&#xD;&#xA;&#x9;if(target.getOwner() instanceof StructuredActivityNode) {&#xD;&#xA;&#x9;&#x9;if(source != null &amp;&amp; !target.getOwner().equals(source.getInStructuredNode())) {&#xD;&#xA;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;} else {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof InitialNode) {&#xD;&#xA;&#x9;// rule validateInitialNode_validateNoIncomingEdges&#xD;&#xA;&#x9;return false;&#xD;&#xA;}&#xD;&#xA;if(target instanceof JoinNode) {&#xD;&#xA;&#x9;// rule validateJoinNode_validateIncomingObjectFlow&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;// the outgoing edge is a ControlFlow which means there must be no incoming ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof ForkNode) {&#xD;&#xA;&#x9;// rule validateForkNode_validateOneIncomingEdge&#xD;&#xA;&#x9;if(!target.getIncomings().isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateForkNode_validateEdges on target Fork node&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;ActivityEdge incomingControlFlow = target.getIncoming(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null || incomingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is a ControlFlow which means there must be no ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof MergeNode) {&#xD;&#xA;&#x9;// rule validateMergeNode_validateEdges on target Merge node&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;ActivityEdge incomingControlFlow = target.getIncoming(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null || incomingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is a ControlFlow which means there must be no ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof DecisionNode) {&#xD;&#xA;&#x9;// rule validateDecisionNode_validateIncomingOutgoingEdges&#xD;&#xA;&#x9;if(target.getIncomings().size() >= 2) {&#xD;&#xA;&#x9;&#x9;// no more than two incoming edges&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateDecisionNode_validateEdges on target Decision node&#xD;&#xA;&#x9;ActivityEdge outgoingControlFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;ActivityEdge incomingControlFlow = target.getIncoming(null, true, UMLPackage.eINSTANCE.getControlFlow());&#xD;&#xA;&#x9;if(outgoingControlFlow != null || incomingControlFlow != null) {&#xD;&#xA;&#x9;&#x9;/*&#xD;&#xA;&#x9;&#x9; * There is a ControlFlow which means there must be no&#xD;&#xA;&#x9;&#x9; * ObjectFlow but the decision flow itself.&#xD;&#xA;&#x9;&#x9; * We let the user insert up to one ObjectFlow for being&#xD;&#xA;&#x9;&#x9; * able to select the decision flow among existing&#xD;&#xA;&#x9;&#x9; * input flows.&#xD;&#xA;&#x9;&#x9; */&#xD;&#xA;&#x9;&#x9;if(target.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow()) != null) {&#xD;&#xA;&#x9;&#x9;&#x9;// there is already an object flow which is intended to become the decision flow&#xD;&#xA;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if (target instanceof ActivityParameterNode) {&#xD;&#xA;&#x9;// rule validateActivityParameterNode_validateIncomingOrOutgoing&#xD;&#xA;&#x9;EList&lt;ActivityEdge> outgoings = target.getOutgoings();&#xD;&#xA;&#x9;if (!outgoings.isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.diagram.common.actions.LabelHelper.INSTANCE.findName(it.eContainer(), it);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if(source instanceof ObjectNode) {&#xD;&#xA;&#x9;if(!((ObjectNode)source).isControlType()) {&#xD;&#xA;&#x9;&#x9;// rule validateControlFlow_validateObjectNodes&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof InputPin) {&#xD;&#xA;&#x9;// rule validateInputPin_validateOutgoingEdgesStructuredOnly&#xD;&#xA;&#x9;if(source.getOwner() instanceof StructuredActivityNode) {&#xD;&#xA;&#x9;&#x9;if(target != null &amp;&amp; !source.getOwner().equals(target.getInStructuredNode())) {&#xD;&#xA;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;} else {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof FinalNode) {&#xD;&#xA;&#x9;// rule validateFinalNode_validateNoOutgoingEdges&#xD;&#xA;&#x9;return false;&#xD;&#xA;}&#xD;&#xA;if(source instanceof JoinNode) {&#xD;&#xA;&#x9;// rule validateJoinNode_validateOneOutgoingEdge&#xD;&#xA;&#x9;if(!source.getOutgoings().isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateJoinNode_validateIncomingObjectFlow&#xD;&#xA;&#x9;ActivityEdge incomingObjectFlow = source.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;if(incomingObjectFlow != null) {&#xD;&#xA;&#x9;&#x9;// the outgoing edge must be an ObjectFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof ForkNode) {&#xD;&#xA;&#x9;// rule validateForkNode_validateEdges on source Fork node&#xD;&#xA;&#x9;ActivityEdge outgoingObjectFlow = source.getOutgoing(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;ActivityEdge incomingObjectFlow = source.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;if(outgoingObjectFlow != null || incomingObjectFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is an ObjectFlow which means there must be no ControlFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof MergeNode) {&#xD;&#xA;&#x9;//rule validateMergeNode_validateOneOutgoingEdge&#xD;&#xA;&#x9;if(!source.getOutgoings().isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateMergeNode_validateEdges on source Merge node&#xD;&#xA;&#x9;ActivityEdge outgoingObjectFlow = source.getOutgoing(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;ActivityEdge incomingObjectFlow = source.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;if(outgoingObjectFlow != null || incomingObjectFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is an ObjectFlow which means there must be no ControlFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(source instanceof DecisionNode) {&#xD;&#xA;&#x9;// rule validateDecisionNode_validateEdges on source Decision node&#xD;&#xA;&#x9;ActivityEdge outgoingObjectFlow = source.getOutgoing(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;int incomingObjectFlowNumber = 0;&#xD;&#xA;&#x9;for(ActivityEdge incomingEdge : source.getIncomings()) {&#xD;&#xA;&#x9;&#x9;if(incomingEdge instanceof ObjectFlow) {&#xD;&#xA;&#x9;&#x9;&#x9;incomingObjectFlowNumber++;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;if(outgoingObjectFlow != null || incomingObjectFlowNumber > 1) {&#xD;&#xA;&#x9;&#x9;// there is an ObjectFlow (not intended for decisionInputFlow) which means there must be no ControlFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if(target instanceof ObjectNode) {&#xD;&#xA;&#x9;if(!((ObjectNode)target).isControlType()) {&#xD;&#xA;&#x9;&#x9;// rule validateControlFlow_validateObjectNodes&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof OutputPin) {&#xD;&#xA;&#x9;// rule validateOutputPin_validateIncomingEdgesStructuredOnly&#xD;&#xA;&#x9;if(target.getOwner() instanceof StructuredActivityNode) {&#xD;&#xA;&#x9;&#x9;if(source != null &amp;&amp; !target.getOwner().equals(source.getInStructuredNode())) {&#xD;&#xA;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;} else {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof InitialNode) {&#xD;&#xA;&#x9;// rule validateInitialNode_validateNoIncomingEdges&#xD;&#xA;&#x9;return false;&#xD;&#xA;}&#xD;&#xA;if(target instanceof ForkNode) {&#xD;&#xA;&#x9;// rule validateForkNode_validateOneIncomingEdge&#xD;&#xA;&#x9;if(!target.getIncomings().isEmpty()) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateForkNode_validateEdges on target Fork node&#xD;&#xA;&#x9;ActivityEdge outgoingObjectFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;ActivityEdge incomingObjectFlow = target.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;if(outgoingObjectFlow != null || incomingObjectFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is an ObjectFlow which means there must be no ControlFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof MergeNode) {&#xD;&#xA;&#x9;// rule validateMergeNode_validateEdges on target Merge node&#xD;&#xA;&#x9;ActivityEdge outgoingObjectFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;ActivityEdge incomingObjectFlow = target.getIncoming(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;if(outgoingObjectFlow != null || incomingObjectFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is an ObjectFlow which means there must be no ControlFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}&#xD;&#xA;if(target instanceof DecisionNode) {&#xD;&#xA;&#x9;// rule validateDecisionNode_validateIncomingOutgoingEdges&#xD;&#xA;&#x9;if(target.getIncomings().size() >= 2) {&#xD;&#xA;&#x9;&#x9;// no more than two incoming edges&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;// rule validateDecisionNode_validateEdges on target Decision node&#xD;&#xA;&#x9;ActivityEdge outgoingObjectFlow = target.getOutgoing(null, true, UMLPackage.eINSTANCE.getObjectFlow());&#xD;&#xA;&#x9;ActivityEdge incomingObjectFlow = null;&#xD;&#xA;&#x9;for(ActivityEdge incomingEdge : target.getIncomings()) {&#xD;&#xA;&#x9;&#x9;// filter the decision flow&#xD;&#xA;&#x9;&#x9;if(incomingEdge instanceof ObjectFlow &amp;&amp; incomingEdge != ((DecisionNode)target).getDecisionInputFlow()) {&#xD;&#xA;&#x9;&#x9;&#x9;incomingObjectFlow = incomingEdge;&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;if(outgoingObjectFlow != null || incomingObjectFlow != null) {&#xD;&#xA;&#x9;&#x9;// there is an ObjectFlow which means there must be no ControlFlow&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;}"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateInputOutputParameter(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateCompatibleType(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateSourceAndTarget(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateCompatibleTypes(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateSameUpperBounds(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateTarget(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateTransformationBehaviour(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateInputAndOutputParameter(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateIncomingObjectOneInputParameter(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateIncomingControlOneInputParameter(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateTwoInputParameters(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateInterruptibleEdge(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateException_HandlerBody_Constraint4(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateException_StructuredActivityNode_Constraint2(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateException_SourceAndTargetEdge_Constraint1(context, ctx);"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="return UMLValidationHelper.validateException_StructuredActivityNode_Constraint3(context, ctx);"/>
+ <expressions
+ body="org.eclipse.uml2.uml.LiteralString literalString=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();&#xD;&#xA;literalString.setValue(&quot;&quot;);&#xD;&#xA;return literalString;"/>
+ </providers>
+ <providers
+ xsi:type="gmfgen:GenExpressionInterpreter">
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(CallOperationAction)&#xD;&#xA;then self.owner.oclAsType(CallOperationAction).argument->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(CallOperationAction)&#xD;&#xA;then self.owner.oclAsType(CallOperationAction).argument->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(CallOperationAction)&#xD;&#xA;then self.owner.oclAsType(CallOperationAction).argument->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(CallOperationAction)&#xD;&#xA;then self.owner.oclAsType(CallOperationAction).target = self&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(CallOperationAction)&#xD;&#xA;then self.owner.oclAsType(CallOperationAction).target = self&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(CallOperationAction)&#xD;&#xA;then self.owner.oclAsType(CallOperationAction).target = self&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPrecondition->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPostcondition->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPrecondition->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPostcondition->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPrecondition->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPostcondition->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPrecondition->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(Action)&#xD;&#xA;then self.owner.oclAsType(Action).localPostcondition->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(SendObjectAction)&#xD;&#xA;then self.owner.oclAsType(SendObjectAction).request = self&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(SendObjectAction)&#xD;&#xA;then self.owner.oclAsType(SendObjectAction).request = self&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(SendObjectAction)&#xD;&#xA;then self.owner.oclAsType(SendObjectAction).request = self&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(SendObjectAction)&#xD;&#xA;then self.owner.oclAsType(SendObjectAction).target = self&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(SendObjectAction)&#xD;&#xA;then self.owner.oclAsType(SendObjectAction).target = self&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(SendObjectAction)&#xD;&#xA;then self.owner.oclAsType(SendObjectAction).target = self&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(SendSignalAction)&#xD;&#xA;then self.owner.oclAsType(SendSignalAction).argument->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(SendSignalAction)&#xD;&#xA;then self.owner.oclAsType(SendSignalAction).argument->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(SendSignalAction)&#xD;&#xA;then self.owner.oclAsType(SendSignalAction).argument->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(SendSignalAction)&#xD;&#xA;then self.owner.oclAsType(SendSignalAction).target = self&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(SendSignalAction)&#xD;&#xA;then self.owner.oclAsType(SendSignalAction).target = self&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(SendSignalAction)&#xD;&#xA;then self.owner.oclAsType(SendSignalAction).target = self&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(ExpansionRegion)&#xD;&#xA;then self.owner.oclAsType(ExpansionRegion).inputElement->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(ExpansionRegion)&#xD;&#xA;then self.owner.oclAsType(ExpansionRegion).outputElement->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ body="' '"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(AddStructuralFeatureValueAction)&#xD;&#xA;then self.owner.oclAsType(AddStructuralFeatureValueAction).object->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(AddStructuralFeatureValueAction)&#xD;&#xA;then self.owner.oclAsType(AddStructuralFeatureValueAction).value->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(DestroyObjectAction)&#xD;&#xA;then self.owner.oclAsType(DestroyObjectAction).target->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(ReadVariableAction)&#xD;&#xA;then self.owner.oclAsType(ReadVariableAction).result->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(AddVariableValueAction)&#xD;&#xA;then self.owner.oclAsType(AddVariableValueAction).insertAt->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(AddVariableValueAction)&#xD;&#xA;then self.owner.oclAsType(AddVariableValueAction).value->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(BroadcastSignalAction)&#xD;&#xA;then self.owner.oclAsType(BroadcastSignalAction).argument->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.incoming->isEmpty()"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="not self.source.oclIsKindOf(InitialNode)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.outgoing->isEmpty()"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="-- must be applied on corresponding parameter, if only it exists&#xD;&#xA;true&#xD;&#xA;--not self.isUnique"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="-- must be applied on corresponding parameter, if only it exists&#xD;&#xA;true&#xD;&#xA;--((not self.selection.oclIsUndefined()) implies self.isOrdered) and&#xD;&#xA;--(self.isOrdered implies (not self.selection.oclIsUndefined()))"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="true&#xD;&#xA;-- Already checked by validateControlFlow_validateObjectNodes"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.isControl implies self.isControlType"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.outgoing.target->forAll(inStructuredNode=self.owner)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(not self.fromAction.oclIsUndefined()) implies&#xD;&#xA;self.fromAction.output->size() = 1"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(not self.fromAction.oclIsUndefined()) implies&#xD;&#xA;self.fromAction.input->forAll(oclIsKindOf(ActionInputPin))"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(not self.fromAction.oclIsUndefined()) implies&#xD;&#xA;(self.fromAction.incoming->isEmpty() and self.fromAction.outgoing->isEmpty()&#xD;&#xA;and self.fromAction.input->forAll(incoming->isEmpty() and outgoing->isEmpty())&#xD;&#xA;and self.fromAction.output->forAll(incoming->isEmpty() and outgoing->isEmpty()))"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.incoming->isEmpty()"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.incoming.source->forAll(inStructuredNode=self.owner)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.owner.oclIsKindOf(Activity)&#xD;&#xA;or self.owner.oclIsKindOf(ActivityGroup)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="true&#xD;&#xA;-- constraint is checked by the model structure"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="-- This constraint is implemented separately for not being in live mode.&#xD;&#xA;-- Other constraints have been relaxed to supprot null source and target&#xD;&#xA;not self.source.oclIsUndefined() and not self.target.oclIsUndefined()"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(self.source.oclIsUndefined() or not self.source.oclIsKindOf(Action))&#xD;&#xA;and (self.target.oclIsUndefined() or not self.target.oclIsKindOf(Action))"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(not self.selection.oclIsUndefined()) implies self.source.oclIsKindOf(ObjectNode)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.isMulticast implies not self.isMultireceive"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(self.source.oclIsUndefined() or&#xD;&#xA;&#x9;(self.source.oclIsKindOf(ObjectNode) implies&#xD;&#xA;&#x9;self.source.oclAsType(ObjectNode).isControlType)&#xD;&#xA;) and&#xD;&#xA;(self.target.oclIsUndefined() or&#xD;&#xA;&#x9;(self.target.oclIsKindOf(ObjectNode) implies&#xD;&#xA;&#x9;self.target.oclAsType(ObjectNode).isControlType)&#xD;&#xA;)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.outgoing->size() > 0 and&#xD;&#xA;self.incoming->size() > 0 and&#xD;&#xA;self.incoming->size() &lt;= 2"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(self.incoming->reject(i | i = self.decisionInputFlow)->forAll(oclIsKindOf(ObjectFlow)) and&#xD;&#xA; self.outgoing->forAll(oclIsKindOf(ObjectFlow)) ) or&#xD;&#xA;(self.incoming->reject(i | i = self.decisionInputFlow)->forAll(oclIsKindOf(ControlFlow)) and&#xD;&#xA; self.outgoing->forAll(oclIsKindOf(ControlFlow)) )"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(not self.decisionInputFlow.oclIsUndefined()) implies&#xD;&#xA;self.incoming->includes(self.decisionInputFlow)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(not self.decisionInput.oclIsUndefined()) implies (&#xD;&#xA;self.decisionInput.ownedParameter->select(&#xD;&#xA; direction = ParameterDirectionKind::out or&#xD;&#xA; direction = ParameterDirectionKind::inout)->size() = 0&#xD;&#xA;and self.decisionInput.ownedParameter->select(&#xD;&#xA; direction = ParameterDirectionKind::return)->size() = 1&#xD;&#xA;)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(not self.decisionInput.oclIsUndefined()) implies (&#xD;&#xA; (self.decisionInputFlow.oclIsUndefined() and&#xD;&#xA; self.incoming->select(i | i.oclIsKindOf(ControlFlow))->size() = 1&#xD;&#xA; ) implies&#xD;&#xA; self.decisionInput.ownedParameter->select(&#xD;&#xA; direction = ParameterDirectionKind::_in)->size() = 0&#xD;&#xA;)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.outgoing->size() = 1"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(self.outgoing->exists(e | e.oclIsKindOf(ObjectFlow)) implies&#xD;&#xA; self.incoming->forAll(e | e.oclIsKindOf(ObjectFlow))) and&#xD;&#xA;(self.outgoing->exists(e | e.oclIsKindOf(ControlFlow)) implies&#xD;&#xA; self.incoming->forAll(e | e.oclIsKindOf(ControlFlow)))"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.incoming->size() = 1"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(self.incoming->exists(e | e.oclIsKindOf(ObjectFlow)) implies&#xD;&#xA; self.outgoing->forAll(e | e.oclIsKindOf(ObjectFlow))) and&#xD;&#xA;(self.incoming->exists(e | e.oclIsKindOf(ControlFlow)) implies&#xD;&#xA; self.outgoing->forAll(e | e.oclIsKindOf(ControlFlow)))"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.outgoing->size() = 1"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(self.incoming->select(e | e.oclIsKindOf(ObjectFlow))->notEmpty() implies&#xD;&#xA; self.outgoing->exists(e | e.oclIsKindOf(ObjectFlow))) and&#xD;&#xA;(self.incoming->select(e | e.oclIsKindOf(ObjectFlow))->isEmpty() implies&#xD;&#xA; self.outgoing->exists(e | e.oclIsKindOf(ControlFlow)))"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(self.incoming->notEmpty() implies self.outgoing->isEmpty()) and&#xD;&#xA;(self.outgoing->notEmpty() implies self.incoming->isEmpty())"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(not self.classifier.oclIsUndefined()) implies (self.classifier.isAbstract = false)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(not self.classifier.oclIsUndefined()) implies (not self.classifier.oclIsKindOf(uml::AssociationClass))"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.structuralFeature.featuringClassifier->size() = 1"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.value->notEmpty() implies self.value.type = self.structuralFeature.type"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="result->notEmpty() implies self.result.type = self.object.type"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.value -> notEmpty()"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.structuralFeature.featuringClassifier->size() = 1"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.target.type->size() = 0"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(not self.structuralFeature.oclIsUndefined()) implies (self.structuralFeature.isStatic = false)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.structuralFeature.featuringClassifier.oclAsType(Type)->includes(self.object.type) or&#xD;&#xA;self.structuralFeature.oclAsType(Property).opposite.type = self.object.type"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.object.lowerBound()=1 and self.object.upperBound()=1"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.structuralFeature.featuringClassifier->size() = 1"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.value -> notEmpty()"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.value -> notEmpty() implies self.value.type = self.variable.type"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.value.lowerBound()=1 and self.value.upperBound()=1"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.variable.isAccessibleBy(self)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.result.type =self.variable.type and self.result.isOrdered = self.variable.isOrdered"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(self.result.lowerBound() &lt;= self.variable.lowerBound()) and (self.result.upperBound() >= self.variable.lowerBound())"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="((not self.handlerBody.oclIsUndefined()) and (not self.exceptionInput.oclIsUndefined())) implies( let pins : Collection(Element) = self.handlerBody.allOwnedElements()->select(e : Element | e.oclIsKindOf(Pin)) in pins->forAll(e : Element | e.oclIsKindOf(Pin) implies e = self.exceptionInput))"/>
+ </providers>
+ </expressionProviders>
+ <labelParsers
+ extensibleViaService="true">
+ <implementations
+ xsi:type="gmfgen:PredefinedParser"
+ uses="/0/@diagram/@childNodes.6/@labels.0/@modelFacet /0/@diagram/@childNodes.24/@labels.0/@modelFacet /0/@diagram/@childNodes.25/@labels.0/@modelFacet /0/@diagram/@childNodes.26/@labels.0/@modelFacet /0/@diagram/@childNodes.27/@labels.0/@modelFacet /0/@diagram/@childNodes.28/@labels.0/@modelFacet /0/@diagram/@childNodes.29/@labels.0/@modelFacet /0/@diagram/@childNodes.30/@labels.0/@modelFacet /0/@diagram/@childNodes.31/@labels.0/@modelFacet /0/@diagram/@childNodes.37/@labels.0/@modelFacet /0/@diagram/@childNodes.44/@labels.0/@modelFacet /0/@diagram/@childNodes.54/@labels.0/@modelFacet /0/@diagram/@childNodes.67/@labels.0/@modelFacet /0/@diagram/@childNodes.70/@labels.0/@modelFacet /0/@diagram/@childNodes.73/@labels.0/@modelFacet /0/@diagram/@childNodes.76/@labels.0/@modelFacet /0/@diagram/@childNodes.79/@labels.0/@modelFacet /0/@diagram/@childNodes.83/@labels.0/@modelFacet /0/@diagram/@childNodes.85/@labels.0/@modelFacet /0/@diagram/@childNodes.87/@labels.0/@modelFacet /0/@diagram/@childNodes.90/@labels.0/@modelFacet /0/@diagram/@childNodes.72/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@links.2/@labels.0/@modelFacet /0/@diagram/@links.3/@labels.0/@modelFacet /0/@diagram/@childNodes.93/@labels.0/@modelFacet /0/@diagram/@childNodes.67/@labels.1/@modelFacet /0/@diagram/@childNodes.90/@labels.1/@modelFacet /0/@diagram/@childNodes.87/@labels.1/@modelFacet /0/@diagram/@childNodes.16/@labels.1/@modelFacet /0/@diagram/@childNodes.79/@labels.1/@modelFacet /0/@diagram/@childNodes.85/@labels.1/@modelFacet /0/@diagram/@childNodes.83/@labels.1/@modelFacet /0/@diagram/@childNodes.76/@labels.1/@modelFacet /0/@diagram/@childNodes.73/@labels.1/@modelFacet /0/@diagram/@childNodes.70/@labels.1/@modelFacet /0/@diagram/@childNodes.54/@labels.1/@modelFacet /0/@diagram/@childNodes.37/@labels.1/@modelFacet /0/@diagram/@childNodes.6/@labels.1/@modelFacet /0/@diagram/@childNodes.11/@labels.1/@modelFacet /0/@diagram/@childNodes.92/@labels.2/@modelFacet /0/@diagram/@childNodes.36/@labels.2/@modelFacet /0/@diagram/@childNodes.44/@labels.1/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.3/@labels.0/@modelFacet /0/@diagram/@childNodes.5/@labels.0/@modelFacet /0/@diagram/@childNodes.32/@labels.0/@modelFacet /0/@diagram/@childNodes.33/@labels.0/@modelFacet /0/@diagram/@childNodes.34/@labels.0/@modelFacet /0/@diagram/@childNodes.35/@labels.1/@modelFacet /0/@diagram/@childNodes.52/@labels.3/@modelFacet"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.89/@labels.1/@modelFacet /0/@diagram/@childNodes.49/@labels.2/@modelFacet /0/@diagram/@childNodes.82/@labels.1/@modelFacet /0/@diagram/@childNodes.53/@labels.1/@modelFacet /0/@diagram/@childNodes.81/@labels.1/@modelFacet /0/@diagram/@childNodes.12/@labels.2/@modelFacet /0/@diagram/@childNodes.22/@labels.2/@modelFacet /0/@diagram/@childNodes.45/@labels.2/@modelFacet /0/@diagram/@childNodes.47/@labels.1/@modelFacet /0/@diagram/@childNodes.23/@labels.1/@modelFacet /0/@diagram/@links.2/@labels.6/@modelFacet /0/@diagram/@childNodes.19/@labels.1/@modelFacet /0/@diagram/@childNodes.4/@labels.1/@modelFacet /0/@diagram/@childNodes.15/@labels.1/@modelFacet /0/@diagram/@childNodes.43/@labels.1/@modelFacet /0/@diagram/@childNodes.80/@labels.1/@modelFacet /0/@diagram/@childNodes.91/@labels.2/@modelFacet /0/@diagram/@childNodes.84/@labels.1/@modelFacet /0/@diagram/@childNodes.13/@labels.2/@modelFacet /0/@diagram/@childNodes.35/@labels.2/@modelFacet /0/@diagram/@childNodes.9/@labels.1/@modelFacet /0/@diagram/@childNodes.33/@labels.1/@modelFacet /0/@diagram/@childNodes.88/@labels.1/@modelFacet /0/@diagram/@childNodes.20/@labels.1/@modelFacet /0/@diagram/@childNodes.52/@labels.2/@modelFacet /0/@diagram/@childNodes.41/@labels.2/@modelFacet /0/@diagram/@childNodes.32/@labels.2/@modelFacet /0/@diagram/@childNodes.77/@labels.1/@modelFacet /0/@diagram/@childNodes.8/@labels.2/@modelFacet /0/@diagram/@childNodes.34/@labels.1/@modelFacet /0/@diagram/@links.3/@labels.3/@modelFacet /0/@diagram/@childNodes.74/@labels.1/@modelFacet /0/@diagram/@childNodes.86/@labels.1/@modelFacet /0/@diagram/@childNodes.17/@labels.2/@modelFacet /0/@diagram/@childNodes.50/@labels.1/@modelFacet /0/@diagram/@childNodes.78/@labels.1/@modelFacet /0/@diagram/@childNodes.10/@labels.1/@modelFacet /0/@diagram/@childNodes.21/@labels.2/@modelFacet /0/@diagram/@childNodes.14/@labels.1/@modelFacet /0/@diagram/@childNodes.55/@labels.1/@modelFacet /0/@diagram/@childNodes.71/@labels.1/@modelFacet /0/@diagram/@childNodes.39/@labels.2/@modelFacet /0/@diagram/@childNodes.18/@labels.2/@modelFacet /0/@diagram/@childNodes.42/@labels.2/@modelFacet /0/@diagram/@childNodes.3/@labels.1/@modelFacet /0/@diagram/@childNodes.46/@labels.2/@modelFacet /0/@diagram/@childNodes.48/@labels.2/@modelFacet /0/@diagram/@childNodes.7/@labels.2/@modelFacet /0/@diagram/@childNodes.38/@labels.2/@modelFacet /0/@diagram/@childNodes.5/@labels.1/@modelFacet /0/@diagram/@childNodes.40/@labels.1/@modelFacet /0/@diagram/@childNodes.66/@labels.1/@modelFacet /0/@diagram/@childNodes.63/@labels.1/@modelFacet /0/@diagram/@childNodes.62/@labels.1/@modelFacet /0/@diagram/@childNodes.61/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.72/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.1/@modelFacet /0/@diagram/@childNodes.75/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivitySingleExecutionParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.0/@labelModelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ParameterParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.16/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.CallOperationActionParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.11/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.CallBehaviorActionParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.15/@labels.0/@modelFacet /0/@diagram/@childNodes.71/@labels.0/@modelFacet /0/@diagram/@childNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.42/@labels.0/@modelFacet /0/@diagram/@childNodes.14/@labels.0/@modelFacet /0/@diagram/@childNodes.21/@labels.0/@modelFacet /0/@diagram/@childNodes.88/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.47/@labels.0/@modelFacet /0/@diagram/@childNodes.50/@labels.0/@modelFacet /0/@diagram/@childNodes.86/@labels.0/@modelFacet /0/@diagram/@childNodes.78/@labels.0/@modelFacet /0/@diagram/@childNodes.89/@labels.0/@modelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet /0/@diagram/@childNodes.38/@labels.0/@modelFacet /0/@diagram/@childNodes.22/@labels.0/@modelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.17/@labels.0/@modelFacet /0/@diagram/@childNodes.81/@labels.0/@modelFacet /0/@diagram/@childNodes.39/@labels.0/@modelFacet /0/@diagram/@childNodes.48/@labels.0/@modelFacet /0/@diagram/@childNodes.91/@labels.0/@modelFacet /0/@diagram/@childNodes.49/@labels.0/@modelFacet /0/@diagram/@childNodes.45/@labels.0/@modelFacet /0/@diagram/@childNodes.77/@labels.0/@modelFacet /0/@diagram/@childNodes.82/@labels.0/@modelFacet /0/@diagram/@childNodes.80/@labels.0/@modelFacet /0/@diagram/@childNodes.20/@labels.0/@modelFacet /0/@diagram/@childNodes.40/@labels.0/@modelFacet /0/@diagram/@childNodes.23/@labels.0/@modelFacet /0/@diagram/@childNodes.74/@labels.0/@modelFacet /0/@diagram/@childNodes.53/@labels.0/@modelFacet /0/@diagram/@childNodes.13/@labels.0/@modelFacet /0/@diagram/@childNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.19/@labels.0/@modelFacet /0/@diagram/@childNodes.41/@labels.0/@modelFacet /0/@diagram/@childNodes.84/@labels.0/@modelFacet /0/@diagram/@childNodes.18/@labels.0/@modelFacet /0/@diagram/@childNodes.43/@labels.0/@modelFacet /0/@diagram/@childNodes.55/@labels.0/@modelFacet /0/@diagram/@childNodes.46/@labels.0/@modelFacet /0/@diagram/@childNodes.66/@labels.0/@modelFacet /0/@diagram/@childNodes.63/@labels.0/@modelFacet /0/@diagram/@childNodes.62/@labels.0/@modelFacet /0/@diagram/@childNodes.61/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.PinParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.8/@labels.1/@modelFacet /0/@diagram/@childNodes.21/@labels.1/@modelFacet /0/@diagram/@childNodes.42/@labels.1/@modelFacet /0/@diagram/@childNodes.38/@labels.1/@modelFacet /0/@diagram/@childNodes.39/@labels.1/@modelFacet /0/@diagram/@childNodes.22/@labels.1/@modelFacet /0/@diagram/@childNodes.13/@labels.1/@modelFacet /0/@diagram/@childNodes.17/@labels.1/@modelFacet /0/@diagram/@childNodes.12/@labels.1/@modelFacet /0/@diagram/@childNodes.49/@labels.1/@modelFacet /0/@diagram/@childNodes.91/@labels.1/@modelFacet /0/@diagram/@childNodes.46/@labels.1/@modelFacet /0/@diagram/@childNodes.41/@labels.1/@modelFacet /0/@diagram/@childNodes.18/@labels.1/@modelFacet /0/@diagram/@childNodes.7/@labels.1/@modelFacet /0/@diagram/@childNodes.48/@labels.1/@modelFacet /0/@diagram/@childNodes.45/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.PinValueParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.3/@labels.1/@modelFacet /0/@diagram/@links.2/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivityEdgeWeightParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.35/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.JoinSpecParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.32/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.InputDecisionParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.2/@labels.3/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectFlowTransformationParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.2/@labels.2/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectFlowSelectionParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.2/@labels.4/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.DecisionInputFlowParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.3/@labels.2/@modelFacet /0/@diagram/@links.2/@labels.5/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.EdgeGuardParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.51/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivityParameterNodeParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.52/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.AcceptEventActionParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.52/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.AcceptTimeEventActionParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.65/@labels.0/@modelFacet /0/@diagram/@childNodes.60/@labels.0/@modelFacet /0/@diagram/@childNodes.56/@labels.0/@modelFacet /0/@diagram/@childNodes.64/@labels.0/@modelFacet /0/@diagram/@childNodes.57/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.StructuredActivityNodeKeywordParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.4/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ExceptionHandlerTypeParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.36/@labels.0/@modelFacet /0/@diagram/@childNodes.92/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectNodeParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.36/@labels.1/@modelFacet /0/@diagram/@childNodes.92/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectNodeSelectionParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.26/@labels.1/@modelFacet /0/@diagram/@childNodes.25/@labels.1/@modelFacet /0/@diagram/@childNodes.28/@labels.1/@modelFacet /0/@diagram/@childNodes.24/@labels.1/@modelFacet /0/@diagram/@childNodes.31/@labels.1/@modelFacet /0/@diagram/@childNodes.30/@labels.1/@modelFacet /0/@diagram/@childNodes.27/@labels.1/@modelFacet /0/@diagram/@childNodes.29/@labels.1/@modelFacet /0/@diagram/@childNodes.93/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.69/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.2/@labelModelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.PostConditionConstraintLabelParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.1/@labelModelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.activity.parser.custom.PreConditionConstraintLabelParser"/>
+ </labelParsers>
+ <contextMenus
+ iD="org.eclipse.papyrus.uml.diagram.activity.part.LoadResourceAction"
+ context="/0/@diagram">
+ <items
+ xsi:type="gmfgen:LoadResourceAction"/>
+ </contextMenus>
+ </gmfgen:GenEditorGenerator>
+ <papyrusgmfgenextension:PapyrusExtensionRootNode
+ comment="Papyrus Extensions">
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add superclass for floating Label"
+ genView="/0/@diagram/@childNodes.67/@labels.1 /0/@diagram/@childNodes.87/@labels.1 /0/@diagram/@childNodes.90/@labels.1 /0/@diagram/@childNodes.16/@labels.1 /0/@diagram/@childNodes.6/@labels.1 /0/@diagram/@childNodes.37/@labels.1 /0/@diagram/@childNodes.54/@labels.1 /0/@diagram/@childNodes.70/@labels.1 /0/@diagram/@childNodes.73/@labels.1 /0/@diagram/@childNodes.76/@labels.1 /0/@diagram/@childNodes.79/@labels.1 /0/@diagram/@childNodes.83/@labels.1 /0/@diagram/@childNodes.85/@labels.1 /0/@diagram/@childNodes.11/@labels.1 /0/@diagram/@childNodes.92/@labels.2 /0/@diagram/@childNodes.36/@labels.2 /0/@diagram/@childNodes.44/@labels.1 /0/@diagram/@childNodes.3/@labels.0 /0/@diagram/@childNodes.4/@labels.0 /0/@diagram/@childNodes.5/@labels.0 /0/@diagram/@childNodes.32/@labels.0 /0/@diagram/@childNodes.33/@labels.0 /0/@diagram/@childNodes.34/@labels.0 /0/@diagram/@childNodes.35/@labels.1 /0/@diagram/@childNodes.52/@labels.3"
+ name="FloatingLabelEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Elements that inherits RoundedCompartmentEditPart"
+ genView="/0/@diagram/@childNodes.87 /0/@diagram/@childNodes.67 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.68 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.52"
+ name="Rounded Compartment EP inheritance"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Elements that inherits RoundedBorderNamedElementEditPart"
+ genView="/0/@diagram/@childNodes.51"
+ name="Rounded Border Named Element Edit Part inheritance"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="This extension enables to draw a rake on a CallBehaviorActionEditPart linked to an activity"
+ name="CallBehaviorAction"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart">
+ <propRefreshHook
+ comment="Add/Remove the RakeFigure when an Activity is selected as behavior or deselected"
+ classpath=""
+ triggeringCondition="resolveSemanticElement() instanceof CallBehaviorAction &amp;&amp; resolveSemanticElement().equals(event.getNotifier()) &amp;&amp; event.getFeature().equals(UMLPackage.eINSTANCE.getCallBehaviorAction_Behavior())"
+ action="CallBehaviorAction action = (CallBehaviorAction) resolveSemanticElement(); if (action.getBehavior() instanceof Activity) { getPrimaryShape().displayRake(true); } else { &#x9;getPrimaryShape().displayRake(false); }"/>
+ </extensionNodes>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocator"
+ comment="Affixed Pin locator for Actions"
+ classpath="org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator"
+ genChildSideAffixedNode="/0/@diagram/@childNodes.38 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.20 /0/@diagram/@childNodes.21 /0/@diagram/@childNodes.22 /0/@diagram/@childNodes.23 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.50 /0/@diagram/@childNodes.53 /0/@diagram/@childNodes.55 /0/@diagram/@childNodes.71 /0/@diagram/@childNodes.74 /0/@diagram/@childNodes.77 /0/@diagram/@childNodes.78 /0/@diagram/@childNodes.80 /0/@diagram/@childNodes.81 /0/@diagram/@childNodes.82 /0/@diagram/@childNodes.84 /0/@diagram/@childNodes.86 /0/@diagram/@childNodes.88 /0/@diagram/@childNodes.89 /0/@diagram/@childNodes.91 /0/@diagram/@childNodes.66"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocator"
+ comment="Affixed Activity Parameter Node locator for Activity"
+ classpath="org.eclipse.papyrus.uml.diagram.activity.locator.ParameterNodeLocator"
+ genChildSideAffixedNode="/0/@diagram/@childNodes.51"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocator"
+ comment="Affixed Expansion Node locator for Activity"
+ classpath="org.eclipse.papyrus.uml.diagram.activity.locator.ExpansionNodePositionLocator"
+ genChildSideAffixedNode="/0/@diagram/@childNodes.58 /0/@diagram/@childNodes.59"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Node with label for named element"
+ name="NamedElementEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Node with no name"
+ name="NodeEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="link that to intherits from UML specificities"
+ genView="/0/@diagram/@links.3 /0/@diagram/@links.2"
+ name="UML link inheritance"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="It specify the super class for the shape editpart"
+ genView="/0/@diagram/@childNodes.75"
+ name="AbstractShapeEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShapeEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="this is an extension for constraint "
+ genView="/0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.93"
+ name="ConstraintEditPart extension"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="this is an extension to manage the comment"
+ genView="/0/@diagram/@childNodes.69"
+ name="comment extended node"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="elements that intherit form UMLNodeEditpart"
+ name="UMLNodeEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add inheritance to BorderNamedElementEditPart"
+ name="BorderNamedElementEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.BorderNamedElementEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="HiddenName"
+ role="Name"
+ iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png"
+ linkLabels="/0/@diagram/@links.2/@labels.0 /0/@diagram/@links.3/@labels.0"
+ visibleByDefault="false"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="Name"
+ role="Name"
+ iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png"
+ externalNodeLabels="/0/@diagram/@childNodes.75/@labels.0"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="HiddenWeight"
+ role="Weight"
+ linkLabels="/0/@diagram/@links.2/@labels.1 /0/@diagram/@links.3/@labels.1"
+ visibleByDefault="false"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="Guard"
+ role="Guard"
+ linkLabels="/0/@diagram/@links.3/@labels.2"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="HiddenGuard"
+ role="Guard"
+ linkLabels="/0/@diagram/@links.2/@labels.5"
+ visibleByDefault="false"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="Stereotype"
+ role="Stereotype"
+ iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/stereotype.gif"
+ linkLabels="/0/@diagram/@links.2/@labels.6 /0/@diagram/@links.3/@labels.3"
+ externalNodeLabels="/0/@diagram/@childNodes.3/@labels.1 /0/@diagram/@childNodes.4/@labels.1 /0/@diagram/@childNodes.5/@labels.1 /0/@diagram/@childNodes.7/@labels.2 /0/@diagram/@childNodes.8/@labels.2 /0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@childNodes.10/@labels.1 /0/@diagram/@childNodes.12/@labels.2 /0/@diagram/@childNodes.13/@labels.2 /0/@diagram/@childNodes.14/@labels.1 /0/@diagram/@childNodes.15/@labels.1 /0/@diagram/@childNodes.17/@labels.2 /0/@diagram/@childNodes.18/@labels.2 /0/@diagram/@childNodes.19/@labels.1 /0/@diagram/@childNodes.20/@labels.1 /0/@diagram/@childNodes.21/@labels.2 /0/@diagram/@childNodes.22/@labels.2 /0/@diagram/@childNodes.23/@labels.1 /0/@diagram/@childNodes.32/@labels.2 /0/@diagram/@childNodes.33/@labels.1 /0/@diagram/@childNodes.34/@labels.1 /0/@diagram/@childNodes.35/@labels.2 /0/@diagram/@childNodes.38/@labels.2 /0/@diagram/@childNodes.39/@labels.2 /0/@diagram/@childNodes.40/@labels.1 /0/@diagram/@childNodes.41/@labels.2 /0/@diagram/@childNodes.42/@labels.2 /0/@diagram/@childNodes.43/@labels.1 /0/@diagram/@childNodes.45/@labels.2 /0/@diagram/@childNodes.46/@labels.2 /0/@diagram/@childNodes.47/@labels.1 /0/@diagram/@childNodes.48/@labels.2 /0/@diagram/@childNodes.49/@labels.2 /0/@diagram/@childNodes.50/@labels.1 /0/@diagram/@childNodes.52/@labels.2 /0/@diagram/@childNodes.53/@labels.1 /0/@diagram/@childNodes.55/@labels.1 /0/@diagram/@childNodes.71/@labels.1 /0/@diagram/@childNodes.74/@labels.1 /0/@diagram/@childNodes.77/@labels.1 /0/@diagram/@childNodes.80/@labels.1 /0/@diagram/@childNodes.81/@labels.1 /0/@diagram/@childNodes.82/@labels.1 /0/@diagram/@childNodes.84/@labels.1 /0/@diagram/@childNodes.86/@labels.1 /0/@diagram/@childNodes.88/@labels.1 /0/@diagram/@childNodes.89/@labels.1 /0/@diagram/@childNodes.91/@labels.2"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="Selection"
+ role="Selection"
+ linkLabels="/0/@diagram/@links.2/@labels.2"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="Transformation"
+ role="Transformation"
+ linkLabels="/0/@diagram/@links.2/@labels.3"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="DecisionInputFlow"
+ role="DecisionInputFlow"
+ iconPathRole=""
+ linkLabels="/0/@diagram/@links.2/@labels.4"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:EditPartUsingDeleteService"
+ comment=""
+ name="Delete service elements"
+ genView="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.20 /0/@diagram/@childNodes.21 /0/@diagram/@childNodes.22 /0/@diagram/@childNodes.23 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.50 /0/@diagram/@childNodes.53 /0/@diagram/@childNodes.55 /0/@diagram/@childNodes.56 /0/@diagram/@childNodes.60 /0/@diagram/@childNodes.64 /0/@diagram/@childNodes.65 /0/@diagram/@childNodes.77 /0/@diagram/@childNodes.78 /0/@diagram/@childNodes.80 /0/@diagram/@childNodes.81 /0/@diagram/@childNodes.82 /0/@diagram/@childNodes.84 /0/@diagram/@childNodes.86 /0/@diagram/@childNodes.88 /0/@diagram/@childNodes.89 /0/@diagram/@childNodes.91 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.32 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.52 /0/@diagram/@childNodes.54 /0/@diagram/@childNodes.83 /0/@diagram/@childNodes.85 /0/@diagram/@childNodes.87 /0/@diagram/@childNodes.90 /0/@diagram/@childNodes.92 /0/@diagram/@childNodes.73 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.76 /0/@diagram/@childNodes.72 /0/@diagram/@childNodes.68 /0/@diagram/@childNodes.67 /0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.51 /0/@diagram/@childNodes.79 /0/@diagram/@childNodes.69 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.93 /0/@diagram/@links.3 /0/@diagram/@childNodes.24 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.57 /0/@diagram/@childNodes.66 /0/@diagram/@childNodes.70 /0/@diagram/@childNodes.71 /0/@diagram/@childNodes.75 /0/@diagram/@links.4 /0/@diagram/@links.2 /0/@diagram/@childNodes.74 /0/@diagram/@childNodes.61 /0/@diagram/@childNodes.63/@labels.0 /0/@diagram/@childNodes.62 /0/@diagram/@childNodes.63 /0/@diagram/@childNodes.58 /0/@diagram/@childNodes.59"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="elements that intherit form UMLNodeEditpart"
+ name="UMLNodeEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="set the super class as AbstractLabelEditPart"
+ genView="/0/@diagram/@childNodes.3/@labels.1 /0/@diagram/@childNodes.4/@labels.1 /0/@diagram/@childNodes.5/@labels.1 /0/@diagram/@childNodes.7/@labels.2 /0/@diagram/@childNodes.8/@labels.2 /0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@childNodes.10/@labels.1 /0/@diagram/@childNodes.12/@labels.2 /0/@diagram/@childNodes.13/@labels.2 /0/@diagram/@childNodes.14/@labels.1 /0/@diagram/@childNodes.15/@labels.1 /0/@diagram/@childNodes.17/@labels.2 /0/@diagram/@childNodes.18/@labels.2 /0/@diagram/@childNodes.19/@labels.1 /0/@diagram/@childNodes.20/@labels.1 /0/@diagram/@childNodes.21/@labels.2 /0/@diagram/@childNodes.22/@labels.2 /0/@diagram/@childNodes.23/@labels.1 /0/@diagram/@childNodes.32/@labels.2 /0/@diagram/@childNodes.33/@labels.1 /0/@diagram/@childNodes.34/@labels.1 /0/@diagram/@childNodes.35/@labels.2 /0/@diagram/@childNodes.38/@labels.2 /0/@diagram/@childNodes.39/@labels.2 /0/@diagram/@childNodes.40/@labels.1 /0/@diagram/@childNodes.41/@labels.2 /0/@diagram/@childNodes.42/@labels.2 /0/@diagram/@childNodes.43/@labels.1 /0/@diagram/@childNodes.45/@labels.2 /0/@diagram/@childNodes.46/@labels.2 /0/@diagram/@childNodes.47/@labels.1 /0/@diagram/@childNodes.48/@labels.2 /0/@diagram/@childNodes.49/@labels.2 /0/@diagram/@childNodes.50/@labels.1 /0/@diagram/@childNodes.52/@labels.2 /0/@diagram/@childNodes.53/@labels.1 /0/@diagram/@childNodes.55/@labels.1 /0/@diagram/@childNodes.71/@labels.1 /0/@diagram/@childNodes.74/@labels.1 /0/@diagram/@childNodes.77/@labels.1 /0/@diagram/@childNodes.80/@labels.1 /0/@diagram/@childNodes.81/@labels.1 /0/@diagram/@childNodes.82/@labels.1 /0/@diagram/@childNodes.84/@labels.1 /0/@diagram/@childNodes.86/@labels.1 /0/@diagram/@childNodes.88/@labels.1 /0/@diagram/@childNodes.89/@labels.1 /0/@diagram/@childNodes.91/@labels.2 /0/@diagram/@childNodes.61/@labels.1 /0/@diagram/@childNodes.62/@labels.1 /0/@diagram/@childNodes.63/@labels.1 /0/@diagram/@childNodes.66/@labels.1"
+ name="AbstractLabelEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="contains methods to display arrows"
+ genView="/0/@diagram/@childNodes.13 /0/@diagram/@childNodes.22 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.80 /0/@diagram/@childNodes.81 /0/@diagram/@childNodes.88 /0/@diagram/@childNodes.89 /0/@diagram/@childNodes.91 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.23 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.84 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.77 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.50 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.53 /0/@diagram/@childNodes.82 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.20 /0/@diagram/@childNodes.74 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.78 /0/@diagram/@childNodes.86 /0/@diagram/@childNodes.55 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.21 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.71"
+ name="AbstractPinEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.activity.edit.part.AbstractPinEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
+ comment="locator for external label of pins"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator"
+ genExternalNodeLabel="/0/@diagram/@childNodes.75/@labels.0 /0/@diagram/@childNodes.3/@labels.1 /0/@diagram/@childNodes.4/@labels.1 /0/@diagram/@childNodes.5/@labels.1 /0/@diagram/@childNodes.7/@labels.2 /0/@diagram/@childNodes.8/@labels.2 /0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@childNodes.10/@labels.1 /0/@diagram/@childNodes.12/@labels.2 /0/@diagram/@childNodes.13/@labels.2 /0/@diagram/@childNodes.14/@labels.1 /0/@diagram/@childNodes.15/@labels.1 /0/@diagram/@childNodes.17/@labels.2 /0/@diagram/@childNodes.18/@labels.2 /0/@diagram/@childNodes.19/@labels.1 /0/@diagram/@childNodes.20/@labels.1 /0/@diagram/@childNodes.21/@labels.2 /0/@diagram/@childNodes.22/@labels.2 /0/@diagram/@childNodes.23/@labels.1 /0/@diagram/@childNodes.32/@labels.2 /0/@diagram/@childNodes.33/@labels.1 /0/@diagram/@childNodes.34/@labels.1 /0/@diagram/@childNodes.35/@labels.2 /0/@diagram/@childNodes.38/@labels.2 /0/@diagram/@childNodes.39/@labels.2 /0/@diagram/@childNodes.40/@labels.1 /0/@diagram/@childNodes.41/@labels.2 /0/@diagram/@childNodes.42/@labels.2 /0/@diagram/@childNodes.43/@labels.1 /0/@diagram/@childNodes.45/@labels.2 /0/@diagram/@childNodes.46/@labels.2 /0/@diagram/@childNodes.47/@labels.1 /0/@diagram/@childNodes.48/@labels.2 /0/@diagram/@childNodes.49/@labels.2 /0/@diagram/@childNodes.50/@labels.1 /0/@diagram/@childNodes.52/@labels.2 /0/@diagram/@childNodes.53/@labels.1 /0/@diagram/@childNodes.55/@labels.1 /0/@diagram/@childNodes.71/@labels.1 /0/@diagram/@childNodes.74/@labels.1 /0/@diagram/@childNodes.77/@labels.1 /0/@diagram/@childNodes.80/@labels.1 /0/@diagram/@childNodes.81/@labels.1 /0/@diagram/@childNodes.82/@labels.1 /0/@diagram/@childNodes.84/@labels.1 /0/@diagram/@childNodes.86/@labels.1 /0/@diagram/@childNodes.88/@labels.1 /0/@diagram/@childNodes.89/@labels.1 /0/@diagram/@childNodes.91/@labels.2 /0/@diagram/@childNodes.63/@labels.0 /0/@diagram/@childNodes.61/@labels.1 /0/@diagram/@childNodes.62/@labels.1 /0/@diagram/@childNodes.63/@labels.1 /0/@diagram/@childNodes.66/@labels.1 /0/@diagram/@childNodes.53/@labels.0 /0/@diagram/@childNodes.7/@labels.0 /0/@diagram/@childNodes.7/@labels.1 /0/@diagram/@childNodes.8/@labels.0 /0/@diagram/@childNodes.8/@labels.1 /0/@diagram/@childNodes.9/@labels.0 /0/@diagram/@childNodes.10/@labels.0 /0/@diagram/@childNodes.12/@labels.0 /0/@diagram/@childNodes.12/@labels.1 /0/@diagram/@childNodes.13/@labels.0 /0/@diagram/@childNodes.13/@labels.1 /0/@diagram/@childNodes.14/@labels.0 /0/@diagram/@childNodes.15/@labels.0 /0/@diagram/@childNodes.17/@labels.0 /0/@diagram/@childNodes.17/@labels.1 /0/@diagram/@childNodes.18/@labels.0 /0/@diagram/@childNodes.18/@labels.1 /0/@diagram/@childNodes.19/@labels.0 /0/@diagram/@childNodes.20/@labels.0 /0/@diagram/@childNodes.21/@labels.0 /0/@diagram/@childNodes.21/@labels.1 /0/@diagram/@childNodes.22/@labels.0 /0/@diagram/@childNodes.22/@labels.1 /0/@diagram/@childNodes.23/@labels.0 /0/@diagram/@childNodes.32/@labels.1 /0/@diagram/@childNodes.35/@labels.0 /0/@diagram/@childNodes.36/@labels.1 /0/@diagram/@childNodes.38/@labels.0 /0/@diagram/@childNodes.38/@labels.1 /0/@diagram/@childNodes.39/@labels.0 /0/@diagram/@childNodes.39/@labels.1 /0/@diagram/@childNodes.40/@labels.0 /0/@diagram/@childNodes.41/@labels.0 /0/@diagram/@childNodes.41/@labels.1 /0/@diagram/@childNodes.42/@labels.0 /0/@diagram/@childNodes.42/@labels.1 /0/@diagram/@childNodes.43/@labels.0 /0/@diagram/@childNodes.45/@labels.0 /0/@diagram/@childNodes.45/@labels.1 /0/@diagram/@childNodes.46/@labels.0 /0/@diagram/@childNodes.46/@labels.1 /0/@diagram/@childNodes.47/@labels.0 /0/@diagram/@childNodes.48/@labels.0 /0/@diagram/@childNodes.48/@labels.1 /0/@diagram/@childNodes.49/@labels.0 /0/@diagram/@childNodes.49/@labels.1 /0/@diagram/@childNodes.50/@labels.0 /0/@diagram/@childNodes.52/@labels.1 /0/@diagram/@childNodes.55/@labels.0 /0/@diagram/@childNodes.61/@labels.0 /0/@diagram/@childNodes.62/@labels.0 /0/@diagram/@childNodes.66/@labels.0 /0/@diagram/@childNodes.71/@labels.0 /0/@diagram/@childNodes.74/@labels.0 /0/@diagram/@childNodes.77/@labels.0 /0/@diagram/@childNodes.78/@labels.0 /0/@diagram/@childNodes.78/@labels.1 /0/@diagram/@childNodes.80/@labels.0 /0/@diagram/@childNodes.81/@labels.0 /0/@diagram/@childNodes.82/@labels.0 /0/@diagram/@childNodes.84/@labels.0 /0/@diagram/@childNodes.86/@labels.0 /0/@diagram/@childNodes.88/@labels.0 /0/@diagram/@childNodes.89/@labels.0 /0/@diagram/@childNodes.91/@labels.0 /0/@diagram/@childNodes.91/@labels.1 /0/@diagram/@childNodes.92/@labels.1"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:GenerateUsingElementTypeCreationCommand"/>
+ </papyrusgmfgenextension:PapyrusExtensionRootNode>
+</xmi:XMI>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml
index 37ba3c62173..67524f506b2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml
@@ -204,7 +204,7 @@
<method name="getType()" value="4001,4002,4003,4004,4005,4006,4007"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
- <method name="getType()" value="5001,5002,5080,5081,5082,5003,5011,5024,5083,5012,5025,5084,5009,5085,5010,5086,5004,5013,5026,5087,5014,5027,5088,5015,5089,5016,5090,5006,5017,5028,5091,5018,5029,5092,5019,5093,5020,5094,5021,5030,5095,5022,5031,5096,5023,5097,5038,5130,5039,5131,5040,5132,5041,5133,5036,5134,5037,5135,5007,5136,5008,5137,5043,5098,5099,5100,5042,5101,5127,5128,5059,5049,5050,5102,5051,5052,5103,5053,5104,5054,5055,5105,5056,5057,5106,5058,5107,5060,5061,5062,5108,5063,5064,5109,5065,5110,5072,5073,5111,5074,5075,5112,5076,5113,5071,5078,5079,5115,5077,5114,5126,5124,5125,5119,5120,5121,5184,5185,5186,5183,5187,5188,5123,5117,5178,5179,5118,5138,5139,5144,5145,5142,5143,5148,5146,5147,5129,5153,5149,5150,5151,5152,5160,5154,5155,5156,5157,5158,5159,5163,5161,5162,5166,5164,5165,5171,5167,5168,5169,5170,5175,5172,5173,5174,5176,5177,5189,5190"/>
+ <method name="getType()" value="5001,5002,6031,6032,6033,6034,6035,6036,6037,6038,6039,6016,6017,6018,6019,6020,6021,6022,6023,6024,6025,6026,6027,6028,6029,5080,5081,5082,5003,5011,5024,5083,5012,5025,5084,5009,5085,5010,5086,5004,5013,5026,5087,5014,5027,5088,5015,5089,5016,5090,5006,5017,5028,5091,5018,5029,5092,5019,5093,5020,5094,5021,5030,5095,5022,5031,5096,5023,5097,5038,5130,5039,5131,5040,5132,5041,5133,5036,5134,5037,5135,5007,5136,5008,5137,5043,5098,5099,5100,5042,5101,5127,5128,5059,5049,5050,5102,5051,5052,5103,5053,5104,5054,5055,5105,5056,5057,5106,5058,5107,5060,5061,5062,5108,5063,5064,5109,5065,5110,5072,5073,5111,5074,5075,5112,5076,5113,5071,5078,5079,5115,5077,5114,5126,5124,5125,5119,5120,5121,5184,5185,5186,5183,5187,5188,5123,5117,5178,5179,5118,5138,5139,5144,5145,5142,5143,5148,5146,5147,5129,5153,5149,5150,5151,5152,5160,5154,5155,5156,5157,5158,5159,5163,5161,5162,5166,5164,5165,5171,6030,5167,5168,5169,5170,5175,5172,5173,5174,5176,5177,5189,5190"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
<method name="getType()" value="7001,7002,7003,7004,7008,7009,7010,7012,7005,7006,7007,7014,7015,7016,7013"/>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionEditPart.java
index 2aea8ca898b..51bbffb4d82 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionEditPart.java
@@ -1,1529 +1,1529 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.Shape;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-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.handles.MoveHandle;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AcceptEventActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AcceptEventActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.figures.AcceptEventActionFigure;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class AcceptEventActionEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3063;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public AcceptEventActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AcceptEventActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.AcceptEventActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AcceptEventActionCanonicalEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- /*
- * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
- * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
- */
- if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
- Object notifier = event.getNotifier();
- List<?> modelChildren = ((View) getModel()).getChildren();
- if (!(notifier instanceof Edge)) {
- if (modelChildren.contains(event.getNotifier())) {
- return;
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case AcceptTimeEventActionLabelEditPart.VISUAL_ID:
- case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID:
- return new BorderItemSelectionEditPolicy() {
-
- @Override
- protected List createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
- };
- case OutputPinInAcceptEventActionEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new AcceptEventActionFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public AcceptEventActionFigure getPrimaryShape() {
- return (AcceptEventActionFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof AcceptEventActionLabelEditPart) {
- ((AcceptEventActionLabelEditPart) childEditPart).setLabel(getPrimaryShape().getAcceptEventActionLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST);
- getBorderedFigure().getBorderItemContainer().add(((OutputPinInAcceptEventActionEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof AcceptEventActionLabelEditPart) {
- return true;
- }
- if (childEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((OutputPinInAcceptEventActionEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof AcceptTimeEventActionLabelEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof AcceptTimeEventActionAppliedStereotypeEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "AcceptEventAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof Shape) {
- ((Shape) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof Shape) {
- ((Shape) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(AcceptEventActionLabelEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("AcceptEventAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("AcceptEventAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("AcceptEventAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("AcceptEventAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.Shape;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+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.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AcceptEventActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AcceptEventActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.figures.AcceptEventActionFigure;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class AcceptEventActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3063;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public AcceptEventActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AcceptEventActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.AcceptEventActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AcceptEventActionCanonicalEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case AcceptTimeEventActionLabelEditPart.VISUAL_ID:
+ case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ case OutputPinInAcceptEventActionEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new AcceptEventActionFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public AcceptEventActionFigure getPrimaryShape() {
+ return (AcceptEventActionFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof AcceptEventActionLabelEditPart) {
+ ((AcceptEventActionLabelEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST);
+ getBorderedFigure().getBorderItemContainer().add(((OutputPinInAcceptEventActionEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof AcceptEventActionLabelEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((OutputPinInAcceptEventActionEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof AcceptTimeEventActionLabelEditPart) {
+ IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else if (borderItemEditPart instanceof AcceptTimeEventActionAppliedStereotypeEditPart) {
+ IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "AcceptEventAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof Shape) {
+ ((Shape) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof Shape) {
+ ((Shape) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(AcceptEventActionLabelEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("AcceptEventAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("AcceptEventAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("AcceptEventAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("AcceptEventAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..d7da6f6e446
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionFloatingNameEditPart.java
@@ -0,0 +1,819 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 AcceptEventActionFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6040;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public AcceptEventActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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.AcceptEventAction_3063, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.activity.edit.parts.AcceptEventActionFloatingNameEditPart.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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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 getPrimaryView();
+ }
+
+ /**
+ * 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 handleNotificationEvent(Notification event) {
+ 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() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionLabelEditPart.java
index 3cacdc21bdf..f8e072c549f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptEventActionLabelEditPart.java
@@ -65,7 +65,6 @@ import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
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.CenteredWrappedLabel;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleEvent;
@@ -184,10 +183,10 @@ public class AcceptEventActionLabelEditPart extends PapyrusCompartmentEditPart i
/**
* @generated
*/
- public void setLabel(CenteredWrappedLabel figure) {
+ public void setLabel(WrappingLabel wrappingLabel) {
unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
+ setFigure(wrappingLabel);
+ defaultText = getLabelTextHelper(wrappingLabel);
registerVisuals();
refreshVisuals();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptTimeEventActionLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptTimeEventActionLabelEditPart.java
index def16e7747c..d90e403c489 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptTimeEventActionLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AcceptTimeEventActionLabelEditPart.java
@@ -36,7 +36,6 @@ import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
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.editparts.LabelEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
@@ -62,12 +61,13 @@ 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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.figures.SimpleLabel;
import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.swt.SWT;
@@ -81,7 +81,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class AcceptTimeEventActionLabelEditPart extends LabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+public class AcceptTimeEventActionLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -765,6 +765,6 @@ public class AcceptTimeEventActionLabelEditPart extends LabelEditPart implements
* @generated
*/
protected IFigure createFigurePrim() {
- return new SimpleLabel();
+ return new PapyrusWrappingLabel();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPart.java
index 9283e511bd6..3552c38f110 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPart.java
@@ -1,483 +1,483 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.editpolicies.RootComponentEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ResizeActivityEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure;
-import org.eclipse.papyrus.uml.diagram.activity.locator.ParameterNodeLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ActivityEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2001;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ActivityEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy());
- installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizeActivityEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case ActivityParameterNodeEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ActivityFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public ActivityFigure getPrimaryShape() {
- return (ActivityFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActivityNameEditPart) {
- ((ActivityNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- if (childEditPart instanceof ActivityIsSingleExecutionEditPart) {
- ((ActivityIsSingleExecutionEditPart) childEditPart).setLabel(getPrimaryShape().getHeaderSingleExecution());
- return true;
- }
- if (childEditPart instanceof ActivityActivityParametersCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getParameterFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ActivityActivityParametersCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityActivityPreConditionsCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getPreconditionFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ActivityActivityPreConditionsCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityActivityPostConditionsCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getPostconditionFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ActivityActivityPostConditionsCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityActivityContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getContentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ActivityActivityContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- // Papyrus Gencode :Affixed Activity Parameter Node locator for Activity
- if (childEditPart instanceof ActivityParameterNodeEditPart) {
- IBorderItemLocator locator = new ParameterNodeLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((ActivityParameterNodeEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActivityNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ActivityIsSingleExecutionEditPart) {
- return true;
- }
- if (childEditPart instanceof ActivityActivityParametersCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getParameterFigure();
- pane.remove(((ActivityActivityParametersCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityActivityPreConditionsCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getPreconditionFigure();
- pane.remove(((ActivityActivityPreConditionsCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityActivityPostConditionsCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getPostconditionFigure();
- pane.remove(((ActivityActivityPostConditionsCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityActivityContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getContentFigure();
- pane.remove(((ActivityActivityContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityParameterNodeEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ActivityParameterNodeEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ActivityActivityParametersCompartmentEditPart) {
- return getPrimaryShape().getParameterFigure();
- }
- if (editPart instanceof ActivityActivityPreConditionsCompartmentEditPart) {
- return getPrimaryShape().getPreconditionFigure();
- }
- if (editPart instanceof ActivityActivityPostConditionsCompartmentEditPart) {
- return getPrimaryShape().getPostconditionFigure();
- }
- if (editPart instanceof ActivityActivityContentCompartmentEditPart) {
- return getPrimaryShape().getContentFigure();
- }
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "Activity";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- 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.Parameter_3001) {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityActivityParametersCompartmentEditPart.VISUAL_ID));
- }
- if (type == UMLElementTypes.Constraint_3002) {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID));
- }
- if (type == UMLElementTypes.Constraint_3003) {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID));
- }
- }
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.editpolicies.RootComponentEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ResizeActivityEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure;
+import org.eclipse.papyrus.uml.diagram.activity.locator.ParameterNodeLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ActivityEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2001;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ActivityEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy());
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ActivityCanonicalEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizeActivityEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ActivityParameterNodeEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ActivityFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ActivityFigure getPrimaryShape() {
+ return (ActivityFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ActivityNameEditPart) {
+ ((ActivityNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof ActivityIsSingleExecutionEditPart) {
+ ((ActivityIsSingleExecutionEditPart) childEditPart).setLabel(getPrimaryShape().getHeaderSingleExecution());
+ return true;
+ }
+ if (childEditPart instanceof ActivityActivityParametersCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getParameterFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ActivityActivityParametersCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityActivityPreConditionsCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPreconditionFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ActivityActivityPreConditionsCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityActivityPostConditionsCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPostconditionFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ActivityActivityPostConditionsCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityActivityContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getContentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ActivityActivityContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Activity Parameter Node locator for Activity
+ if (childEditPart instanceof ActivityParameterNodeEditPart) {
+ IBorderItemLocator locator = new ParameterNodeLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((ActivityParameterNodeEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ActivityNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ActivityIsSingleExecutionEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ActivityActivityParametersCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getParameterFigure();
+ pane.remove(((ActivityActivityParametersCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityActivityPreConditionsCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPreconditionFigure();
+ pane.remove(((ActivityActivityPreConditionsCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityActivityPostConditionsCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPostconditionFigure();
+ pane.remove(((ActivityActivityPostConditionsCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityActivityContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getContentFigure();
+ pane.remove(((ActivityActivityContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityParameterNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ActivityParameterNodeEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof ActivityActivityParametersCompartmentEditPart) {
+ return getPrimaryShape().getParameterFigure();
+ }
+ if (editPart instanceof ActivityActivityPreConditionsCompartmentEditPart) {
+ return getPrimaryShape().getPreconditionFigure();
+ }
+ if (editPart instanceof ActivityActivityPostConditionsCompartmentEditPart) {
+ return getPrimaryShape().getPostconditionFigure();
+ }
+ if (editPart instanceof ActivityActivityContentCompartmentEditPart) {
+ return getPrimaryShape().getContentFigure();
+ }
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "Activity";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.Parameter_3001) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityActivityParametersCompartmentEditPart.VISUAL_ID));
+ }
+ if (type == UMLElementTypes.Constraint_3002) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID));
+ }
+ if (type == UMLElementTypes.Constraint_3003) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID));
+ }
+ }
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPartCN.java
index b5efac4d378..b1dc3aa99d8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityEditPartCN.java
@@ -1,475 +1,475 @@
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-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.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure;
-import org.eclipse.papyrus.uml.diagram.activity.locator.ParameterNodeLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-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.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ActivityEditPartCN extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3083;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ActivityEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicyCN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ActivityCanonicalEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case ActivityParameterNodeEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ActivityFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public ActivityFigure getPrimaryShape() {
- return (ActivityFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActivityNameEditPartCN) {
- ((ActivityNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- if (childEditPart instanceof ActivityIsSingleExecutionCNEditPart) {
- ((ActivityIsSingleExecutionCNEditPart) childEditPart).setLabel(getPrimaryShape().getHeaderSingleExecution());
- return true;
- }
- if (childEditPart instanceof ActivityCNParametersCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getParameterFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ActivityCNParametersCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityCNPreConditionsCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getPreconditionFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ActivityCNPreConditionsCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityCNPostConditionsCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getPostconditionFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ActivityCNPostConditionsCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityCNContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getContentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ActivityCNContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- // Papyrus Gencode :Affixed Activity Parameter Node locator for Activity
- if (childEditPart instanceof ActivityParameterNodeEditPart) {
- IBorderItemLocator locator = new ParameterNodeLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((ActivityParameterNodeEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActivityNameEditPartCN) {
- return true;
- }
- if (childEditPart instanceof ActivityIsSingleExecutionCNEditPart) {
- return true;
- }
- if (childEditPart instanceof ActivityCNParametersCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getParameterFigure();
- pane.remove(((ActivityCNParametersCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityCNPreConditionsCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getPreconditionFigure();
- pane.remove(((ActivityCNPreConditionsCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityCNPostConditionsCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getPostconditionFigure();
- pane.remove(((ActivityCNPostConditionsCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityCNContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getContentFigure();
- pane.remove(((ActivityCNContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActivityParameterNodeEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ActivityParameterNodeEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ActivityCNParametersCompartmentEditPart) {
- return getPrimaryShape().getParameterFigure();
- }
- if (editPart instanceof ActivityCNPreConditionsCompartmentEditPart) {
- return getPrimaryShape().getPreconditionFigure();
- }
- if (editPart instanceof ActivityCNPostConditionsCompartmentEditPart) {
- return getPrimaryShape().getPostconditionFigure();
- }
- if (editPart instanceof ActivityCNContentCompartmentEditPart) {
- return getPrimaryShape().getContentFigure();
- }
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "Activity";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityNameEditPartCN.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- 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.Parameter_3001) {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCNParametersCompartmentEditPart.VISUAL_ID));
- }
- if (type == UMLElementTypes.Constraint_3002) {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID));
- }
- if (type == UMLElementTypes.Constraint_3003) {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID));
- }
- }
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+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.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityFigure;
+import org.eclipse.papyrus.uml.diagram.activity.locator.ParameterNodeLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+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.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ActivityEditPartCN extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3083;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ActivityEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCanonicalEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ActivityCanonicalEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ActivityParameterNodeEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ActivityFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ActivityFigure getPrimaryShape() {
+ return (ActivityFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ActivityNameEditPartCN) {
+ ((ActivityNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof ActivityIsSingleExecutionCNEditPart) {
+ ((ActivityIsSingleExecutionCNEditPart) childEditPart).setLabel(getPrimaryShape().getHeaderSingleExecution());
+ return true;
+ }
+ if (childEditPart instanceof ActivityCNParametersCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getParameterFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ActivityCNParametersCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityCNPreConditionsCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPreconditionFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ActivityCNPreConditionsCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityCNPostConditionsCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPostconditionFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ActivityCNPostConditionsCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityCNContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getContentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ActivityCNContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Activity Parameter Node locator for Activity
+ if (childEditPart instanceof ActivityParameterNodeEditPart) {
+ IBorderItemLocator locator = new ParameterNodeLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((ActivityParameterNodeEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ActivityNameEditPartCN) {
+ return true;
+ }
+ if (childEditPart instanceof ActivityIsSingleExecutionCNEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ActivityCNParametersCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getParameterFigure();
+ pane.remove(((ActivityCNParametersCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityCNPreConditionsCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPreconditionFigure();
+ pane.remove(((ActivityCNPreConditionsCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityCNPostConditionsCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPostconditionFigure();
+ pane.remove(((ActivityCNPostConditionsCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityCNContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getContentFigure();
+ pane.remove(((ActivityCNContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActivityParameterNodeEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ActivityParameterNodeEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof ActivityCNParametersCompartmentEditPart) {
+ return getPrimaryShape().getParameterFigure();
+ }
+ if (editPart instanceof ActivityCNPreConditionsCompartmentEditPart) {
+ return getPrimaryShape().getPreconditionFigure();
+ }
+ if (editPart instanceof ActivityCNPostConditionsCompartmentEditPart) {
+ return getPrimaryShape().getPostconditionFigure();
+ }
+ if (editPart instanceof ActivityCNContentCompartmentEditPart) {
+ return getPrimaryShape().getContentFigure();
+ }
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "Activity";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityNameEditPartCN.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.Parameter_3001) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCNParametersCompartmentEditPart.VISUAL_ID));
+ }
+ if (type == UMLElementTypes.Constraint_3002) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID));
+ }
+ if (type == UMLElementTypes.Constraint_3003) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID));
+ }
+ }
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("Activity", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityFinalNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityFinalNodeEditPart.java
index da2531bdced..61c989e7447 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityFinalNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityFinalNodeEditPart.java
@@ -1,1167 +1,1154 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-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.handles.MoveHandle;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.internal.figures.CircleFigure;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityFinalNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ResizableSquareEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.FinalNode;
-import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ActivityFinalNodeEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3005;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ActivityFinalNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * Return the edit policy so that the figure stays a square
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart#getPrimaryDragEditPolicy()
- * @return EditPolicy
- * @generated NOT
- */
- @Override
- public EditPolicy getPrimaryDragEditPolicy() {
- return new ResizableSquareEditPolicy();
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityFinalNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- /*
- * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
- * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
- */
- if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
- Object notifier = event.getNotifier();
- List<?> modelChildren = ((View) getModel()).getChildren();
- if (!(notifier instanceof Edge)) {
- if (modelChildren.contains(event.getNotifier())) {
- return;
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new BorderItemSelectionEditPolicy() {
-
- @Override
- protected List createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
- };
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new FinalNode();
- }
-
- /**
- * @generated
- */
- @Override
- public FinalNode getPrimaryShape() {
- return (FinalNode) primaryShape;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ActivityFinalNodeAppliedStereotypeEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated NOT use a circle figure instead
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new CircleFigure(((Bounds) ((Node) getNotationView()).getLayoutConstraint()).getWidth(), ((Bounds) ((Node) getNotationView()).getLayoutConstraint()).getHeight());
- ;
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- protected IFigure setupContentPane(IFigure nodeShape) {
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ActivityFinalNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ActivityFinalNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ActivityFinalNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("ActivityFinalNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+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.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.internal.figures.CircleFigure;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityFinalNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ActivityFinalNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3005;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ActivityFinalNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityFinalNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof ActivityFinalNodeAppliedStereotypeEditPart) {
+ IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated NOT use a circle figure instead
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new CircleFigure(((Bounds) ((Node) getNotationView()).getLayoutConstraint()).getWidth(), ((Bounds) ((Node) getNotationView()).getLayoutConstraint()).getHeight());
+ ;
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityFinalNodeFloatingNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ActivityFinalNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ActivityFinalNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ActivityFinalNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("ActivityFinalNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityFinalNodeFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityFinalNodeFloatingNameEditPart.java
new file mode 100644
index 00000000000..a0a0a14627b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityFinalNodeFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 ActivityFinalNodeFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6033;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(ActivityFinalNodeFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ActivityFinalNodeFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(ActivityFinalNodeFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityParameterNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityParameterNodeEditPart.java
index 2764f52743a..0175822c642 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityParameterNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityParameterNodeEditPart.java
@@ -1,1298 +1,1289 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.GridData;
-import org.eclipse.draw2d.GridLayout;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityParameterNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.BorderNamedElementEditPart;
-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.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.StereotypeFigureHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @generated NOT implements IPapyrusEditPart
- */
-public class ActivityParameterNodeEditPart extends BorderNamedElementEditPart implements IPapyrusEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3059;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ActivityParameterNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityParameterNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, new PinLayoutEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new NodeNamedElementFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public NodeNamedElementFigure getPrimaryShape() {
- return (NodeNamedElementFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ParameterNodeNameEditPart) {
- ((ParameterNodeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ParameterNodeNameEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "ActivityParameterNode";
- 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));
- // FIXME: workaround for #154536
- result.getBounds().setSize(result.getPreferredSize());
- 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
- */
- @Override
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ParameterNodeNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * @generated NOT implements IPapyrusNodeUMLElementFigure
- */
- public class ActivityParameterNodeDescriptor extends RectangleFigure implements IPapyrusNodeUMLElementFigure {
-
- /** The helper which handles stereotype aspects */
- private StereotypeFigureHelper stereotypeHelper;
-
- /**
- * @generated NOT use StereotypeFigureHelper
- */
- public ActivityParameterNodeDescriptor() {
- GridLayout layoutThis = new GridLayout();
- layoutThis.numColumns = 1;
- layoutThis.makeColumnsEqualWidth = true;
- this.setLayoutManager(layoutThis);
- this.setLineWidth(1);
- this.setPreferredSize(new Dimension(getMapMode().DPtoLP(100), getMapMode().DPtoLP(50)));
- // use StereotypeFigureHelper
- stereotypeHelper = new StereotypeFigureHelper(this) {
-
- // @Override
- // public IMapMode getMapMode() {
- // return ActivityParameterNodeEditPart.this.getMapMode();
- // }
- @Override
- public Object getStereotypeRectangleConstraint() {
- GridData constraintStereotypeRect0 = new GridData();
- constraintStereotypeRect0.verticalAlignment = GridData.BEGINNING;
- constraintStereotypeRect0.horizontalAlignment = GridData.FILL;
- constraintStereotypeRect0.horizontalIndent = 0;
- constraintStereotypeRect0.horizontalSpan = 1;
- constraintStereotypeRect0.verticalSpan = 1;
- constraintStereotypeRect0.grabExcessHorizontalSpace = false;
- constraintStereotypeRect0.grabExcessVerticalSpace = false;
- return constraintStereotypeRect0;
- }
- };
- }
-
- /**
- * Refresh the layout of the figure
- */
- protected void refreshLayout() {
- }
-
- /**
- * Sets the stereotypes for this figure.
- *
- * @param stereotypes
- * the string representing the stereotypes to be displayed
- * @param image
- * the image representing the stereotypes to be displayed
- * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure#setStereotypeDisplay(java.lang.String, org.eclipse.swt.graphics.Image)
- */
- @Override
- public void setStereotypeDisplay(String stereotypes, Image image) {
- stereotypeHelper.setStereotypeDisplay(stereotypes, image);
- refreshLayout();
- }
-
- /**
- * Sets the stereotypes properties for this figure.
- *
- * @param stereotypeProperties
- * the string representing the stereotype properties to be displayed
- */
- @Override
- public void setStereotypePropertiesInBrace(String stereotypeProperties) {
- stereotypeHelper.setStereotypePropertiesInBrace(stereotypeProperties);
- refreshLayout();
- }
-
- /**
- * displays the new string corresponding to the list of stereotypes.
- *
- * @param stereotypeProperties
- * the string to be displayed.
- */
- @Override
- public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
- stereotypeHelper.setStereotypePropertiesInCompartment(stereotypeProperties);
- refreshLayout();
- }
-
- /**
- * Gets the stereotype label.
- *
- * @return the stereotype label
- * @unused
- * @deprecated
- */
- @Deprecated
- @Override
- public Label getStereotypesLabel() {
- return null;// fActionStereotypeLabel;
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityParameterNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.PinLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart;
+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.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ActivityParameterNodeEditPart extends RoundedBorderNamedElementEditPart { // BorderNamedElementEditPart RoundedCompartmentEditPart
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3059;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ActivityParameterNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityParameterNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new PinLayoutEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ParameterNodeNameEditPart) {
+ ((ParameterNodeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ParameterNodeNameEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "ActivityParameterNode";
+ 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));
+ // FIXME: workaround for #154536
+ result.getBounds().setSize(result.getPreferredSize());
+ 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
+ */
+ @Override
+ protected NodeFigure createNodeFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ParameterNodeNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("ActivityParameterNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+
+ // /**
+ // * @generated NOT implements IPapyrusNodeUMLElementFigure
+ // */
+ // public class ActivityParameterNodeDescriptor extends RectangleFigure implements IPapyrusNodeUMLElementFigure {
+ //
+ // /** The helper which handles stereotype aspects */
+ // private StereotypeFigureHelper stereotypeHelper;
+ //
+ // /**
+ // * @generated NOT use StereotypeFigureHelper
+ // */
+ // public ActivityParameterNodeDescriptor() {
+ // GridLayout layoutThis = new GridLayout();
+ // layoutThis.numColumns = 1;
+ // layoutThis.makeColumnsEqualWidth = true;
+ // this.setLayoutManager(layoutThis);
+ // this.setLineWidth(1);
+ // this.setPreferredSize(new Dimension(getMapMode().DPtoLP(100), getMapMode().DPtoLP(50)));
+ // // use StereotypeFigureHelper
+ // stereotypeHelper = new StereotypeFigureHelper(this) {
+ //
+ // // @Override
+ // // public IMapMode getMapMode() {
+ // // return ActivityParameterNodeEditPart.this.getMapMode();
+ // // }
+ // @Override
+ // public Object getStereotypeRectangleConstraint() {
+ // GridData constraintStereotypeRect0 = new GridData();
+ // constraintStereotypeRect0.verticalAlignment = GridData.BEGINNING;
+ // constraintStereotypeRect0.horizontalAlignment = GridData.FILL;
+ // constraintStereotypeRect0.horizontalIndent = 0;
+ // constraintStereotypeRect0.horizontalSpan = 1;
+ // constraintStereotypeRect0.verticalSpan = 1;
+ // constraintStereotypeRect0.grabExcessHorizontalSpace = false;
+ // constraintStereotypeRect0.grabExcessVerticalSpace = false;
+ // return constraintStereotypeRect0;
+ // }
+ // };
+ // }
+ //
+ // /**
+ // * Refresh the layout of the figure
+ // */
+ // protected void refreshLayout() {
+ // }
+ //
+ // /**
+ // * Sets the stereotypes for this figure.
+ // *
+ // * @param stereotypes
+ // * the string representing the stereotypes to be displayed
+ // * @param image
+ // * the image representing the stereotypes to be displayed
+ // * @see org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure#setStereotypeDisplay(java.lang.String, org.eclipse.swt.graphics.Image)
+ // */
+ // @Override
+ // public void setStereotypeDisplay(String stereotypes, Image image) {
+ // stereotypeHelper.setStereotypeDisplay(stereotypes, image);
+ // refreshLayout();
+ // }
+ //
+ // /**
+ // * Sets the stereotypes properties for this figure.
+ // *
+ // * @param stereotypeProperties
+ // * the string representing the stereotype properties to be displayed
+ // */
+ // @Override
+ // public void setStereotypePropertiesInBrace(String stereotypeProperties) {
+ // stereotypeHelper.setStereotypePropertiesInBrace(stereotypeProperties);
+ // refreshLayout();
+ // }
+ //
+ // /**
+ // * displays the new string corresponding to the list of stereotypes.
+ // *
+ // * @param stereotypeProperties
+ // * the string to be displayed.
+ // */
+ // @Override
+ // public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
+ // stereotypeHelper.setStereotypePropertiesInCompartment(stereotypeProperties);
+ // refreshLayout();
+ // }
+ //
+ // /**
+ // * Gets the stereotype label.
+ // *
+ // * @return the stereotype label
+ // * @unused
+ // * @deprecated
+ // */
+ // @Deprecated
+ // @Override
+ // public Label getStereotypesLabel() {
+ // return null;// fActionStereotypeLabel;
+ // }
+ // }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityPartitionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityPartitionEditPart.java
index 68813859507..a2826643fd4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityPartitionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityPartitionEditPart.java
@@ -1,384 +1,399 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityPartitionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityPartitionFigure;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-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.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ActivityPartitionEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3067;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ActivityPartitionEditPart(View view) {
- super(view);
- }
-
- /**
- * Preferences Store
- */
- protected IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityPartitionItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ActivityPartitionFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public ActivityPartitionFigure getPrimaryShape() {
- return (ActivityPartitionFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActivityPartitionNameEditPart) {
- ((ActivityPartitionNameEditPart) childEditPart).setLabel(getPrimaryShape().getPartitionLabel());
- return true;
- }
- if (childEditPart instanceof ActivityPartitionActivityPartitionContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getActivityPartitionCompartment();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ActivityPartitionActivityPartitionContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ActivityPartitionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ActivityPartitionActivityPartitionContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getActivityPartitionCompartment();
- pane.remove(((ActivityPartitionActivityPartitionContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ActivityPartitionActivityPartitionContentCompartmentEditPart) {
- return getPrimaryShape().getActivityPartitionCompartment();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "ActivityPartition";
- 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));
- 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
- */
- @Override
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityPartitionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityPartitionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.figures.ActivityPartitionFigure;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ActivityPartitionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3067;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ActivityPartitionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Preferences Store
+ */
+ protected IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActivityPartitionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ // not generated but change include on gmfgen, can be override at the generation
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ActivityPartitionFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ActivityPartitionFigure getPrimaryShape() {
+ return (ActivityPartitionFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ActivityPartitionNameEditPart) {
+ ((ActivityPartitionNameEditPart) childEditPart).setLabel(getPrimaryShape().getPartitionLabel());
+ return true;
+ }
+ if (childEditPart instanceof ActivityPartitionActivityPartitionContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getActivityPartitionCompartment();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ActivityPartitionActivityPartitionContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ActivityPartitionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ActivityPartitionActivityPartitionContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getActivityPartitionCompartment();
+ pane.remove(((ActivityPartitionActivityPartitionContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof ActivityPartitionActivityPartitionContentCompartmentEditPart) {
+ return getPrimaryShape().getActivityPartitionCompartment();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "ActivityPartition";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createNodeFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ActivityPartitionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("ActivityPartition", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityPartitionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityPartitionFloatingNameEditPart.java
new file mode 100644
index 00000000000..bef047b4cac
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityPartitionFloatingNameEditPart.java
@@ -0,0 +1,819 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 ActivityPartitionFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6016;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityPartitionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ActivityPartitionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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.ActivityPartition_3067, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityPartitionFloatingNameEditPart.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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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 getPrimaryView();
+ }
+
+ /**
+ * 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 handleNotificationEvent(Notification event) {
+ 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() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionEditPart.java
index 30dd86cd233..cd0efa83358 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionEditPart.java
@@ -1,1561 +1,1561 @@
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.transaction.RollbackException;
-import org.eclipse.emf.transaction.Transaction;
-import org.eclipse.emf.transaction.TransactionalCommandStack;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.StructuralFeature;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class AddStructuralFeatureValueActionEditPart extends AbstractBorderedShapeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3091;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public AddStructuralFeatureValueActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AddStructuralFeatureValueActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AddStructuralFeatureValueActionCanonicalEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID:
- case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID:
- case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new PapyrusRoundedNodeFigure();
- }
-
- /**
- * @generated
- */
- public PapyrusRoundedNodeFigure getPrimaryShape() {
- return (PapyrusRoundedNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof AddStructuralFeatureValueActionNameEditPart) {
- ((AddStructuralFeatureValueActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInAddStructuralFeatureValueActionAsObjectEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInAddStructuralFeatureValueActionAsValueEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.SOUTH);
- getBorderedFigure().getBorderItemContainer().add(((OutputPinInAddStructuralFeatureValueActionAsResultEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof AddStructuralFeatureValueActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddStructuralFeatureValueActionAsObjectEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddStructuralFeatureValueActionAsValueEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((OutputPinInAddStructuralFeatureValueActionAsResultEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "AddStructuralFeatureValueAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification)
- * Change automatically the type of the output pin with the type of the classifier
- * @param notification
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
- Object feature = notification.getFeature();
- if (UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__STRUCTURAL_FEATURE.equals(feature)) {
- EObject resolvedElement = this.resolveSemanticElement();
- final Object result = resolvedElement.eGet(UMLPackage.Literals.WRITE_STRUCTURAL_FEATURE_ACTION__RESULT);
- final Object object = resolvedElement.eGet(UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__OBJECT);
- final Object value = resolvedElement.eGet(UMLPackage.Literals.WRITE_STRUCTURAL_FEATURE_ACTION__VALUE);
- Object _feature = notification.getNewValue();
- if (_feature instanceof StructuralFeature) {
- org.eclipse.emf.common.command.Command cmdSetResultType = null;
- org.eclipse.emf.common.command.Command cmdSetObjectType = null;
- org.eclipse.emf.common.command.Command cmdSetValueType = null;
- StructuralFeature newFeature = (StructuralFeature) _feature;
- Element owner = newFeature.getOwner();
- if (newFeature.getFeaturingClassifiers().contains(owner)) {
- cmdSetResultType = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, owner);
- cmdSetObjectType = SetCommand.create(getEditingDomain(), object, UMLPackage.Literals.TYPED_ELEMENT__TYPE, owner);
- }
- Type type = newFeature.getType();
- if (type != null) {
- cmdSetValueType = SetCommand.create(getEditingDomain(), value, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type);
- }
- try {
- if (cmdSetResultType != null) {
- if (cmdSetResultType.canExecute()) {
- CommandStack commandStack = getEditingDomain().getCommandStack();
- if (commandStack instanceof TransactionalCommandStack) {
- ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
- } else {
- commandStack.execute(cmdSetResultType);
- }
- }
- }
- if (cmdSetValueType != null) {
- if (cmdSetValueType.canExecute()) {
- CommandStack commandStack = getEditingDomain().getCommandStack();
- if (commandStack instanceof TransactionalCommandStack) {
- ((TransactionalCommandStack) commandStack).execute(cmdSetValueType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
- } else {
- commandStack.execute(cmdSetValueType);
- }
- }
- }
- if (cmdSetObjectType != null) {
- if (cmdSetObjectType.canExecute()) {
- CommandStack commandStack = getEditingDomain().getCommandStack();
- if (commandStack instanceof TransactionalCommandStack) {
- ((TransactionalCommandStack) commandStack).execute(cmdSetObjectType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
- } else {
- commandStack.execute(cmdSetObjectType);
- }
- }
- }
- } catch (InterruptedException e) {
- e.printStackTrace();
- } catch (RollbackException e) {
- e.printStackTrace();
- }
- }
- }
- }
-}
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.RollbackException;
+import org.eclipse.emf.transaction.Transaction;
+import org.eclipse.emf.transaction.TransactionalCommandStack;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.StructuralFeature;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class AddStructuralFeatureValueActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3091;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public AddStructuralFeatureValueActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AddStructuralFeatureValueActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddStructuralFeatureValueActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AddStructuralFeatureValueActionCanonicalEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID:
+ case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID:
+ case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof AddStructuralFeatureValueActionNameEditPart) {
+ ((AddStructuralFeatureValueActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInAddStructuralFeatureValueActionAsObjectEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInAddStructuralFeatureValueActionAsValueEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ getBorderedFigure().getBorderItemContainer().add(((OutputPinInAddStructuralFeatureValueActionAsResultEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof AddStructuralFeatureValueActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddStructuralFeatureValueActionAsObjectEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddStructuralFeatureValueActionAsValueEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((OutputPinInAddStructuralFeatureValueActionAsResultEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "AddStructuralFeatureValueAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("AddStructuralFeatureValueAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification)
+ * Change automatically the type of the output pin with the type of the classifier
+ * @param notification
+ */
+ @Override
+ protected void handleNotificationEvent(Notification notification) {
+ super.handleNotificationEvent(notification);
+ Object feature = notification.getFeature();
+ if (UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__STRUCTURAL_FEATURE.equals(feature)) {
+ EObject resolvedElement = this.resolveSemanticElement();
+ final Object result = resolvedElement.eGet(UMLPackage.Literals.WRITE_STRUCTURAL_FEATURE_ACTION__RESULT);
+ final Object object = resolvedElement.eGet(UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__OBJECT);
+ final Object value = resolvedElement.eGet(UMLPackage.Literals.WRITE_STRUCTURAL_FEATURE_ACTION__VALUE);
+ Object _feature = notification.getNewValue();
+ if (_feature instanceof StructuralFeature) {
+ org.eclipse.emf.common.command.Command cmdSetResultType = null;
+ org.eclipse.emf.common.command.Command cmdSetObjectType = null;
+ org.eclipse.emf.common.command.Command cmdSetValueType = null;
+ StructuralFeature newFeature = (StructuralFeature) _feature;
+ Element owner = newFeature.getOwner();
+ if (newFeature.getFeaturingClassifiers().contains(owner)) {
+ cmdSetResultType = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, owner);
+ cmdSetObjectType = SetCommand.create(getEditingDomain(), object, UMLPackage.Literals.TYPED_ELEMENT__TYPE, owner);
+ }
+ Type type = newFeature.getType();
+ if (type != null) {
+ cmdSetValueType = SetCommand.create(getEditingDomain(), value, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type);
+ }
+ try {
+ if (cmdSetResultType != null) {
+ if (cmdSetResultType.canExecute()) {
+ CommandStack commandStack = getEditingDomain().getCommandStack();
+ if (commandStack instanceof TransactionalCommandStack) {
+ ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
+ } else {
+ commandStack.execute(cmdSetResultType);
+ }
+ }
+ }
+ if (cmdSetValueType != null) {
+ if (cmdSetValueType.canExecute()) {
+ CommandStack commandStack = getEditingDomain().getCommandStack();
+ if (commandStack instanceof TransactionalCommandStack) {
+ ((TransactionalCommandStack) commandStack).execute(cmdSetValueType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
+ } else {
+ commandStack.execute(cmdSetValueType);
+ }
+ }
+ }
+ if (cmdSetObjectType != null) {
+ if (cmdSetObjectType.canExecute()) {
+ CommandStack commandStack = getEditingDomain().getCommandStack();
+ if (commandStack instanceof TransactionalCommandStack) {
+ ((TransactionalCommandStack) commandStack).execute(cmdSetObjectType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
+ } else {
+ commandStack.execute(cmdSetObjectType);
+ }
+ }
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } catch (RollbackException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..745676ece7d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddStructuralFeatureValueActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 AddStructuralFeatureValueActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6019;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public AddStructuralFeatureValueActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionEditPart.java
index ea79cdff185..a7d17115425 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionEditPart.java
@@ -1,1518 +1,1563 @@
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.transaction.RollbackException;
-import org.eclipse.emf.transaction.Transaction;
-import org.eclipse.emf.transaction.TransactionalCommandStack;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.Variable;
-
-/**
- * @generated
- */
-public class AddVariableValueActionEditPart extends AbstractBorderedShapeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3099;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public AddVariableValueActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AddVariableValueActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AddVariableValueActionCanonicalEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID:
- case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new PapyrusRoundedNodeFigure();
- }
-
- /**
- * @generated
- */
- public PapyrusRoundedNodeFigure getPrimaryShape() {
- return (PapyrusRoundedNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof AddVariableValueActionNameEditPart) {
- ((AddVariableValueActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInAddVariableValueActionAsInsertAtEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInAddVariableValueActionAsValueEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof AddVariableValueActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddVariableValueActionAsInsertAtEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddVariableValueActionAsValueEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "AddVariableValueAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(AddVariableValueActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification)
- *
- * @param notification
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
- Object feature = notification.getFeature();
- if (UMLPackage.Literals.VARIABLE_ACTION__VARIABLE.equals(feature)) {
- final Object value = this.resolveSemanticElement().eGet(UMLPackage.Literals.WRITE_VARIABLE_ACTION__VALUE);
- Object _varaible = notification.getNewValue();
- if (_varaible instanceof Variable) {
- org.eclipse.emf.common.command.Command cmdSetResultType = null;
- Variable newVariable = (Variable) _varaible;
- Type type = newVariable.getType();
- if (type != null) {
- cmdSetResultType = SetCommand.create(getEditingDomain(), value, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type);
- }
- try {
- if (cmdSetResultType != null) {
- if (cmdSetResultType.canExecute()) {
- CommandStack commandStack = getEditingDomain().getCommandStack();
- if (commandStack instanceof TransactionalCommandStack) {
- ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
- } else {
- commandStack.execute(cmdSetResultType);
- }
- }
- }
- } catch (InterruptedException e) {
- e.printStackTrace();
- } catch (RollbackException e) {
- e.printStackTrace();
- }
- }
- }
- }
-}
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.RollbackException;
+import org.eclipse.emf.transaction.Transaction;
+import org.eclipse.emf.transaction.TransactionalCommandStack;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+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.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+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.figures.BorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.Variable;
+
+/**
+ * @generated
+ */
+public class AddVariableValueActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3099;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public AddVariableValueActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new AddVariableValueActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.AddVariableValueActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new AddVariableValueActionCanonicalEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case AddVariableValueActionFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID:
+ case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof AddVariableValueActionNameEditPart) {
+ ((AddVariableValueActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInAddVariableValueActionAsInsertAtEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInAddVariableValueActionAsValueEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof AddVariableValueActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddVariableValueActionAsInsertAtEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInAddVariableValueActionAsValueEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "AddVariableValueAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(AddVariableValueActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("AddVariableValueAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ protected void handleNotificationEvent(Notification notification) {
+ super.handleNotificationEvent(notification);
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(notification.getFeature())) {
+ Object notifier = notification.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(notification.getNotifier())) {
+ return;
+ }
+ }
+ }
+ Object feature = notification.getFeature();
+ if (UMLPackage.Literals.VARIABLE_ACTION__VARIABLE.equals(feature)) {
+ final Object value = this.resolveSemanticElement().eGet(UMLPackage.Literals.WRITE_VARIABLE_ACTION__VALUE);
+ Object _varaible = notification.getNewValue();
+ if (_varaible instanceof Variable) {
+ org.eclipse.emf.common.command.Command cmdSetResultType = null;
+ Variable newVariable = (Variable) _varaible;
+ Type type = newVariable.getType();
+ if (type != null) {
+ cmdSetResultType = SetCommand.create(getEditingDomain(), value, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type);
+ }
+ try {
+ if (cmdSetResultType != null) {
+ if (cmdSetResultType.canExecute()) {
+ CommandStack commandStack = getEditingDomain().getCommandStack();
+ if (commandStack instanceof TransactionalCommandStack) {
+ ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
+ } else {
+ commandStack.execute(cmdSetResultType);
+ }
+ }
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } catch (RollbackException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ // not generated but change include on gmfgen, can be override at the generation
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof AddVariableValueActionFloatingNameEditPart) {
+ BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..bf026ef83e0
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/AddVariableValueActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 AddVariableValueActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6018;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(AddVariableValueActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public AddVariableValueActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(AddVariableValueActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionEditPart.java
index 818ff46d29e..2547f987c33 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionEditPart.java
@@ -1,1458 +1,1492 @@
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class BroadcastSignalActionEditPart extends AbstractBorderedShapeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3102;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public BroadcastSignalActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new BroadcastSignalActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new BroadcastSignalActionCanonicalEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case InputPinInBroadcastSignalActionEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new PapyrusRoundedNodeFigure();
- }
-
- /**
- * @generated
- */
- public PapyrusRoundedNodeFigure getPrimaryShape() {
- return (PapyrusRoundedNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof BroadcastSignalActionNameEditPart) {
- ((BroadcastSignalActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInBroadcastSignalActionEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof BroadcastSignalActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInBroadcastSignalActionEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "BroadcastSignalAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(BroadcastSignalActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+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.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+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.figures.BorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class BroadcastSignalActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3102;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public BroadcastSignalActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new BroadcastSignalActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.BroadcastSignalActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new BroadcastSignalActionCanonicalEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case BroadcastSignalActionFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ case InputPinInBroadcastSignalActionEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ // not generated but change include on gmfgen, can be override at the generation
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof BroadcastSignalActionFloatingNameEditPart) {
+ BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof BroadcastSignalActionNameEditPart) {
+ ((BroadcastSignalActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInBroadcastSignalActionEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof BroadcastSignalActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInBroadcastSignalActionEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "BroadcastSignalAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(BroadcastSignalActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("BroadcastSignalAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..3f4400c780d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/BroadcastSignalActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 BroadcastSignalActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6017;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(BroadcastSignalActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public BroadcastSignalActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(BroadcastSignalActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionEditPart.java
index 0e52ab4631c..855827538ac 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionEditPart.java
@@ -1,1554 +1,1599 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.figures.CallBehaviorActionFigure;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.Activity;
-import org.eclipse.uml2.uml.CallBehaviorAction;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class CallBehaviorActionEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3008;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public CallBehaviorActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CallBehaviorActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CallBehaviorActionCanonicalEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- // Add/Remove the RakeFigure when an Activity is selected as behavior or deselected
- if (resolveSemanticElement() != null) {
- if (resolveSemanticElement() instanceof CallBehaviorAction && resolveSemanticElement().equals(event.getNotifier()) && event.getFeature().equals(UMLPackage.eINSTANCE.getCallBehaviorAction_Behavior())) {
- CallBehaviorAction action = (CallBehaviorAction) resolveSemanticElement();
- if (action.getBehavior() instanceof Activity) {
- getPrimaryShape().displayRake(true);
- } else {
- getPrimaryShape().displayRake(false);
- }
- ;
- refreshVisuals();
- }
- }
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case ValuePinInCallBeActEditPart.VISUAL_ID:
- case ActionInputPinInCallBeActEditPart.VISUAL_ID:
- case InputPinInCallBeActEditPart.VISUAL_ID:
- case OutputPinInCallBeActEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new CallBehaviorActionFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public CallBehaviorActionFigure getPrimaryShape() {
- return (CallBehaviorActionFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CallBehaviorActionNameEditPart) {
- ((CallBehaviorActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ValuePinInCallBeActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((ValuePinInCallBeActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ActionInputPinInCallBeActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInCallBeActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInCallBeActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInCallBeActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof OutputPinInCallBeActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST);
- getBorderedFigure().getBorderItemContainer().add(((OutputPinInCallBeActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CallBehaviorActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ValuePinInCallBeActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ValuePinInCallBeActEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActionInputPinInCallBeActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInCallBeActEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof InputPinInCallBeActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInCallBeActEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof OutputPinInCallBeActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((OutputPinInCallBeActEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "CallBehaviorAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Refresh the children parts, including the rake if necessary
- *
- * @see org.eclipse.gef.editparts.AbstractEditPart#refreshChildren()
- * @generated NOT
- */
- @Override
- protected void refreshChildren() {
- super.refreshChildren();
- // add the rake if behavior is an activity
- if (resolveSemanticElement() instanceof CallBehaviorAction) {
- CallBehaviorAction action = (CallBehaviorAction) resolveSemanticElement();
- if (action.getBehavior() instanceof Activity) {
- getPrimaryShape().displayRake(true);
- } else {
- getPrimaryShape().displayRake(false);
- }
- }
- }
-
- /**
- * 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(CallBehaviorActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+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.figures.BorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.figures.CallBehaviorActionFigure;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.uml2.uml.Activity;
+import org.eclipse.uml2.uml.CallBehaviorAction;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class CallBehaviorActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3008;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public CallBehaviorActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CallBehaviorActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallBehaviorActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CallBehaviorActionCanonicalEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ // Add/Remove the RakeFigure when an Activity is selected as behavior or deselected
+ if (resolveSemanticElement() != null) {
+ if (resolveSemanticElement() instanceof CallBehaviorAction && resolveSemanticElement().equals(event.getNotifier()) && event.getFeature().equals(UMLPackage.eINSTANCE.getCallBehaviorAction_Behavior())) {
+ CallBehaviorAction action = (CallBehaviorAction) resolveSemanticElement();
+ if (action.getBehavior() instanceof Activity) {
+ getPrimaryShape().displayRake(true);
+ } else {
+ getPrimaryShape().displayRake(false);
+ }
+ ;
+ refreshVisuals();
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ // not generated but change include on gmfgen, can be override at the generation
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof CallBehaviorActionFloatingNameEditPart) {
+ BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case CallBehaviorActionFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ case ValuePinInCallBeActEditPart.VISUAL_ID:
+ case ActionInputPinInCallBeActEditPart.VISUAL_ID:
+ case InputPinInCallBeActEditPart.VISUAL_ID:
+ case OutputPinInCallBeActEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new CallBehaviorActionFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public CallBehaviorActionFigure getPrimaryShape() {
+ return (CallBehaviorActionFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CallBehaviorActionNameEditPart) {
+ ((CallBehaviorActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ValuePinInCallBeActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((ValuePinInCallBeActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInCallBeActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInCallBeActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInCallBeActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof OutputPinInCallBeActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST);
+ getBorderedFigure().getBorderItemContainer().add(((OutputPinInCallBeActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CallBehaviorActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ValuePinInCallBeActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ValuePinInCallBeActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInCallBeActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof InputPinInCallBeActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInCallBeActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInCallBeActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((OutputPinInCallBeActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "CallBehaviorAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Refresh the children parts, including the rake if necessary
+ *
+ * @see org.eclipse.gef.editparts.AbstractEditPart#refreshChildren()
+ * @generated NOT
+ */
+ @Override
+ protected void refreshChildren() {
+ super.refreshChildren();
+ // add the rake if behavior is an activity
+ if (resolveSemanticElement() instanceof CallBehaviorAction) {
+ CallBehaviorAction action = (CallBehaviorAction) resolveSemanticElement();
+ if (action.getBehavior() instanceof Activity) {
+ getPrimaryShape().displayRake(true);
+ } else {
+ getPrimaryShape().displayRake(false);
+ }
+ }
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(CallBehaviorActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("CallBehaviorAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..d35cfd0fbbf
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallBehaviorActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 CallBehaviorActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6029;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(CallBehaviorActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public CallBehaviorActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(CallBehaviorActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionEditPart.java
index c99f30a574a..ec11f8edd7a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionEditPart.java
@@ -1,1551 +1,1551 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class CallOperationActionEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3010;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public CallOperationActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CallOperationActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CallOperationActionCanonicalEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case ActionInputPinInCallOpActEditPart.VISUAL_ID:
- case ValuePinInCallOpActEditPart.VISUAL_ID:
- case InputPinInCallOpActEditPart.VISUAL_ID:
- case OutputPinInCallOpActEditPart.VISUAL_ID:
- case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID:
- case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID:
- case InputPinInCallOpActAsTargetEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new PapyrusRoundedNodeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public PapyrusRoundedNodeFigure getPrimaryShape() {
- return (PapyrusRoundedNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CallOperationActionNameEditPart) {
- ((CallOperationActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ActionInputPinInCallOpActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInCallOpActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ValuePinInCallOpActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((ValuePinInCallOpActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInCallOpActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInCallOpActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof OutputPinInCallOpActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST);
- getBorderedFigure().getBorderItemContainer().add(((OutputPinInCallOpActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((ValuePinInCallOpActAsTargetEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInCallOpActAsTargetEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInCallOpActAsTargetEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CallOperationActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ActionInputPinInCallOpActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInCallOpActEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ValuePinInCallOpActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ValuePinInCallOpActEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof InputPinInCallOpActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInCallOpActEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof OutputPinInCallOpActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((OutputPinInCallOpActEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ValuePinInCallOpActAsTargetEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInCallOpActAsTargetEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInCallOpActAsTargetEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "CallOperationAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(CallOperationActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class CallOperationActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3010;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public CallOperationActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CallOperationActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.CallOperationActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CallOperationActionCanonicalEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ActionInputPinInCallOpActEditPart.VISUAL_ID:
+ case ValuePinInCallOpActEditPart.VISUAL_ID:
+ case InputPinInCallOpActEditPart.VISUAL_ID:
+ case OutputPinInCallOpActEditPart.VISUAL_ID:
+ case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID:
+ case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID:
+ case InputPinInCallOpActAsTargetEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CallOperationActionNameEditPart) {
+ ((CallOperationActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInCallOpActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ValuePinInCallOpActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((ValuePinInCallOpActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInCallOpActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInCallOpActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof OutputPinInCallOpActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST);
+ getBorderedFigure().getBorderItemContainer().add(((OutputPinInCallOpActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((ValuePinInCallOpActAsTargetEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInCallOpActAsTargetEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInCallOpActAsTargetEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CallOperationActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInCallOpActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ValuePinInCallOpActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ValuePinInCallOpActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof InputPinInCallOpActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInCallOpActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInCallOpActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((OutputPinInCallOpActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ValuePinInCallOpActAsTargetEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInCallOpActAsTargetEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInCallOpActAsTargetEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "CallOperationAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(CallOperationActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("CallOperationAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..7bbea051fb4
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CallOperationActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 CallOperationActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6020;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(CallOperationActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public CallOperationActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(CallOperationActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeEditPart.java
index 61376cef273..24c88fc6e04 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeEditPart.java
@@ -1,1240 +1,1286 @@
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-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.figures.BorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CentralBufferNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-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.figure.node.NodeNamedElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class CentralBufferNodeEditPart extends AbstractBorderedShapeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3104;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public CentralBufferNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CentralBufferNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * @generated NOT use BehaviorPropertyNodeEditPolicy
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case CentralBufferNodeSelectionEditPart.VISUAL_ID:
- return new BehaviorPropertyNodeEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new ObjectNodeDescriptor();
- }
-
- /**
- * @generated
- */
- public ObjectNodeDescriptor getPrimaryShape() {
- return (ObjectNodeDescriptor) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CentralBufferNodeLabelEditPart) {
- ((CentralBufferNodeLabelEditPart) childEditPart).setLabel(getPrimaryShape().getObjectNodeLabel());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CentralBufferNodeLabelEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated NOT use custom locator
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof CentralBufferNodeSelectionEditPart) {
- // use custom locator
- BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH);
- locator.setBorderItemOffset(new Dimension(-20, -20));
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "CentralBufferNode";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane. Respects
- * layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(CentralBufferNodeLabelEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public class ObjectNodeDescriptor extends NodeNamedElementFigure {
-
- /**
- * @generated
- */
- private WrappingLabel fObjectNodeLabel;
-
- /**
- * @generated NOT call super
- */
- public ObjectNodeDescriptor() {
- // call super
- super();
- createContents();
- }
-
- /**
- * @generated NOT use super figure name label instead
- */
- private void createContents() {
- // use super figure name label instead
- getNameLabel().setTextJustification(PositionConstants.CENTER);
- getNameLabel().setAlignment(PositionConstants.CENTER);
- getNameLabel().setTextWrap(true);
- getNameLabel().setBorder(new MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5)));
- // fObjectNodeLabel = new WrappingLabel();
- //
- //
- //
- // fObjectNodeLabel.setBorder(new
- // MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5),
- // getMapMode().DPtoLP(5), getMapMode().DPtoLP(5)));
- //
- // this.add(fObjectNodeLabel);
- }
-
- /**
- * @generated NOT get label from super figure instead
- */
- public WrappingLabel getObjectNodeLabel() {
- // get label from super figure instead
- return getNameLabel();
- // return fObjectNodeLabel;
- }
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+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.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CentralBufferNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class CentralBufferNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3104;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public CentralBufferNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CentralBufferNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * @generated NOT use BehaviorPropertyNodeEditPolicy
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case CentralBufferNodeSelectionEditPart.VISUAL_ID:
+ return new BehaviorPropertyNodeEditPolicy();
+
+ case CentralBufferNodeFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ }
+
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ // not generated but change include on gmfgen, can be override at the generation
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to tru:e (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CentralBufferNodeLabelEditPart) {
+ ((CentralBufferNodeLabelEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CentralBufferNodeLabelEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated NOT use custom locator
+ * => not used anymore: override by customCentralBufferEditPart instead
+ * =>
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof CentralBufferNodeSelectionEditPart) {
+ // use custom locator
+ BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH);
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else if (borderItemEditPart instanceof CentralBufferNodeFloatingNameEditPart) {
+ BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "CentralBufferNode";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane. Respects
+ * layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(CentralBufferNodeLabelEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ // /**
+ // * @generated
+ // */
+ // public class ObjectNodeDescriptor extends NodeNamedElementFigure {
+ //
+ // /**
+ // * @generated
+ // */
+ // private WrappingLabel fObjectNodeLabel;
+ //
+ // /**
+ // * @generated NOT call super
+ // */
+ // public ObjectNodeDescriptor() {
+ // // call super
+ // super();
+ // createContents();
+ // }
+ //
+ // /**
+ // * @generated NOT use super figure name label instead
+ // */
+ // private void createContents() {
+ // // use super figure name label instead
+ // getNameLabel().setTextJustification(PositionConstants.CENTER);
+ // getNameLabel().setAlignment(PositionConstants.CENTER);
+ // getNameLabel().setTextWrap(true);
+ // getNameLabel().setBorder(new MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5)));
+ // // fObjectNodeLabel = new WrappingLabel();
+ // //
+ // //
+ // //
+ // // fObjectNodeLabel.setBorder(new
+ // // MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5),
+ // // getMapMode().DPtoLP(5), getMapMode().DPtoLP(5)));
+ // //
+ // // this.add(fObjectNodeLabel);
+ // }
+ //
+ // /**
+ // * @generated NOT get label from super figure instead
+ // */
+ // public WrappingLabel getObjectNodeLabel() {
+ // // get label from super figure instead
+ // return getNameLabel();
+ // // return fObjectNodeLabel;
+ // }
+ // }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("CentralBufferNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeFloatingNameEditPart.java
new file mode 100644
index 00000000000..fd1b71d31d4
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CentralBufferNodeFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 CentralBufferNodeFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6030;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(CentralBufferNodeFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public CentralBufferNodeFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(CentralBufferNodeFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ConditionalNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ConditionalNodeEditPart.java
index 266ca85aeb7..17dc756a848 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ConditionalNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ConditionalNodeEditPart.java
@@ -1,1465 +1,1465 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ConditionalNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-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.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ConditionalNodeEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3069;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * Preferences Store
- */
- protected IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
-
- /**
- * @generated
- */
- public ConditionalNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConditionalNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new StructuredActivityNodeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public StructuredActivityNodeFigure getPrimaryShape() {
- return (StructuredActivityNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ConditionalNodeKeywordEditPart) {
- ((ConditionalNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- if (childEditPart instanceof ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ConditionalNodeKeywordEditPart) {
- return true;
- }
- if (childEditPart instanceof ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
- pane.remove(((ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) {
- return getPrimaryShape().getStructuredActivityNodeCompartment();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "ConditionalNode";
- 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));
- 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
- */
- @Override
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ConditionalNodeKeywordEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ConditionalNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ConditionalNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3069;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * Preferences Store
+ */
+ protected IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
+
+ /**
+ * @generated
+ */
+ public ConditionalNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConditionalNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new StructuredActivityNodeFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public StructuredActivityNodeFigure getPrimaryShape() {
+ return (StructuredActivityNodeFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ConditionalNodeKeywordEditPart) {
+ ((ConditionalNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ConditionalNodeKeywordEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
+ pane.remove(((ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof ConditionalNodeStructuredActivityNodeContentCompartmentEditPart) {
+ return getPrimaryShape().getStructuredActivityNodeCompartment();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "ConditionalNode";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createNodeFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ConditionalNodeKeywordEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("ConditionalNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionEditPart.java
index 00139e09363..ba947aa8d1d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionEditPart.java
@@ -1,1495 +1,1495 @@
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.transaction.RollbackException;
-import org.eclipse.emf.transaction.Transaction;
-import org.eclipse.emf.transaction.TransactionalCommandStack;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class CreateObjectActionEditPart extends AbstractBorderedShapeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3086;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public CreateObjectActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CreateObjectActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CreateObjectActionCanonicalEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new PapyrusRoundedNodeFigure();
- }
-
- /**
- * @generated
- */
- public PapyrusRoundedNodeFigure getPrimaryShape() {
- return (PapyrusRoundedNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CreateObjectActionNameEditPart) {
- ((CreateObjectActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.SOUTH);
- getBorderedFigure().getBorderItemContainer().add(((OutputPinInCreateObjectActionAsResultEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CreateObjectActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((OutputPinInCreateObjectActionAsResultEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "CreateObjectAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(CreateObjectActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification)
- * Change automatically the type of the output pin with the type of the classifier
- * @param notification
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
- Object feature = notification.getFeature();
- if (UMLPackage.Literals.CREATE_OBJECT_ACTION__CLASSIFIER.equals(feature)) {
- final Object result = this.resolveSemanticElement().eGet(UMLPackage.Literals.CREATE_OBJECT_ACTION__RESULT);
- org.eclipse.emf.common.command.Command cmd = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, notification.getNewValue());
- try {
- if (cmd.canExecute()) {
- CommandStack commandStack = getEditingDomain().getCommandStack();
- if (commandStack instanceof TransactionalCommandStack) {
- ((TransactionalCommandStack) commandStack).execute(cmd, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
- } else {
- commandStack.execute(cmd);
- }
- }
- } catch (InterruptedException e) {
- e.printStackTrace();
- } catch (RollbackException e) {
- e.printStackTrace();
- }
- }
- }
-}
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.RollbackException;
+import org.eclipse.emf.transaction.Transaction;
+import org.eclipse.emf.transaction.TransactionalCommandStack;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class CreateObjectActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3086;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public CreateObjectActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CreateObjectActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateObjectActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CreateObjectActionCanonicalEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CreateObjectActionNameEditPart) {
+ ((CreateObjectActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ getBorderedFigure().getBorderItemContainer().add(((OutputPinInCreateObjectActionAsResultEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CreateObjectActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((OutputPinInCreateObjectActionAsResultEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "CreateObjectAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(CreateObjectActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("CreateObjectAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification)
+ * Change automatically the type of the output pin with the type of the classifier
+ * @param notification
+ */
+ @Override
+ protected void handleNotificationEvent(Notification notification) {
+ super.handleNotificationEvent(notification);
+ Object feature = notification.getFeature();
+ if (UMLPackage.Literals.CREATE_OBJECT_ACTION__CLASSIFIER.equals(feature)) {
+ final Object result = this.resolveSemanticElement().eGet(UMLPackage.Literals.CREATE_OBJECT_ACTION__RESULT);
+ org.eclipse.emf.common.command.Command cmd = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, notification.getNewValue());
+ try {
+ if (cmd.canExecute()) {
+ CommandStack commandStack = getEditingDomain().getCommandStack();
+ if (commandStack instanceof TransactionalCommandStack) {
+ ((TransactionalCommandStack) commandStack).execute(cmd, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
+ } else {
+ commandStack.execute(cmd);
+ }
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } catch (RollbackException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..c778830e434
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateObjectActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 CreateObjectActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6024;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(CreateObjectActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public CreateObjectActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(CreateObjectActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeEditPart.java
index ce7dad38383..9e2f9cf54e1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeEditPart.java
@@ -1,1280 +1,1278 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-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.figures.BorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-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.Edge;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DataStoreNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.figure.node.NodeNamedElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class DataStoreNodeEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3078;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DataStoreNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DataStoreNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- /*
- * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
- * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
- */
- if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
- Object notifier = event.getNotifier();
- List<?> modelChildren = ((View) getModel()).getChildren();
- if (!(notifier instanceof Edge)) {
- if (modelChildren.contains(event.getNotifier())) {
- return;
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated NOT use BehaviorPropertyNodeEditPolicy
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case DataStoreSelectionEditPart.VISUAL_ID:
- return new BehaviorPropertyNodeEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ObjectNodeDescriptor();
- }
-
- /**
- * @generated
- */
- @Override
- public ObjectNodeDescriptor getPrimaryShape() {
- return (ObjectNodeDescriptor) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DataStoreNodeLabelEditPart) {
- ((DataStoreNodeLabelEditPart) childEditPart).setLabel(getPrimaryShape().getObjectNodeLabel());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DataStoreNodeLabelEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated NOT use custom locator
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DataStoreSelectionEditPart) {
- // use custom locator
- BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH);
- locator.setBorderItemOffset(new Dimension(-20, -20));
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "DataStoreNode";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataStoreNodeLabelEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public class ObjectNodeDescriptor extends NodeNamedElementFigure {
-
- /**
- * @generated
- */
- private WrappingLabel fObjectNodeLabel;
-
- /**
- * @generated NOT call super
- */
- public ObjectNodeDescriptor() {
- // call super
- super();
- createContents();
- }
-
- /**
- * @generated NOT use super figure name label instead
- */
- private void createContents() {
- // use super figure name label instead
- getNameLabel().setTextJustification(PositionConstants.CENTER);
- getNameLabel().setAlignment(PositionConstants.CENTER);
- getNameLabel().setTextWrap(true);
- getNameLabel().setBorder(new MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5)));
- // fObjectNodeLabel = new WrappingLabel();
- //
- //
- //
- // fObjectNodeLabel.setBorder(new MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5)));
- //
- // this.add(fObjectNodeLabel);
- }
-
- /**
- * @generated NOT get label from super figure instead
- */
- public WrappingLabel getObjectNodeLabel() {
- // get label from super figure instead
- return getNameLabel();
- // return fObjectNodeLabel;
- }
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.BorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DataStoreNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class DataStoreNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3078;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public DataStoreNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DataStoreNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated NOT use BehaviorPropertyNodeEditPolicy
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case DataStoreSelectionEditPart.VISUAL_ID:
+ return new BehaviorPropertyNodeEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DataStoreNodeLabelEditPart) {
+ ((DataStoreNodeLabelEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DataStoreNodeLabelEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated NOT use custom locator
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof DataStoreSelectionEditPart) {
+ // use custom locator
+ BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH);
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "DataStoreNode";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataStoreNodeLabelEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ // /**
+ // * @generated
+ // */
+ // public class ObjectNodeDescriptor extends NodeNamedElementFigure {
+ //
+ // /**
+ // * @generated
+ // */
+ // private WrappingLabel fObjectNodeLabel;
+ //
+ // /**
+ // * @generated NOT call super
+ // */
+ // public ObjectNodeDescriptor() {
+ // // call super
+ // super();
+ // createContents();
+ // }
+ //
+ // /**
+ // * @generated NOT use super figure name label instead
+ // */
+ // private void createContents() {
+ // // use super figure name label instead
+ // getNameLabel().setTextJustification(PositionConstants.CENTER);
+ // getNameLabel().setAlignment(PositionConstants.CENTER);
+ // getNameLabel().setTextWrap(true);
+ // getNameLabel().setBorder(new MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5)));
+ // // fObjectNodeLabel = new WrappingLabel();
+ // //
+ // //
+ // //
+ // // fObjectNodeLabel.setBorder(new MarginBorder(getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5), getMapMode().DPtoLP(5)));
+ // //
+ // // this.add(fObjectNodeLabel);
+ // }
+ //
+ // /**
+ // * @generated NOT get label from super figure instead
+ // */
+ // public WrappingLabel getObjectNodeLabel() {
+ // // get label from super figure instead
+ // return getNameLabel();
+ // // return fObjectNodeLabel;
+ // }
+ // }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("DataStoreNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeFloatingNameEditPart.java
new file mode 100644
index 00000000000..85ba2c85726
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 DataStoreNodeFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6031;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(DataStoreNodeFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public DataStoreNodeFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(DataStoreNodeFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionInputEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionInputEditPart.java
index cfec67513f8..6fa106757ed 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionInputEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionInputEditPart.java
@@ -1,927 +1,928 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.FigureListener;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.PolylineShape;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-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.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-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.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-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.gef.ui.internal.figures.DiamondFigure;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel;
-import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
-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.CornerBentFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.Behavior;
-import org.eclipse.uml2.uml.DecisionNode;
-import org.eclipse.uml2.uml.Feature;
-
-/**
- * @generated
- */
-public class DecisionInputEditPart extends LabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5043;
-
- /**
- * @generated
- */
- private DirectEditManager manager;
-
- /**
- * @generated
- */
- private IParser parser;
-
- /**
- * @generated
- */
- private List<?> parserElements;
-
- /**
- * @generated
- */
- private String defaultText;
-
- /** direct edition mode (default, undefined, registered editor, etc.) */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /** configuration from a registered edit dialog */
- protected IDirectEditorConfiguration configuration;
- /**
- * @generated
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.activity.edit.parts.DecisionInputEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public DecisionInputEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new BehaviorPropertyNodeEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public void refreshBounds() {
- int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @generated NOT handle LinkAndCornerBentWithTextFigure
- */
- protected String getLabelTextHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getText();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getText();
- } else if (figure instanceof LinkAndCornerBentWithTextFigure) {
- return ((LinkAndCornerBentWithTextFigure) figure).getCornerBentContent().getText();
- } else {
- return ((Label) figure).getText();
- }
- }
-
- /**
- * @generated NOT handle LinkAndCornerBentWithTextFigure
- */
- 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 if (figure instanceof LinkAndCornerBentWithTextFigure) {
- ((LinkAndCornerBentWithTextFigure) figure).getCornerBentContent().setText(text);
- } else {
- ((Label) figure).setText(text);
- }
- }
-
- /**
- * @generated NOT handle LinkAndCornerBentWithTextFigure
- */
- protected Image getLabelIconHelper(IFigure figure) {
- if (figure instanceof WrappingLabel) {
- return ((WrappingLabel) figure).getIcon();
- } else if (figure instanceof ILabelFigure) {
- return ((ILabelFigure) figure).getIcon();
- } else if (figure instanceof LinkAndCornerBentWithTextFigure) {
- return ((LinkAndCornerBentWithTextFigure) figure).getCornerBentContent().getIcon();
- } else {
- return ((Label) figure).getIcon();
- }
- }
-
- /**
- * @generated NOT handle LinkAndCornerBentWithTextFigure
- */
- 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 if (figure instanceof LinkAndCornerBentWithTextFigure) {
- ((LinkAndCornerBentWithTextFigure) figure).getCornerBentContent().setIcon(icon);
- } else {
- ((Label) figure).setIcon(icon);
- }
- }
-
- /**
- * @generated
- */
- public void setLabel(IFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- @Override
- @SuppressWarnings("rawtypes")
- protected List getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- /**
- * @generated
- */
- protected Image getLabelIcon() {
- return null;
- }
-
- /**
- * @generated NOT do not edit label if hidden
- */
- protected String getLabelText() {
- // do not edit label if hidden
- boolean decisionSet = ((DecisionNode) resolveSemanticElement()).getDecisionInput() != null;
- if (decisionSet) {
- 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;
- } else {
- return "";
- }
- }
-
- /**
- * @generated
- */
- @Override
- 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 NOT do not edit label if hidden
- */
- @Override
- public String getEditText() {
- // do not edit label if hidden
- boolean decisionSet = ((DecisionNode) resolveSemanticElement()).getDecisionInput() != null;
- if (getParserElement() == null || getParser() == null || !decisionSet) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- /**
- * @generated
- */
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.DecisionNode_3038, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.activity.edit.parts.DecisionInputEditPart.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 NOT do not edit label if hidden
- */
- protected void performDirectEdit() {
- // do not edit label if hidden
- boolean decisionSet = ((DecisionNode) resolveSemanticElement()).getDecisionInput() != null;
- if (decisionSet) {
- getManager().show();
- }
- }
-
- /**
- * @generated NOT do not edit label if hidden
- */
- protected void performDirectEdit(Point eventLocation) {
- // do not edit label if hidden
- boolean decisionSet = ((DecisionNode) resolveSemanticElement()).getDecisionInput() != null;
- if (getManager() instanceof TextDirectEditManager && decisionSet) {
- ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- /**
- * @generated NOT do not edit label if hidden
- */
- private void performDirectEdit(char initialCharacter) {
- // do not edit label if hidden
- boolean decisionSet = ((DecisionNode) resolveSemanticElement()).getDecisionInput() != null;
- if (getManager() instanceof TextDirectEditManager && decisionSet) {
- ((TextDirectEditManager) getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- /**
- * @generated NOT do not edit label if hidden
- */
- @Override
- protected void performDirectEditRequest(Request request) {
- // do not edit label if hidden
- boolean decisionSet = ((DecisionNode) resolveSemanticElement()).getDecisionInput() != null;
- if (!decisionSet) {
- return;
- }
- final Request theRequest = request;
- if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch (directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if (configuration == null || configuration.getLanguage() == null) {
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if (configuration instanceof 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(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
- if (Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- @Override
- public void run() {
- if (isActive() && isEditable()) {
- if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest) theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- break;
- default:
- break;
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- /**
- * sets the visibility of this edit part
- *
- * @param vis
- * the new value of the visibility
- * @generated NOT
- */
- @Override
- protected void setVisibility(boolean vis) {
- EObject element = resolveSemanticElement();
- if (element instanceof DecisionNode) {
- Behavior decisionInput = ((DecisionNode) element).getDecisionInput();
- if (decisionInput == null) {
- vis = false;
- }
- }
- super.setVisibility(vis);
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if (languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- *
- * @param theRequest
- * the direct edit request that starts the direct edit system
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- @Override
- 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 NOT refresh the visibility in case the decision input assignment changed
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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();
- // refresh the visibility in case the decision input assignment changed
- refreshVisibility();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new LinkAndCornerBentWithTextFigure();
- }
-
- /**
- * @generated
- */
- public class LinkAndCornerBentWithTextFigure extends CornerBentFigure {
-
- /**
- * @generated
- */
- private WrappedLabel fCornerBentContent;
-
- /**
- * @generated
- */
- private PolylineShape fLinkToBehaviorProperty;
-
- /**
- * @generated
- */
- public LinkAndCornerBentWithTextFigure() {
- this.setBackgroundColor(THIS_BACK);
- createContents();
- }
-
- /**
- * @generated NOT do not add link in this figure
- */
- private void createContents() {
- fCornerBentContent = new WrappedLabel();
- this.add(fCornerBentContent);
- fLinkToBehaviorProperty = new PolylineShape();
- fLinkToBehaviorProperty.setLineWidth(1);
- fLinkToBehaviorProperty.setLineStyle(Graphics.LINE_DASH);
- // do not add link in this figure but refresh it when figure moves
- addFigureListener(new FigureListener() {
-
- @Override
- public void figureMoved(IFigure source) {
- refreshLinkToBehaviorProperty();
- }
- });
- }
-
- /**
- * @see org.eclipse.draw2d.Figure#setVisible(boolean)
- * @generated NOT report visibility on the link
- */
- @Override
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- getLinkToBehaviorProperty().setVisible(visible);
- }
-
- /**
- * Refresh the link between parent figure and this one
- *
- * @generated NOT
- */
- private void refreshLinkToBehaviorProperty() {
- if (getLinkToBehaviorProperty().getParent() == null) {
- // add in appropriate figure
- getParent().add(getLinkToBehaviorProperty());
- }
- if (getParent() != null && getParent().getParent() instanceof BorderedNodeFigure) {
- BorderedNodeFigure gParent = (BorderedNodeFigure) getParent().getParent();
- Rectangle parentBounds = gParent.getHandleBounds().getCopy();
- Point parentCenter = parentBounds.getCenter();
- DiamondFigure diamond = (DiamondFigure) gParent.getMainFigure();
- Rectangle currentBounds = ((LinkedBehaviorLocator) getBorderItemLocator()).getCorrectItemLocation(this);
- Point end = BehaviorPropertyNodeEditPolicy.getAppropriateBorderPoint(parentCenter, currentBounds);
- Point start = BehaviorPropertyNodeEditPolicy.getIntersectionPoint(diamond.getPolygonPoints(), parentCenter, end);
- if (start == null) {
- // in case start computation fails
- start = parentCenter;
- }
- // adapt ends to bounds
- Rectangle linkBounds = new Rectangle(start, end);
- getLinkToBehaviorProperty().setStart(start.translate(linkBounds.getLocation().getNegated()));
- getLinkToBehaviorProperty().setEnd(end.translate(linkBounds.getLocation().getNegated()));
- getLinkToBehaviorProperty().setBounds(linkBounds);
- }
- }
-
- /**
- * @generated
- */
- public WrappedLabel getCornerBentContent() {
- return fCornerBentContent;
- }
-
- /**
- * @generated
- */
- public PolylineShape getLinkToBehaviorProperty() {
- return fLinkToBehaviorProperty;
- }
- }
-
- /**
- * @generated
- */
- static final Color THIS_BACK = new Color(null, 248, 249, 214);
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.FigureListener;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.PolylineShape;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editparts.LabelEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.figures.WrappedLabel;
+import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+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.CornerBentFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.DecisionNode;
+import org.eclipse.uml2.uml.Feature;
+
+/**
+ * @generated
+ */
+public class DecisionInputEditPart extends LabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5043;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List<?> parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+ /** direct edition mode (default, undefined, registered editor, etc.) */
+ protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
+
+ /** configuration from a registered edit dialog */
+ protected IDirectEditorConfiguration configuration;
+ /**
+ * @generated
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.activity.edit.parts.DecisionInputEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public DecisionInputEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new BehaviorPropertyNodeEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @generated NOT handle LinkAndCornerBentWithTextFigure
+ */
+ protected String getLabelTextHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getText();
+ } else if (figure instanceof ILabelFigure) {
+ return ((ILabelFigure) figure).getText();
+ } else if (figure instanceof LinkAndCornerBentWithTextFigure) {
+ return ((LinkAndCornerBentWithTextFigure) figure).getCornerBentContent().getText();
+ } else {
+ return ((Label) figure).getText();
+ }
+ }
+
+ /**
+ * @generated NOT handle LinkAndCornerBentWithTextFigure
+ */
+ 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 if (figure instanceof LinkAndCornerBentWithTextFigure) {
+ ((LinkAndCornerBentWithTextFigure) figure).getCornerBentContent().setText(text);
+ } else {
+ ((Label) figure).setText(text);
+ }
+ }
+
+ /**
+ * @generated NOT handle LinkAndCornerBentWithTextFigure
+ */
+ protected Image getLabelIconHelper(IFigure figure) {
+ if (figure instanceof WrappingLabel) {
+ return ((WrappingLabel) figure).getIcon();
+ } else if (figure instanceof ILabelFigure) {
+ return ((ILabelFigure) figure).getIcon();
+ } else if (figure instanceof LinkAndCornerBentWithTextFigure) {
+ return ((LinkAndCornerBentWithTextFigure) figure).getCornerBentContent().getIcon();
+ } else {
+ return ((Label) figure).getIcon();
+ }
+ }
+
+ /**
+ * @generated NOT handle LinkAndCornerBentWithTextFigure
+ */
+ 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 if (figure instanceof LinkAndCornerBentWithTextFigure) {
+ ((LinkAndCornerBentWithTextFigure) figure).getCornerBentContent().setIcon(icon);
+ } else {
+ ((Label) figure).setIcon(icon);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabel(IFigure figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ protected List getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIcon() {
+ return null;
+ }
+
+ /**
+ * @generated NOT do not edit label if hidden
+ */
+ protected String getLabelText() {
+ // do not edit label if hidden
+ boolean decisionSet = ((DecisionNode) resolveSemanticElement()).getDecisionInput() != null;
+ if (decisionSet) {
+ 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;
+ } else {
+ return "";
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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 NOT do not edit label if hidden
+ */
+ @Override
+ public String getEditText() {
+ // do not edit label if hidden
+ boolean decisionSet = ((DecisionNode) resolveSemanticElement()).getDecisionInput() != null;
+ if (getParserElement() == null || getParser() == null || !decisionSet) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.DecisionNode_3038, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.activity.edit.parts.DecisionInputEditPart.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 NOT do not edit label if hidden
+ */
+ protected void performDirectEdit() {
+ // do not edit label if hidden
+ boolean decisionSet = ((DecisionNode) resolveSemanticElement()).getDecisionInput() != null;
+ if (decisionSet) {
+ getManager().show();
+ }
+ }
+
+ /**
+ * @generated NOT do not edit label if hidden
+ */
+ protected void performDirectEdit(Point eventLocation) {
+ // do not edit label if hidden
+ boolean decisionSet = ((DecisionNode) resolveSemanticElement()).getDecisionInput() != null;
+ if (getManager() instanceof TextDirectEditManager && decisionSet) {
+ ((TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ /**
+ * @generated NOT do not edit label if hidden
+ */
+ private void performDirectEdit(char initialCharacter) {
+ // do not edit label if hidden
+ boolean decisionSet = ((DecisionNode) resolveSemanticElement()).getDecisionInput() != null;
+ if (getManager() instanceof TextDirectEditManager && decisionSet) {
+ ((TextDirectEditManager) getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * @generated NOT do not edit label if hidden
+ */
+ @Override
+ protected void performDirectEditRequest(Request request) {
+ // do not edit label if hidden
+ boolean decisionSet = ((DecisionNode) resolveSemanticElement()).getDecisionInput() != null;
+ if (!decisionSet) {
+ return;
+ }
+ final Request theRequest = request;
+ if (IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ directEditionMode = getDirectEditionType();
+ }
+ switch (directEditionMode) {
+ case IDirectEdition.NO_DIRECT_EDITION:
+ // no direct edition mode => does nothing
+ return;
+ case IDirectEdition.EXTENDED_DIRECT_EDITOR:
+ updateExtendedEditorConfiguration();
+ if (configuration == null || configuration.getLanguage() == null) {
+ performDefaultDirectEditorEdit(theRequest);
+ } else {
+ configuration.preEditAction(resolveSemanticElement());
+ Dialog dialog = null;
+ if (configuration instanceof 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(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
+ } else {
+ return;
+ }
+ final Dialog finalDialog = dialog;
+ if (Window.OK == dialog.open()) {
+ TransactionalEditingDomain domain = getEditingDomain();
+ RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
+
+ @Override
+ protected void doExecute() {
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog) finalDialog).getValue());
+ }
+ };
+ domain.getCommandStack().execute(command);
+ }
+ }
+ break;
+ case IDirectEdition.DEFAULT_DIRECT_EDITOR:
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ @Override
+ public void run() {
+ if (isActive() && isEditable()) {
+ if (theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character) theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if ((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest) theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ /**
+ * sets the visibility of this edit part
+ *
+ * @param vis
+ * the new value of the visibility
+ * @generated NOT
+ */
+ @Override
+ protected void setVisibility(boolean vis) {
+ EObject element = resolveSemanticElement();
+ if (element instanceof DecisionNode) {
+ Behavior decisionInput = ((DecisionNode) element).getDecisionInput();
+ if (decisionInput == null) {
+ vis = false;
+ }
+ }
+ super.setVisibility(vis);
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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
+ */
+ protected void updateExtendedEditorConfiguration() {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if (languagePreferred != null && !languagePreferred.equals("") && languagePreferred != configuration.getLanguage()) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ configuration = null;
+ }
+ }
+
+ /**
+ * Performs the direct edit usually used by GMF editors.
+ *
+ * @param theRequest
+ * the direct edit request that starts the direct edit system
+ */
+ protected void performDefaultDirectEditorEdit(final Request theRequest) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ @Override
+ 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 NOT refresh the visibility in case the decision input assignment changed
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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();
+ // refresh the visibility in case the decision input assignment changed
+ refreshVisibility();
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new LinkAndCornerBentWithTextFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public class LinkAndCornerBentWithTextFigure extends CornerBentFigure {
+
+ /**
+ * @generated
+ */
+ private WrappedLabel fCornerBentContent;
+
+ /**
+ * @generated
+ */
+ private PolylineShape fLinkToBehaviorProperty;
+
+ /**
+ * @generated
+ */
+ public LinkAndCornerBentWithTextFigure() {
+ this.setBackgroundColor(THIS_BACK);
+ createContents();
+ }
+
+ /**
+ * @generated NOT do not add link in this figure
+ */
+ private void createContents() {
+ fCornerBentContent = new WrappedLabel();
+ this.add(fCornerBentContent);
+ fLinkToBehaviorProperty = new PolylineShape();
+ fLinkToBehaviorProperty.setLineWidth(1);
+ fLinkToBehaviorProperty.setLineStyle(Graphics.LINE_DASH);
+ // do not add link in this figure but refresh it when figure moves
+ addFigureListener(new FigureListener() {
+
+ @Override
+ public void figureMoved(IFigure source) {
+ refreshLinkToBehaviorProperty();
+ }
+ });
+ }
+
+ /**
+ * @see org.eclipse.draw2d.Figure#setVisible(boolean)
+ * @generated NOT report visibility on the link
+ */
+ @Override
+ public void setVisible(boolean visible) {
+ super.setVisible(visible);
+ getLinkToBehaviorProperty().setVisible(visible);
+ }
+
+ /**
+ * Refresh the link between parent figure and this one
+ *
+ * @generated NOT
+ */
+ private void refreshLinkToBehaviorProperty() {
+ if (getLinkToBehaviorProperty().getParent() == null) {
+ // add in appropriate figure
+ getParent().add(getLinkToBehaviorProperty());
+ }
+ if (getParent() != null && getParent().getParent() instanceof BorderedNodeFigure) {
+ BorderedNodeFigure gParent = (BorderedNodeFigure) getParent().getParent();
+ Rectangle parentBounds = gParent.getHandleBounds().getCopy();
+ Point parentCenter = parentBounds.getCenter();
+ // DiamondFigure diamond = (DiamondFigure) gParent.getMainFigure();
+ SVGNodePlateFigure diamond = (SVGNodePlateFigure) gParent.getMainFigure();
+ Rectangle currentBounds = ((LinkedBehaviorLocator) getBorderItemLocator()).getCorrectItemLocation(this);
+ Point end = BehaviorPropertyNodeEditPolicy.getAppropriateBorderPoint(parentCenter, currentBounds);
+ Point start = BehaviorPropertyNodeEditPolicy.getIntersectionPoint(diamond.getPolygonPoints(), parentCenter, end);
+ if (start == null) {
+ // in case start computation fails
+ start = parentCenter;
+ }
+ // adapt ends to bounds
+ Rectangle linkBounds = new Rectangle(start, end);
+ getLinkToBehaviorProperty().setStart(start.translate(linkBounds.getLocation().getNegated()));
+ getLinkToBehaviorProperty().setEnd(end.translate(linkBounds.getLocation().getNegated()));
+ getLinkToBehaviorProperty().setBounds(linkBounds);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public WrappedLabel getCornerBentContent() {
+ return fCornerBentContent;
+ }
+
+ /**
+ * @generated
+ */
+ public PolylineShape getLinkToBehaviorProperty() {
+ return fLinkToBehaviorProperty;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ static final Color THIS_BACK = new Color(null, 248, 249, 214);
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionNodeEditPart.java
index 3d42ce41e7a..dbda4a65d12 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionNodeEditPart.java
@@ -1,1142 +1,1142 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-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.figures.BorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-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.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DecisionNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.DiamondNode;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class DecisionNodeEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3038;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DecisionNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DecisionNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- /*
- * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
- * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
- */
- if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
- Object notifier = event.getNotifier();
- List<?> modelChildren = ((View) getModel()).getChildren();
- if (!(notifier instanceof Edge)) {
- if (modelChildren.contains(event.getNotifier())) {
- return;
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated NOT use BehaviorPropertyNodeEditPolicy
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- LayoutEditPolicy lep = new LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case DecisionInputEditPart.VISUAL_ID:
- return new BehaviorPropertyNodeEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new DiamondNode();
- }
-
- /**
- * @generated
- */
- @Override
- public DiamondNode getPrimaryShape() {
- return (DiamondNode) primaryShape;
- }
-
- /**
- * @generated NOT use custom locator
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DecisionInputEditPart) {
- // use custom locator
- BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH);
- locator.setBorderItemOffset(new Dimension(-20, -20));
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated NOT use a diamond figure instead
- */
- @Override
- protected NodeFigure createNodePlate() {
- NodeFigure result = new org.eclipse.gmf.runtime.gef.ui.internal.figures.DiamondFigure(new Dimension(20, 30));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- protected IFigure setupContentPane(IFigure nodeShape) {
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(DecisionInputEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("DecisionNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("DecisionNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("DecisionNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("DecisionNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.BorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+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.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.BehaviorPropertyNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DecisionNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.LinkedBehaviorLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class DecisionNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3038;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public DecisionNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DecisionNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated NOT use BehaviorPropertyNodeEditPolicy
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ LayoutEditPolicy lep = new LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case DecisionInputEditPart.VISUAL_ID:
+ return new BehaviorPropertyNodeEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated NOT use custom locator
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof DecisionInputEditPart) {
+ // use custom locator
+ BorderItemLocator locator = new LinkedBehaviorLocator(getMainFigure(), PositionConstants.NORTH);
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated NOT use a diamond figure instead
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ NodeFigure result = new org.eclipse.gmf.runtime.gef.ui.internal.figures.DiamondFigure(new Dimension(20, 30));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(DecisionNodeFloatingNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("DecisionNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("DecisionNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("DecisionNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("DecisionNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionNodeFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionNodeFloatingNameEditPart.java
new file mode 100644
index 00000000000..f3a1c61498f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DecisionNodeFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 DecisionNodeFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6036;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(DecisionNodeFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public DecisionNodeFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(DecisionNodeFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionEditPart.java
index bb287261a49..55e9bb3ab96 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionEditPart.java
@@ -1,1458 +1,1458 @@
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class DestroyObjectActionEditPart extends AbstractBorderedShapeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3095;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DestroyObjectActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DestroyObjectActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new DestroyObjectActionCanonicalEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case InputPinInDestroyObjectActionEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new PapyrusRoundedNodeFigure();
- }
-
- /**
- * @generated
- */
- public PapyrusRoundedNodeFigure getPrimaryShape() {
- return (PapyrusRoundedNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DestroyObjectActionNameEditPart) {
- ((DestroyObjectActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInDestroyObjectActionEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DestroyObjectActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInDestroyObjectActionEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "DestroyObjectAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(DestroyObjectActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class DestroyObjectActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3095;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public DestroyObjectActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DestroyObjectActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.DestroyObjectActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new DestroyObjectActionCanonicalEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case InputPinInDestroyObjectActionEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DestroyObjectActionNameEditPart) {
+ ((DestroyObjectActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInDestroyObjectActionEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DestroyObjectActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInDestroyObjectActionEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "DestroyObjectAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(DestroyObjectActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("DestroyObjectAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..8e02b46524f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DestroyObjectActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 DestroyObjectActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6022;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(DestroyObjectActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public DestroyObjectActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(DestroyObjectActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ExpansionRegionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ExpansionRegionEditPart.java
index 79e7a961c16..2ab64b094c1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ExpansionRegionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ExpansionRegionEditPart.java
@@ -1,1500 +1,1500 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ExpansionRegionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.ExpansionNodePositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ExpansionRegionEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3070;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ExpansionRegionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExpansionRegionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ExpansionRegionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case ExpansionNodeAsInEditPart.VISUAL_ID:
- case ExpansionNodeAsOutEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new StructuredActivityNodeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public StructuredActivityNodeFigure getPrimaryShape() {
- return (StructuredActivityNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ExpansionRegionKeywordEditPart) {
- ((ExpansionRegionKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- if (childEditPart instanceof ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- // Papyrus Gencode :Affixed Expansion Node locator for Activity
- if (childEditPart instanceof ExpansionNodeAsInEditPart) {
- IBorderItemLocator locator = new ExpansionNodePositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((ExpansionNodeAsInEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Expansion Node locator for Activity
- if (childEditPart instanceof ExpansionNodeAsOutEditPart) {
- IBorderItemLocator locator = new ExpansionNodePositionLocator(getMainFigure(), PositionConstants.SOUTH);
- getBorderedFigure().getBorderItemContainer().add(((ExpansionNodeAsOutEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ExpansionRegionKeywordEditPart) {
- return true;
- }
- if (childEditPart instanceof ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
- pane.remove(((ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ExpansionNodeAsInEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ExpansionNodeAsInEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ExpansionNodeAsOutEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ExpansionNodeAsOutEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) {
- return getPrimaryShape().getStructuredActivityNodeCompartment();
- }
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "ExpansionRegion";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ExpansionRegionKeywordEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ExpansionRegionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.ExpansionNodePositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ExpansionRegionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3070;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ExpansionRegionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExpansionRegionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ExpansionRegionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ExpansionNodeAsInEditPart.VISUAL_ID:
+ case ExpansionNodeAsOutEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new StructuredActivityNodeFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public StructuredActivityNodeFigure getPrimaryShape() {
+ return (StructuredActivityNodeFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ExpansionRegionKeywordEditPart) {
+ ((ExpansionRegionKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Expansion Node locator for Activity
+ if (childEditPart instanceof ExpansionNodeAsInEditPart) {
+ IBorderItemLocator locator = new ExpansionNodePositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((ExpansionNodeAsInEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Expansion Node locator for Activity
+ if (childEditPart instanceof ExpansionNodeAsOutEditPart) {
+ IBorderItemLocator locator = new ExpansionNodePositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ getBorderedFigure().getBorderItemContainer().add(((ExpansionNodeAsOutEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ExpansionRegionKeywordEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
+ pane.remove(((ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ExpansionNodeAsInEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ExpansionNodeAsInEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ExpansionNodeAsOutEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ExpansionNodeAsOutEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof ExpansionRegionStructuredActivityNodeContentCompartmentEditPart) {
+ return getPrimaryShape().getStructuredActivityNodeCompartment();
+ }
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "ExpansionRegion";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ExpansionRegionKeywordEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("ExpansionRegion", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/FlowFinalNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/FlowFinalNodeEditPart.java
index 23ddbf5a2c9..e9b3a663dff 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/FlowFinalNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/FlowFinalNodeEditPart.java
@@ -1,1166 +1,1153 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-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.handles.MoveHandle;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.internal.figures.CircleFigure;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.FlowFinalNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ResizableSquareEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.FlowFinalNode;
-import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class FlowFinalNodeEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3006;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public FlowFinalNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * Return the edit policy so that the figure stays a square
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart#getPrimaryDragEditPolicy()
- * @return EditPolicy
- * @generated NOT
- */
- @Override
- public EditPolicy getPrimaryDragEditPolicy() {
- return new ResizableSquareEditPolicy();
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new FlowFinalNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- /*
- * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
- * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
- */
- if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
- Object notifier = event.getNotifier();
- List<?> modelChildren = ((View) getModel()).getChildren();
- if (!(notifier instanceof Edge)) {
- if (modelChildren.contains(event.getNotifier())) {
- return;
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new BorderItemSelectionEditPolicy() {
-
- @Override
- protected List createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
- };
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new FlowFinalNode();
- }
-
- /**
- * @generated
- */
- @Override
- public FlowFinalNode getPrimaryShape() {
- return (FlowFinalNode) primaryShape;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof FlowFinalNodeAppliedStereotypeEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated NOT use a circle figure instead
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new CircleFigure(((Bounds) ((Node) getNotationView()).getLayoutConstraint()).getWidth(), ((Bounds) ((Node) getNotationView()).getLayoutConstraint()).getHeight());
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- protected IFigure setupContentPane(IFigure nodeShape) {
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("FlowFinalNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("FlowFinalNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("FlowFinalNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("FlowFinalNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+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.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.internal.figures.CircleFigure;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.FlowFinalNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class FlowFinalNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3006;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public FlowFinalNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new FlowFinalNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FlowFinalNodeAppliedStereotypeEditPart) {
+ IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated NOT use a circle figure instead
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new CircleFigure(((Bounds) ((Node) getNotationView()).getLayoutConstraint()).getWidth(), ((Bounds) ((Node) getNotationView()).getLayoutConstraint()).getHeight());
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(FlowFinalNodeFloatingNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("FlowFinalNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("FlowFinalNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("FlowFinalNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("FlowFinalNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/FlowFinalNodeFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/FlowFinalNodeFloatingNameEditPart.java
new file mode 100644
index 00000000000..51dbe2e9b6f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/FlowFinalNodeFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 FlowFinalNodeFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6035;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(FlowFinalNodeFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public FlowFinalNodeFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(FlowFinalNodeFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ForkNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ForkNodeEditPart.java
index 8d8092f470e..3720979c93f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ForkNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ForkNodeEditPart.java
@@ -1,1169 +1,1187 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-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.handles.MoveHandle;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ForkJoinResizeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ForkNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ForkNode;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ForkNodeEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3040;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ForkNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * Return the edit policy to resize figure as a fork or a join
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart#getPrimaryDragEditPolicy()
- * @return EditPolicy
- * @generated NOT
- */
- @Override
- public EditPolicy getPrimaryDragEditPolicy() {
- return new ForkJoinResizeEditPolicy();
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ForkNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- /*
- * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
- * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
- */
- if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
- Object notifier = event.getNotifier();
- List<?> modelChildren = ((View) getModel()).getChildren();
- if (!(notifier instanceof Edge)) {
- if (modelChildren.contains(event.getNotifier())) {
- return;
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case ForkNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new BorderItemSelectionEditPolicy() {
-
- @Override
- protected List createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
- };
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ForkNode();
- }
-
- /**
- * @generated
- */
- @Override
- public ForkNode getPrimaryShape() {
- return (ForkNode) primaryShape;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof ForkNodeAppliedStereotypeEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "ForkNode";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- protected IFigure setupContentPane(IFigure nodeShape) {
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ForkNodeAppliedStereotypeEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ForkNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ForkNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ForkNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("ForkNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+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.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ForkJoinResizeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ForkNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ForkNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3040;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ForkNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Return the edit policy to resize figure as a fork or a join
+ *
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart#getPrimaryDragEditPolicy()
+ * @return EditPolicy
+ * @generated NOT
+ */
+ @Override
+ public EditPolicy getPrimaryDragEditPolicy() {
+ return new ForkJoinResizeEditPolicy();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ForkNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ForkNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ case ForkNodeFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof ForkNodeFloatingNameEditPart) {
+ BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else if (borderItemEditPart instanceof ForkNodeAppliedStereotypeEditPart) {
+ IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "ForkNode";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ForkNodeFloatingNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ForkNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ForkNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ForkNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("ForkNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ForkNodeFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ForkNodeFloatingNameEditPart.java
new file mode 100644
index 00000000000..2f249746435
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ForkNodeFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 ForkNodeFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6038;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(ForkNodeFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ForkNodeFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(ForkNodeFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InitialNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InitialNodeEditPart.java
index 7f3f7f96ad6..70ffaa8cce3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InitialNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InitialNodeEditPart.java
@@ -1,1166 +1,1153 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-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.handles.MoveHandle;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.internal.figures.CircleFigure;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.InitialNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ResizableSquareEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.InitialNode;
-import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class InitialNodeEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3004;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public InitialNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * Return the edit policy so that the figure stays a square
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart#getPrimaryDragEditPolicy()
- * @return EditPolicy
- * @generated NOT
- */
- @Override
- public EditPolicy getPrimaryDragEditPolicy() {
- return new ResizableSquareEditPolicy();
- }
-
- /**
- * 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InitialNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- /*
- * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
- * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
- */
- if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
- Object notifier = event.getNotifier();
- List<?> modelChildren = ((View) getModel()).getChildren();
- if (!(notifier instanceof Edge)) {
- if (modelChildren.contains(event.getNotifier())) {
- return;
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case InitialNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new BorderItemSelectionEditPolicy() {
-
- @Override
- protected List createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
- };
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new InitialNode();
- }
-
- /**
- * @generated
- */
- @Override
- public InitialNode getPrimaryShape() {
- return (InitialNode) primaryShape;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof InitialNodeAppliedStereotypeEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated NOT use a circle figure instead
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new CircleFigure(((Bounds) ((Node) getNotationView()).getLayoutConstraint()).getWidth(), ((Bounds) ((Node) getNotationView()).getLayoutConstraint()).getHeight());
- return result;
- }
-
- /**
- * 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
- */
- @Override
- protected IFigure setupContentPane(IFigure nodeShape) {
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(InitialNodeAppliedStereotypeEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("InitialNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("InitialNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("InitialNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("InitialNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+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.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.internal.figures.CircleFigure;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.InitialNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class InitialNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3004;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public InitialNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InitialNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case InitialNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof InitialNodeAppliedStereotypeEditPart) {
+ IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated NOT use a circle figure instead
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new CircleFigure(((Bounds) ((Node) getNotationView()).getLayoutConstraint()).getWidth(), ((Bounds) ((Node) getNotationView()).getLayoutConstraint()).getHeight());
+ return result;
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(InitialNodeFloatingNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("InitialNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("InitialNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("InitialNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("InitialNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InitialNodeFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InitialNodeFloatingNameEditPart.java
new file mode 100644
index 00000000000..7676774dc18
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InitialNodeFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 InitialNodeFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6034;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(InitialNodeFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public InitialNodeFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(InitialNodeFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InterruptibleActivityRegionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InterruptibleActivityRegionEditPart.java
index 9b1823ad83e..a609307cdc0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InterruptibleActivityRegionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/InterruptibleActivityRegionEditPart.java
@@ -1,310 +1,310 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.InterruptibleActivityRegionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.figures.InterruptibleActivityRegionFigure;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class InterruptibleActivityRegionEditPart extends NodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3068;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public InterruptibleActivityRegionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterruptibleActivityRegionItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- 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);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new InterruptibleActivityRegionFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public InterruptibleActivityRegionFigure getPrimaryShape() {
- return (InterruptibleActivityRegionFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "InterruptibleActivityRegion";
- 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));
- 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
- */
- @Override
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated NOT avoid class cast exception by implementing this method
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.part.RoundedUMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.InterruptibleActivityRegionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.figures.InterruptibleActivityRegionFigure;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class InterruptibleActivityRegionEditPart extends RoundedUMLNodeEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3068;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public InterruptibleActivityRegionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterruptibleActivityRegionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ 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);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new InterruptibleActivityRegionFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public InterruptibleActivityRegionFigure getPrimaryShape() {
+ return (InterruptibleActivityRegionFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "InterruptibleActivityRegion";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createNodeFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated NOT avoid class cast exception by implementing this method
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("InterruptibleActivityRegion", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/JoinNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/JoinNodeEditPart.java
index c147eebd551..a73a3a6cd92 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/JoinNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/JoinNodeEditPart.java
@@ -1,1173 +1,1173 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-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.handles.MoveHandle;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ForkJoinResizeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.JoinNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ForkNode;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class JoinNodeEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3041;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public JoinNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * Return the edit policy to resize figure as a fork or a join
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart#getPrimaryDragEditPolicy()
- * @return EditPolicy
- * @generated NOT
- */
- @Override
- public EditPolicy getPrimaryDragEditPolicy() {
- return new ForkJoinResizeEditPolicy();
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new JoinNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- /*
- * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
- * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
- */
- if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
- Object notifier = event.getNotifier();
- List<?> modelChildren = ((View) getModel()).getChildren();
- if (!(notifier instanceof Edge)) {
- if (modelChildren.contains(event.getNotifier())) {
- return;
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case JoinSpecEditPart.VISUAL_ID:
- case JoinNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new BorderItemSelectionEditPolicy() {
-
- @Override
- protected List createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
- };
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ForkNode();
- }
-
- /**
- * @generated
- */
- @Override
- public ForkNode getPrimaryShape() {
- return (ForkNode) primaryShape;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof JoinSpecEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof JoinNodeAppliedStereotypeEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "JoinNode";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- protected IFigure setupContentPane(IFigure nodeShape) {
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(JoinSpecEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("JoinNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("JoinNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("JoinNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("JoinNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+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.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ForkJoinResizeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.JoinNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class JoinNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3041;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public JoinNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Return the edit policy to resize figure as a fork or a join
+ *
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart#getPrimaryDragEditPolicy()
+ * @return EditPolicy
+ * @generated NOT
+ */
+ @Override
+ public EditPolicy getPrimaryDragEditPolicy() {
+ return new ForkJoinResizeEditPolicy();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new JoinNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case JoinSpecEditPart.VISUAL_ID:
+ case JoinNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof JoinSpecEditPart) {
+ IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else if (borderItemEditPart instanceof JoinNodeAppliedStereotypeEditPart) {
+ IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "JoinNode";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(JoinNodeFloatingNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("JoinNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("JoinNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("JoinNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("JoinNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/JoinNodeFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/JoinNodeFloatingNameEditPart.java
new file mode 100644
index 00000000000..9d485fd0132
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/JoinNodeFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 JoinNodeFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6039;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(JoinNodeFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public JoinNodeFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(JoinNodeFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/LoopNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/LoopNodeEditPart.java
index c7c29ef254a..5397f20366d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/LoopNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/LoopNodeEditPart.java
@@ -1,1520 +1,1520 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.BorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.LoopNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class LoopNodeEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3071;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public LoopNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new LoopNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.LoopNodeCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID:
- case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID:
- case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID:
- case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new StructuredActivityNodeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public StructuredActivityNodeFigure getPrimaryShape() {
- return (StructuredActivityNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof LoopNodeKeywordEditPart) {
- ((LoopNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- if (childEditPart instanceof LoopNodeStructuredActivityNodeContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((LoopNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInLoopNodeAsVariableEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- if (childEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.EAST);
- getBorderedFigure().getBorderItemContainer().add(((OutputPinInLoopNodeAsResultEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- if (childEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.EAST);
- getBorderedFigure().getBorderItemContainer().add(((OutputPinInLoopNodeAsBodyOutputEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- if (childEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.EAST);
- getBorderedFigure().getBorderItemContainer().add(((OutputPinInLoopNodeAsLoopVariableEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof LoopNodeKeywordEditPart) {
- return true;
- }
- if (childEditPart instanceof LoopNodeStructuredActivityNodeContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
- pane.remove(((LoopNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInLoopNodeAsVariableEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((OutputPinInLoopNodeAsResultEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((OutputPinInLoopNodeAsBodyOutputEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((OutputPinInLoopNodeAsLoopVariableEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof LoopNodeStructuredActivityNodeContentCompartmentEditPart) {
- return getPrimaryShape().getStructuredActivityNodeCompartment();
- }
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "LoopNode";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(LoopNodeKeywordEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.BorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.LoopNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class LoopNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3071;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public LoopNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new LoopNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.LoopNodeCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID:
+ case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID:
+ case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID:
+ case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new StructuredActivityNodeFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public StructuredActivityNodeFigure getPrimaryShape() {
+ return (StructuredActivityNodeFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof LoopNodeKeywordEditPart) {
+ ((LoopNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof LoopNodeStructuredActivityNodeContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((LoopNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInLoopNodeAsVariableEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.EAST);
+ getBorderedFigure().getBorderItemContainer().add(((OutputPinInLoopNodeAsResultEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.EAST);
+ getBorderedFigure().getBorderItemContainer().add(((OutputPinInLoopNodeAsBodyOutputEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.EAST);
+ getBorderedFigure().getBorderItemContainer().add(((OutputPinInLoopNodeAsLoopVariableEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof LoopNodeKeywordEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof LoopNodeStructuredActivityNodeContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
+ pane.remove(((LoopNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInLoopNodeAsVariableEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((OutputPinInLoopNodeAsResultEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((OutputPinInLoopNodeAsBodyOutputEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((OutputPinInLoopNodeAsLoopVariableEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof LoopNodeStructuredActivityNodeContentCompartmentEditPart) {
+ return getPrimaryShape().getStructuredActivityNodeCompartment();
+ }
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "LoopNode";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(LoopNodeKeywordEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("LoopNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/MergeNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/MergeNodeEditPart.java
index 38551aaaace..ef93a666e90 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/MergeNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/MergeNodeEditPart.java
@@ -1,1150 +1,1150 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-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.handles.MoveHandle;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-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.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.MergeNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.DiamondNode;
-import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class MergeNodeEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3039;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public MergeNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new MergeNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- /*
- * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
- * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
- */
- if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
- Object notifier = event.getNotifier();
- List<?> modelChildren = ((View) getModel()).getChildren();
- if (!(notifier instanceof Edge)) {
- if (modelChildren.contains(event.getNotifier())) {
- return;
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case MergeNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new BorderItemSelectionEditPolicy() {
-
- @Override
- protected List createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
- };
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new DiamondNode();
- }
-
- /**
- * @generated
- */
- @Override
- public DiamondNode getPrimaryShape() {
- return (DiamondNode) primaryShape;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof MergeNodeAppliedStereotypeEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated NOT use a diamond figure instead
- */
- @Override
- protected NodeFigure createNodePlate() {
- NodeFigure result = new org.eclipse.gmf.runtime.gef.ui.internal.figures.DiamondFigure(new Dimension(20, 30));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- protected IFigure setupContentPane(IFigure nodeShape) {
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(MergeNodeAppliedStereotypeEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("MergeNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("MergeNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("MergeNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("MergeNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+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.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+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.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.MergeNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class MergeNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3039;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public MergeNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new MergeNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case MergeNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof MergeNodeAppliedStereotypeEditPart) {
+ IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated NOT use a diamond figure instead
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ NodeFigure result = new org.eclipse.gmf.runtime.gef.ui.internal.figures.DiamondFigure(new Dimension(20, 30));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(MergeNodeFloatingNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("MergeNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("MergeNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("MergeNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("MergeNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/MergeNodeFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/MergeNodeFloatingNameEditPart.java
new file mode 100644
index 00000000000..33a0d5d3852
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/MergeNodeFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 MergeNodeFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6037;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(MergeNodeFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public MergeNodeFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(MergeNodeFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionEditPart.java
index 176c4cfa316..a08051f2e2e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionEditPart.java
@@ -1,1518 +1,1518 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionObjectFlowWithPinsCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class OpaqueActionEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3007;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public OpaqueActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new OpaqueActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new OpaqueActionObjectFlowWithPinsCreationEditPolicy());
- installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case ValuePinInOpaqueActEditPart.VISUAL_ID:
- case ActionInputPinInOpaqueActEditPart.VISUAL_ID:
- case InputPinInOpaqueActEditPart.VISUAL_ID:
- case OutputPinInOpaqueActEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new PapyrusRoundedNodeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public PapyrusRoundedNodeFigure getPrimaryShape() {
- return (PapyrusRoundedNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof OpaqueActionNameEditPart) {
- ((OpaqueActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ValuePinInOpaqueActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((ValuePinInOpaqueActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInOpaqueActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInOpaqueActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInOpaqueActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof OutputPinInOpaqueActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST);
- getBorderedFigure().getBorderItemContainer().add(((OutputPinInOpaqueActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof OpaqueActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ValuePinInOpaqueActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ValuePinInOpaqueActEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInOpaqueActEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof InputPinInOpaqueActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInOpaqueActEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof OutputPinInOpaqueActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((OutputPinInOpaqueActEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "OpaqueAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(OpaqueActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionObjectFlowWithPinsCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class OpaqueActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3007;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public OpaqueActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new OpaqueActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpaqueActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new OpaqueActionObjectFlowWithPinsCreationEditPolicy());
+ installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ValuePinInOpaqueActEditPart.VISUAL_ID:
+ case ActionInputPinInOpaqueActEditPart.VISUAL_ID:
+ case InputPinInOpaqueActEditPart.VISUAL_ID:
+ case OutputPinInOpaqueActEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof OpaqueActionNameEditPart) {
+ ((OpaqueActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ValuePinInOpaqueActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((ValuePinInOpaqueActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInOpaqueActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInOpaqueActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInOpaqueActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof OutputPinInOpaqueActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST);
+ getBorderedFigure().getBorderItemContainer().add(((OutputPinInOpaqueActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof OpaqueActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ValuePinInOpaqueActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ValuePinInOpaqueActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInOpaqueActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof InputPinInOpaqueActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInOpaqueActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInOpaqueActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((OutputPinInOpaqueActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "OpaqueAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(OpaqueActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("OpaqueAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..d8e52c44259
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/OpaqueActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 OpaqueActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6028;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(OpaqueActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public OpaqueActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(OpaqueActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionEditPart.java
index e6c35510ce3..cdeab4598de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionEditPart.java
@@ -1,1474 +1,1474 @@
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ReadSelfActionEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3081;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ReadSelfActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReadSelfActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ReadSelfActionCanonicalEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case ReadSelfActionOutputPinEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new PapyrusRoundedNodeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public PapyrusRoundedNodeFigure getPrimaryShape() {
- return (PapyrusRoundedNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ReadSelfActionNameEditPart) {
- ((ReadSelfActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ReadSelfActionOutputPinEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST);
- getBorderedFigure().getBorderItemContainer().add(((ReadSelfActionOutputPinEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ReadSelfActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ReadSelfActionOutputPinEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ReadSelfActionOutputPinEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "ReadSelfAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ReadSelfActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ReadSelfActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3081;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ReadSelfActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReadSelfActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadSelfActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ReadSelfActionCanonicalEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ReadSelfActionOutputPinEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ReadSelfActionNameEditPart) {
+ ((ReadSelfActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST);
+ getBorderedFigure().getBorderItemContainer().add(((ReadSelfActionOutputPinEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ReadSelfActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ReadSelfActionOutputPinEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "ReadSelfAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ReadSelfActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("ReadSelfAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..264c11f458a
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadSelfActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 ReadSelfActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6025;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(ReadSelfActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ReadSelfActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(ReadSelfActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionEditPart.java
index 763ef4064e5..9bee5bfa948 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionEditPart.java
@@ -1,1535 +1,1535 @@
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.transaction.RollbackException;
-import org.eclipse.emf.transaction.Transaction;
-import org.eclipse.emf.transaction.TransactionalCommandStack;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.StructuralFeature;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ReadStructuralFeatureActionEditPart extends AbstractBorderedShapeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3088;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ReadStructuralFeatureActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReadStructuralFeatureActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ReadStructuralFeatureActionCanonicalEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID:
- case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new PapyrusRoundedNodeFigure();
- }
-
- /**
- * @generated
- */
- public PapyrusRoundedNodeFigure getPrimaryShape() {
- return (PapyrusRoundedNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ReadStructuralFeatureActionNameEditPart) {
- ((ReadStructuralFeatureActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInReadStructuralFeatureAsObjectEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.SOUTH);
- getBorderedFigure().getBorderItemContainer().add(((OutputPinInReadStructuralFeatureAsResultEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ReadStructuralFeatureActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInReadStructuralFeatureAsObjectEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((OutputPinInReadStructuralFeatureAsResultEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "ReadStructuralFeatureAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ReadStructuralFeatureActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification)
- *
- * @param notification
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
- Object feature = notification.getFeature();
- if (UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__STRUCTURAL_FEATURE.equals(feature)) {
- final Object result = this.resolveSemanticElement().eGet(UMLPackage.Literals.READ_STRUCTURAL_FEATURE_ACTION__RESULT);
- final Object object = this.resolveSemanticElement().eGet(UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__OBJECT);
- Object _feature = notification.getNewValue();
- if (_feature instanceof StructuralFeature) {
- org.eclipse.emf.common.command.Command cmdSetResultType = null;
- org.eclipse.emf.common.command.Command cmdSetObjectType = null;
- StructuralFeature newFeature = (StructuralFeature) _feature;
- Type type = newFeature.getType();
- if (type != null) {
- cmdSetResultType = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type);
- }
- Element owner = newFeature.getOwner();
- if (owner != null) {
- cmdSetObjectType = SetCommand.create(getEditingDomain(), object, UMLPackage.Literals.TYPED_ELEMENT__TYPE, owner);
- }
- try {
- if (cmdSetResultType != null) {
- if (cmdSetResultType.canExecute()) {
- CommandStack commandStack = getEditingDomain().getCommandStack();
- if (commandStack instanceof TransactionalCommandStack) {
- ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
- } else {
- commandStack.execute(cmdSetResultType);
- }
- }
- }
- if (cmdSetObjectType != null) {
- if (cmdSetObjectType.canExecute()) {
- CommandStack commandStack = getEditingDomain().getCommandStack();
- if (commandStack instanceof TransactionalCommandStack) {
- ((TransactionalCommandStack) commandStack).execute(cmdSetObjectType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
- } else {
- commandStack.execute(cmdSetObjectType);
- }
- }
- }
- } catch (InterruptedException e) {
- e.printStackTrace();
- } catch (RollbackException e) {
- e.printStackTrace();
- }
- }
- }
- }
-}
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.RollbackException;
+import org.eclipse.emf.transaction.Transaction;
+import org.eclipse.emf.transaction.TransactionalCommandStack;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.StructuralFeature;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ReadStructuralFeatureActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3088;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ReadStructuralFeatureActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReadStructuralFeatureActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadStructuralFeatureActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ReadStructuralFeatureActionCanonicalEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID:
+ case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ReadStructuralFeatureActionNameEditPart) {
+ ((ReadStructuralFeatureActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInReadStructuralFeatureAsObjectEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ getBorderedFigure().getBorderItemContainer().add(((OutputPinInReadStructuralFeatureAsResultEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ReadStructuralFeatureActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInReadStructuralFeatureAsObjectEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((OutputPinInReadStructuralFeatureAsResultEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "ReadStructuralFeatureAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ReadStructuralFeatureActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("ReadStructuralFeatureAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification)
+ *
+ * @param notification
+ */
+ @Override
+ protected void handleNotificationEvent(Notification notification) {
+ super.handleNotificationEvent(notification);
+ Object feature = notification.getFeature();
+ if (UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__STRUCTURAL_FEATURE.equals(feature)) {
+ final Object result = this.resolveSemanticElement().eGet(UMLPackage.Literals.READ_STRUCTURAL_FEATURE_ACTION__RESULT);
+ final Object object = this.resolveSemanticElement().eGet(UMLPackage.Literals.STRUCTURAL_FEATURE_ACTION__OBJECT);
+ Object _feature = notification.getNewValue();
+ if (_feature instanceof StructuralFeature) {
+ org.eclipse.emf.common.command.Command cmdSetResultType = null;
+ org.eclipse.emf.common.command.Command cmdSetObjectType = null;
+ StructuralFeature newFeature = (StructuralFeature) _feature;
+ Type type = newFeature.getType();
+ if (type != null) {
+ cmdSetResultType = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type);
+ }
+ Element owner = newFeature.getOwner();
+ if (owner != null) {
+ cmdSetObjectType = SetCommand.create(getEditingDomain(), object, UMLPackage.Literals.TYPED_ELEMENT__TYPE, owner);
+ }
+ try {
+ if (cmdSetResultType != null) {
+ if (cmdSetResultType.canExecute()) {
+ CommandStack commandStack = getEditingDomain().getCommandStack();
+ if (commandStack instanceof TransactionalCommandStack) {
+ ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
+ } else {
+ commandStack.execute(cmdSetResultType);
+ }
+ }
+ }
+ if (cmdSetObjectType != null) {
+ if (cmdSetObjectType.canExecute()) {
+ CommandStack commandStack = getEditingDomain().getCommandStack();
+ if (commandStack instanceof TransactionalCommandStack) {
+ ((TransactionalCommandStack) commandStack).execute(cmdSetObjectType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
+ } else {
+ commandStack.execute(cmdSetObjectType);
+ }
+ }
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } catch (RollbackException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..a4179afdb16
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadStructuralFeatureActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 ReadStructuralFeatureActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6023;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(ReadStructuralFeatureActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ReadStructuralFeatureActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(ReadStructuralFeatureActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionEditPart.java
index 4338228eec0..1f50484e4ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionEditPart.java
@@ -1,1507 +1,1507 @@
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.transaction.RollbackException;
-import org.eclipse.emf.transaction.Transaction;
-import org.eclipse.emf.transaction.TransactionalCommandStack;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.Variable;
-
-/**
- * @generated
- */
-public class ReadVariableActionEditPart extends AbstractBorderedShapeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3097;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ReadVariableActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReadVariableActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ReadVariableActionCanonicalEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- protected IFigure createNodeShape() {
- return primaryShape = new PapyrusRoundedNodeFigure();
- }
-
- /**
- * @generated
- */
- public PapyrusRoundedNodeFigure getPrimaryShape() {
- return (PapyrusRoundedNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ReadVariableActionNameEditPart) {
- ((ReadVariableActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NONE);
- getBorderedFigure().getBorderItemContainer().add(((OutputPinInReadVariableActionAsResultEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ReadVariableActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((OutputPinInReadVariableActionAsResultEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- protected NodeFigure createNodePlate() {
- String prefElementId = "ReadVariableAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- protected IFigure setupContentPane(IFigure nodeShape) {
- if (nodeShape.getLayoutManager() == null) {
- ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
- layout.setSpacing(5);
- nodeShape.setLayoutManager(layout);
- }
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ReadVariableActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-
- /**
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification)
- * Set the Outpu Pin type from the variable type
- * @param notification
- */
- @Override
- protected void handleNotificationEvent(Notification notification) {
- super.handleNotificationEvent(notification);
- Object feature = notification.getFeature();
- if (UMLPackage.Literals.VARIABLE_ACTION__VARIABLE.equals(feature)) {
- final Object result = this.resolveSemanticElement().eGet(UMLPackage.Literals.READ_VARIABLE_ACTION__RESULT);
- Object _varaible = notification.getNewValue();
- if (_varaible instanceof Variable) {
- org.eclipse.emf.common.command.Command cmdSetResultType = null;
- Variable newVariable = (Variable) _varaible;
- Type type = newVariable.getType();
- if (type != null) {
- cmdSetResultType = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type);
- }
- try {
- if (cmdSetResultType != null) {
- if (cmdSetResultType.canExecute()) {
- CommandStack commandStack = getEditingDomain().getCommandStack();
- if (commandStack instanceof TransactionalCommandStack) {
- ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
- } else {
- commandStack.execute(cmdSetResultType);
- }
- }
- }
- } catch (InterruptedException e) {
- e.printStackTrace();
- } catch (RollbackException e) {
- e.printStackTrace();
- }
- }
- }
- }
-}
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.RollbackException;
+import org.eclipse.emf.transaction.Transaction;
+import org.eclipse.emf.transaction.TransactionalCommandStack;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.Variable;
+
+/**
+ * @generated
+ */
+public class ReadVariableActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3097;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ReadVariableActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ReadVariableActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ReadVariableActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ReadVariableActionCanonicalEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ReadVariableActionNameEditPart) {
+ ((ReadVariableActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NONE);
+ getBorderedFigure().getBorderItemContainer().add(((OutputPinInReadVariableActionAsResultEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ReadVariableActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((OutputPinInReadVariableActionAsResultEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "ReadVariableAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if (nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ReadVariableActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("ReadVariableAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#handleNotificationEvent(org.eclipse.emf.common.notify.Notification)
+ * Set the Outpu Pin type from the variable type
+ * @param notification
+ */
+ @Override
+ protected void handleNotificationEvent(Notification notification) {
+ super.handleNotificationEvent(notification);
+ Object feature = notification.getFeature();
+ if (UMLPackage.Literals.VARIABLE_ACTION__VARIABLE.equals(feature)) {
+ final Object result = this.resolveSemanticElement().eGet(UMLPackage.Literals.READ_VARIABLE_ACTION__RESULT);
+ Object _varaible = notification.getNewValue();
+ if (_varaible instanceof Variable) {
+ org.eclipse.emf.common.command.Command cmdSetResultType = null;
+ Variable newVariable = (Variable) _varaible;
+ Type type = newVariable.getType();
+ if (type != null) {
+ cmdSetResultType = SetCommand.create(getEditingDomain(), result, UMLPackage.Literals.TYPED_ELEMENT__TYPE, type);
+ }
+ try {
+ if (cmdSetResultType != null) {
+ if (cmdSetResultType.canExecute()) {
+ CommandStack commandStack = getEditingDomain().getCommandStack();
+ if (commandStack instanceof TransactionalCommandStack) {
+ ((TransactionalCommandStack) commandStack).execute(cmdSetResultType, Collections.singletonMap(Transaction.OPTION_UNPROTECTED, Boolean.TRUE));
+ } else {
+ commandStack.execute(cmdSetResultType);
+ }
+ }
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } catch (RollbackException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..2289fabbb4e
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ReadVariableActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 ReadVariableActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6021;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(ReadVariableActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ReadVariableActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(ReadVariableActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionEditPart.java
index 573f4492877..a19fd8d57d9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionEditPart.java
@@ -1,1541 +1,1541 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class SendObjectActionEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3042;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public SendObjectActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SendObjectActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new SendObjectActionCanonicalEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case ValuePinInSendObjActAsReqEditPart.VISUAL_ID:
- case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID:
- case InputPinInSendObjActAsReqEditPart.VISUAL_ID:
- case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID:
- case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID:
- case InputPinInSendObjActAsTargetEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new PapyrusRoundedNodeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public PapyrusRoundedNodeFigure getPrimaryShape() {
- return (PapyrusRoundedNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SendObjectActionNameEditPart) {
- ((SendObjectActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((ValuePinInSendObjActAsReqEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInSendObjActAsReqEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInSendObjActAsReqEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((ValuePinInSendObjActAsTargetEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInSendObjActAsTargetEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInSendObjActAsTargetEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SendObjectActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ValuePinInSendObjActAsReqEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInSendObjActAsReqEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInSendObjActAsReqEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ValuePinInSendObjActAsTargetEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInSendObjActAsTargetEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInSendObjActAsTargetEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "SendObjectAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(SendObjectActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class SendObjectActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3042;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public SendObjectActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SendObjectActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendObjectActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new SendObjectActionCanonicalEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ValuePinInSendObjActAsReqEditPart.VISUAL_ID:
+ case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID:
+ case InputPinInSendObjActAsReqEditPart.VISUAL_ID:
+ case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID:
+ case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID:
+ case InputPinInSendObjActAsTargetEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof SendObjectActionNameEditPart) {
+ ((SendObjectActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((ValuePinInSendObjActAsReqEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInSendObjActAsReqEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInSendObjActAsReqEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((ValuePinInSendObjActAsTargetEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInSendObjActAsTargetEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInSendObjActAsTargetEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof SendObjectActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ValuePinInSendObjActAsReqEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInSendObjActAsReqEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInSendObjActAsReqEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ValuePinInSendObjActAsTargetEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInSendObjActAsTargetEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInSendObjActAsTargetEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "SendObjectAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(SendObjectActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("SendObjectAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..0125e8a0021
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendObjectActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 SendObjectActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6027;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(SendObjectActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public SendObjectActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(SendObjectActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendSignalActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendSignalActionEditPart.java
index 851d6540c38..798f0258f11 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendSignalActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendSignalActionEditPart.java
@@ -1,1538 +1,1586 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendSignalActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendSignalActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusSendNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class SendSignalActionEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3052;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public SendSignalActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SendSignalActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendSignalActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
- installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new SendSignalActionCanonicalEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case ActionInputPinInSendSigActEditPart.VISUAL_ID:
- case ValuePinInSendSigActEditPart.VISUAL_ID:
- case InputPinInSendSigActEditPart.VISUAL_ID:
- case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID:
- case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID:
- case InputPinInSendSigActAsTargetEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new PapyrusSendNodeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public PapyrusSendNodeFigure getPrimaryShape() {
- return (PapyrusSendNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SendSignalActionNameEditPart) {
- ((SendSignalActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ActionInputPinInSendSigActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInSendSigActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ValuePinInSendSigActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((ValuePinInSendSigActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInSendSigActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInSendSigActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((ValuePinInSendSigActAsTargetEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInSendSigActAsTargetEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
- getBorderedFigure().getBorderItemContainer().add(((InputPinInSendSigActAsTargetEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SendSignalActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ActionInputPinInSendSigActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInSendSigActEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ValuePinInSendSigActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ValuePinInSendSigActEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof InputPinInSendSigActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInSendSigActEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ValuePinInSendSigActAsTargetEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInSendSigActAsTargetEditPart) childEditPart).getFigure());
- return true;
- }
- if (childEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((InputPinInSendSigActAsTargetEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "SendSignalAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(SendSignalActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("SendSignalAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("SendSignalAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("SendSignalAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("SendSignalAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+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.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+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.figures.BorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendSignalActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendSignalActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class SendSignalActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3052;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public SendSignalActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SendSignalActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.SendSignalActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
+ installEditPolicy(org.eclipse.gef.RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new SendSignalActionCanonicalEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ // not generated but change include on gmfgen, can be override at the generation
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof SendSignalActionFloatingNameEditPart) {
+ BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ // not generated but change include on gmfgen, can be override at the generation
+ case SendSignalActionFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ };
+
+ case ActionInputPinInSendSigActEditPart.VISUAL_ID:
+ case ValuePinInSendSigActEditPart.VISUAL_ID:
+ case InputPinInSendSigActEditPart.VISUAL_ID:
+ case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID:
+ case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID:
+ case InputPinInSendSigActAsTargetEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof SendSignalActionNameEditPart) {
+ ((SendSignalActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInSendSigActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ValuePinInSendSigActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((ValuePinInSendSigActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInSendSigActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.WEST);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInSendSigActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((ValuePinInSendSigActAsTargetEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((ActionInputPinInSendSigActAsTargetEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.NORTH);
+ getBorderedFigure().getBorderItemContainer().add(((InputPinInSendSigActAsTargetEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof SendSignalActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInSendSigActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ValuePinInSendSigActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ValuePinInSendSigActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof InputPinInSendSigActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInSendSigActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ValuePinInSendSigActAsTargetEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((ActionInputPinInSendSigActAsTargetEditPart) childEditPart).getFigure());
+ return true;
+ }
+ if (childEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((InputPinInSendSigActAsTargetEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "SendSignalAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(SendSignalActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("SendSignalAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("SendSignalAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("SendSignalAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("SendSignalAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendSignalActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendSignalActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..a73013b08a0
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SendSignalActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 SendSignalActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6032;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(SendSignalActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public SendSignalActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(SendSignalActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SequenceNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SequenceNodeEditPart.java
index f06cd10efaa..d96077263e6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SequenceNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/SequenceNodeEditPart.java
@@ -1,1460 +1,1460 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SequenceNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-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.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class SequenceNodeEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3073;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public SequenceNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SequenceNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new StructuredActivityNodeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public StructuredActivityNodeFigure getPrimaryShape() {
- return (StructuredActivityNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SequenceNodeKeywordEditPart) {
- ((SequenceNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- if (childEditPart instanceof SequenceNodeStructuredActivityNodeContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((SequenceNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof SequenceNodeKeywordEditPart) {
- return true;
- }
- if (childEditPart instanceof SequenceNodeStructuredActivityNodeContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
- pane.remove(((SequenceNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof SequenceNodeStructuredActivityNodeContentCompartmentEditPart) {
- return getPrimaryShape().getStructuredActivityNodeCompartment();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "SequenceNode";
- 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));
- 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
- */
- @Override
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(SequenceNodeKeywordEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.SequenceNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class SequenceNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3073;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public SequenceNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SequenceNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new StructuredActivityNodeFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public StructuredActivityNodeFigure getPrimaryShape() {
+ return (StructuredActivityNodeFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof SequenceNodeKeywordEditPart) {
+ ((SequenceNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof SequenceNodeStructuredActivityNodeContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((SequenceNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof SequenceNodeKeywordEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof SequenceNodeStructuredActivityNodeContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
+ pane.remove(((SequenceNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof SequenceNodeStructuredActivityNodeContentCompartmentEditPart) {
+ return getPrimaryShape().getStructuredActivityNodeCompartment();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "SequenceNode";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createNodeFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(SequenceNodeKeywordEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("SequenceNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/StructuredActivityNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/StructuredActivityNodeEditPart.java
index c8256b0524c..84ce65224ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/StructuredActivityNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/StructuredActivityNodeEditPart.java
@@ -1,1460 +1,1460 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.StructuredActivityNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
-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.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class StructuredActivityNodeEditPart extends UMLNodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3065;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public StructuredActivityNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StructuredActivityNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new StructuredActivityNodeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public StructuredActivityNodeFigure getPrimaryShape() {
- return (StructuredActivityNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof StructuredActivityNodeKeywordEditPart) {
- ((StructuredActivityNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- if (childEditPart instanceof StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof StructuredActivityNodeKeywordEditPart) {
- return true;
- }
- if (childEditPart instanceof StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
- pane.remove(((StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) {
- return getPrimaryShape().getStructuredActivityNodeCompartment();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "StructuredActivityNode";
- 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));
- 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
- */
- @Override
- protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(StructuredActivityNodeKeywordEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.draw2d.StructuredActivityNodeFigure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.StructuredActivityNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class StructuredActivityNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3065;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public StructuredActivityNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StructuredActivityNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new StructuredActivityNodeFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public StructuredActivityNodeFigure getPrimaryShape() {
+ return (StructuredActivityNodeFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof StructuredActivityNodeKeywordEditPart) {
+ ((StructuredActivityNodeKeywordEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof StructuredActivityNodeKeywordEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getStructuredActivityNodeCompartment();
+ pane.remove(((StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart) {
+ return getPrimaryShape().getStructuredActivityNodeCompartment();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "StructuredActivityNode";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createNodeFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(StructuredActivityNodeKeywordEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("StructuredActivityNode", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/UMLEditPartFactory.java
index ba88ad60a4f..63f85d321e8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/UMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/UMLEditPartFactory.java
@@ -1,722 +1,792 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPartFactory;
-import org.eclipse.gef.tools.CellEditorLocator;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.directedit.locator.LabelCellEditorLocator;
-import org.eclipse.gmf.tooling.runtime.directedit.locator.TextCellEditorLocator;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @generated
- */
-public class UMLEditPartFactory implements EditPartFactory {
-
- /**
- * @generated
- */
- @Override
- public EditPart createEditPart(EditPart context, Object model) {
- if (model instanceof View) {
- View view = (View) model;
- switch (UMLVisualIDRegistry.getVisualID(view)) {
- case ActivityDiagramEditPart.VISUAL_ID:
- return new ActivityDiagramEditPart(view);
- case ActivityEditPart.VISUAL_ID:
- return new ActivityEditPart(view);
- case ActivityNameEditPart.VISUAL_ID:
- return new ActivityNameEditPart(view);
- case ActivityIsSingleExecutionEditPart.VISUAL_ID:
- return new ActivityIsSingleExecutionEditPart(view);
- case ParameterEditPart.VISUAL_ID:
- return new ParameterEditPart(view);
- case ConstraintInActivityAsPrecondEditPart.VISUAL_ID:
- return new ConstraintInActivityAsPrecondEditPart(view);
- case ConstraintInActivityAsPostcondEditPart.VISUAL_ID:
- return new ConstraintInActivityAsPostcondEditPart(view);
- case InitialNodeEditPart.VISUAL_ID:
- return new InitialNodeEditPart(view);
- case InitialNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new InitialNodeAppliedStereotypeEditPart(view);
- case ActivityFinalNodeEditPart.VISUAL_ID:
- return new ActivityFinalNodeEditPart(view);
- case ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new ActivityFinalNodeAppliedStereotypeEditPart(view);
- case FlowFinalNodeEditPart.VISUAL_ID:
- return new FlowFinalNodeEditPart(view);
- case FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new FlowFinalNodeAppliedStereotypeEditPart(view);
- case OpaqueActionEditPart.VISUAL_ID:
- return new OpaqueActionEditPart(view);
- case OpaqueActionNameEditPart.VISUAL_ID:
- return new OpaqueActionNameEditPart(view);
- case ValuePinInOpaqueActEditPart.VISUAL_ID:
- return new ValuePinInOpaqueActEditPart(view);
- case ValuePinInOActLabelEditPart.VISUAL_ID:
- return new ValuePinInOActLabelEditPart(view);
- case ValuePinInOActValueEditPart.VISUAL_ID:
- return new ValuePinInOActValueEditPart(view);
- case ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID:
- return new ValuePinInOActAppliedStereotypeEditPart(view);
- case ActionInputPinInOpaqueActEditPart.VISUAL_ID:
- return new ActionInputPinInOpaqueActEditPart(view);
- case ActionInputPinInOActLabelEditPart.VISUAL_ID:
- return new ActionInputPinInOActLabelEditPart(view);
- case ActionInputPinInOActValueEditPart.VISUAL_ID:
- return new ActionInputPinInOActValueEditPart(view);
- case ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID:
- return new ActionInputPinInOActAppliedStereotypeEditPart(view);
- case InputPinInOpaqueActEditPart.VISUAL_ID:
- return new InputPinInOpaqueActEditPart(view);
- case InputPinInOActLabelEditPart.VISUAL_ID:
- return new InputPinInOActLabelEditPart(view);
- case InputPinInOActAppliedStereotypeEditPart.VISUAL_ID:
- return new InputPinInOActAppliedStereotypeEditPart(view);
- case OutputPinInOpaqueActEditPart.VISUAL_ID:
- return new OutputPinInOpaqueActEditPart(view);
- case OutputPinInOActLabelEditPart.VISUAL_ID:
- return new OutputPinInOActLabelEditPart(view);
- case OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID:
- return new OutputPinInOActAppliedStereotypeEditPart(view);
- case CallBehaviorActionEditPart.VISUAL_ID:
- return new CallBehaviorActionEditPart(view);
- case CallBehaviorActionNameEditPart.VISUAL_ID:
- return new CallBehaviorActionNameEditPart(view);
- case ValuePinInCallBeActEditPart.VISUAL_ID:
- return new ValuePinInCallBeActEditPart(view);
- case ValuePinInCBActLabelEditPart.VISUAL_ID:
- return new ValuePinInCBActLabelEditPart(view);
- case ValuePinInCBActValueEditPart.VISUAL_ID:
- return new ValuePinInCBActValueEditPart(view);
- case ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID:
- return new ValuePinInCBActAppliedStereotypeEditPart(view);
- case ActionInputPinInCallBeActEditPart.VISUAL_ID:
- return new ActionInputPinInCallBeActEditPart(view);
- case ActionInputPinInCBActLabelEditPart.VISUAL_ID:
- return new ActionInputPinInCBActLabelEditPart(view);
- case ActionInputPinInCBActValueEditPart.VISUAL_ID:
- return new ActionInputPinInCBActValueEditPart(view);
- case ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID:
- return new ActionInputPinInCBActAppliedStereotypeEditPart(view);
- case InputPinInCallBeActEditPart.VISUAL_ID:
- return new InputPinInCallBeActEditPart(view);
- case InputPinInCBActLabelEditPart.VISUAL_ID:
- return new InputPinInCBActLabelEditPart(view);
- case InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID:
- return new InputPinInCBActAppliedStereotypeEditPart(view);
- case OutputPinInCallBeActEditPart.VISUAL_ID:
- return new OutputPinInCallBeActEditPart(view);
- case OutputPinInCBActLabelEditPart.VISUAL_ID:
- return new OutputPinInCBActLabelEditPart(view);
- case OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID:
- return new OutputPinInCBActAppliedStereotypeEditPart(view);
- case CallOperationActionEditPart.VISUAL_ID:
- return new CallOperationActionEditPart(view);
- case CallOperationActionNameEditPart.VISUAL_ID:
- return new CallOperationActionNameEditPart(view);
- case ActionInputPinInCallOpActEditPart.VISUAL_ID:
- return new ActionInputPinInCallOpActEditPart(view);
- case ActionInputPinInCOActLabelEditPart.VISUAL_ID:
- return new ActionInputPinInCOActLabelEditPart(view);
- case ActionInputPinInCOActValueEditPart.VISUAL_ID:
- return new ActionInputPinInCOActValueEditPart(view);
- case ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID:
- return new ActionInputPinInCOActAppliedStereotypeEditPart(view);
- case ValuePinInCallOpActEditPart.VISUAL_ID:
- return new ValuePinInCallOpActEditPart(view);
- case ValuePinInCOActLabelEditPart.VISUAL_ID:
- return new ValuePinInCOActLabelEditPart(view);
- case ValuePinInCOActValueEditPart.VISUAL_ID:
- return new ValuePinInCOActValueEditPart(view);
- case ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID:
- return new ValuePinInCOActAppliedStereotypeEditPart(view);
- case InputPinInCallOpActEditPart.VISUAL_ID:
- return new InputPinInCallOpActEditPart(view);
- case InputPinInCOActLabelEditPart.VISUAL_ID:
- return new InputPinInCOActLabelEditPart(view);
- case InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID:
- return new InputPinInCOActAppliedStereotypeEditPart(view);
- case OutputPinInCallOpActEditPart.VISUAL_ID:
- return new OutputPinInCallOpActEditPart(view);
- case OutputPinInCOActLabelEditPart.VISUAL_ID:
- return new OutputPinInCOActLabelEditPart(view);
- case OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID:
- return new OutputPinInCOActAppliedStereotypeEditPart(view);
- case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID:
- return new ValuePinInCallOpActAsTargetEditPart(view);
- case ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID:
- return new ValuePinInCOActAsTargetLabelEditPart(view);
- case ValuePinInCOActAsTargetValueEditPart.VISUAL_ID:
- return new ValuePinInCOActAsTargetValueEditPart(view);
- case ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return new ValuePinInCOActAsTargetAppliedStereotypeEditPart(view);
- case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID:
- return new ActionInputPinInCallOpActAsTargetEditPart(view);
- case ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID:
- return new ActionInputPinInCOActAsTargetLabelEditPart(view);
- case ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID:
- return new ActionInputPinInCOActAsTargetValueEditPart(view);
- case ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return new ActionInputPinInCOActAsTargetAppliedStereotypeEditPart(view);
- case InputPinInCallOpActAsTargetEditPart.VISUAL_ID:
- return new InputPinInCallOpActAsTargetEditPart(view);
- case InputPinInCOActAsTargetLabelEditPart.VISUAL_ID:
- return new InputPinInCOActAsTargetLabelEditPart(view);
- case InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return new InputPinInCOActAsTargetAppliedStereotypeEditPart(view);
- case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID:
- return new DurationConstraintAsLocalPrecondEditPart(view);
- case DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
- return new DurationConstraintAsLocalPrecondNameEditPart(view);
- case DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
- return new DurationConstraintAsLocalPrecondBodyEditPart(view);
- case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID:
- return new DurationConstraintAsLocalPostcondEditPart(view);
- case DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
- return new DurationConstraintAsLocalPostcondNameEditPart(view);
- case DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
- return new DurationConstraintAsLocalPostcondBodyEditPart(view);
- case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID:
- return new TimeConstraintAsLocalPrecondEditPart(view);
- case TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
- return new TimeConstraintAsLocalPrecondNameEditPart(view);
- case TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
- return new TimeConstraintAsLocalPrecondBodyEditPart(view);
- case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID:
- return new TimeConstraintAsLocalPostcondEditPart(view);
- case TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
- return new TimeConstraintAsLocalPostcondNameEditPart(view);
- case TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
- return new TimeConstraintAsLocalPostcondBodyEditPart(view);
- case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID:
- return new IntervalConstraintAsLocalPrecondEditPart(view);
- case IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
- return new IntervalConstraintAsLocalPrecondNameEditPart(view);
- case IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
- return new IntervalConstraintAsLocalPrecondBodyEditPart(view);
- case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID:
- return new IntervalConstraintAsLocalPostcondEditPart(view);
- case IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
- return new IntervalConstraintAsLocalPostcondNameEditPart(view);
- case IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
- return new IntervalConstraintAsLocalPostcondBodyEditPart(view);
- case ConstraintAsLocalPrecondEditPart.VISUAL_ID:
- return new ConstraintAsLocalPrecondEditPart(view);
- case ConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
- return new ConstraintAsLocalPrecondNameEditPart(view);
- case ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
- return new ConstraintAsLocalPrecondBodyEditPart(view);
- case ConstraintAsLocalPostcondEditPart.VISUAL_ID:
- return new ConstraintAsLocalPostcondEditPart(view);
- case ConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
- return new ConstraintAsLocalPostcondNameEditPart(view);
- case ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
- return new ConstraintAsLocalPostcondBodyEditPart(view);
- case DecisionNodeEditPart.VISUAL_ID:
- return new DecisionNodeEditPart(view);
- case DecisionInputEditPart.VISUAL_ID:
- return new DecisionInputEditPart(view);
- case DecisionNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new DecisionNodeAppliedStereotypeEditPart(view);
- case MergeNodeEditPart.VISUAL_ID:
- return new MergeNodeEditPart(view);
- case MergeNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new MergeNodeAppliedStereotypeEditPart(view);
- case ForkNodeEditPart.VISUAL_ID:
- return new ForkNodeEditPart(view);
- case ForkNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new ForkNodeAppliedStereotypeEditPart(view);
- case JoinNodeEditPart.VISUAL_ID:
- return new JoinNodeEditPart(view);
- case JoinSpecEditPart.VISUAL_ID:
- return new JoinSpecEditPart(view);
- case JoinNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new JoinNodeAppliedStereotypeEditPart(view);
- case DataStoreNodeEditPart.VISUAL_ID:
- return new DataStoreNodeEditPart(view);
- case DataStoreNodeLabelEditPart.VISUAL_ID:
- return new DataStoreNodeLabelEditPart(view);
- case DataStoreSelectionEditPart.VISUAL_ID:
- return new DataStoreSelectionEditPart(view);
- case SendObjectActionEditPart.VISUAL_ID:
- return new SendObjectActionEditPart(view);
- case SendObjectActionNameEditPart.VISUAL_ID:
- return new SendObjectActionNameEditPart(view);
- case ValuePinInSendObjActAsReqEditPart.VISUAL_ID:
- return new ValuePinInSendObjActAsReqEditPart(view);
- case ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID:
- return new ValuePinInSendObjActAsReqLabelEditPart(view);
- case ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID:
- return new ValuePinInSendObjActAsReqValueEditPart(view);
- case ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID:
- return new ValuePinInSendObjActAsReqAppliedStereotypeEditPart(view);
- case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID:
- return new ActionInputPinInSendObjActAsReqEditPart(view);
- case ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID:
- return new ActionInputPinInSendObjActAsReqLabelEditPart(view);
- case ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID:
- return new ActionInputPinInSendObjActAsReqValueEditPart(view);
- case ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID:
- return new ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart(view);
- case InputPinInSendObjActAsReqEditPart.VISUAL_ID:
- return new InputPinInSendObjActAsReqEditPart(view);
- case InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID:
- return new InputPinInSendObjActAsReqLabelEditPart(view);
- case InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID:
- return new InputPinInSendObjActAsReqAppliedStereotypeEditPart(view);
- case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID:
- return new ValuePinInSendObjActAsTargetEditPart(view);
- case ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID:
- return new ValuePinInSendObjActAsTargetLabelEditPart(view);
- case ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID:
- return new ValuePinInSendObjActAsTargetValueEditPart(view);
- case ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return new ValuePinInSendObjActAsTargetAppliedStereotypeEditPart(view);
- case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID:
- return new ActionInputPinInSendObjActAsTargetEditPart(view);
- case ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID:
- return new ActionInputPinInSendObjActAsTargetLabelEditPart(view);
- case ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID:
- return new ActionInputPinInSendObjActAsTargetValueEditPart(view);
- case ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return new ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart(view);
- case InputPinInSendObjActAsTargetEditPart.VISUAL_ID:
- return new InputPinInSendObjActAsTargetEditPart(view);
- case InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID:
- return new InputPinInSendObjActAsTargetLabelEditPart(view);
- case InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return new InputPinInSendObjActAsTargetAppliedStereotypeEditPart(view);
- case SendSignalActionEditPart.VISUAL_ID:
- return new SendSignalActionEditPart(view);
- case SendSignalActionNameEditPart.VISUAL_ID:
- return new SendSignalActionNameEditPart(view);
- case ActionInputPinInSendSigActEditPart.VISUAL_ID:
- return new ActionInputPinInSendSigActEditPart(view);
- case ActionInputPinInSendSigActLabelEditPart.VISUAL_ID:
- return new ActionInputPinInSendSigActLabelEditPart(view);
- case ActionInputPinInSendSigActValueEditPart.VISUAL_ID:
- return new ActionInputPinInSendSigActValueEditPart(view);
- case ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID:
- return new ActionInputPinInSendSigActAppliedStereotypeEditPart(view);
- case ValuePinInSendSigActEditPart.VISUAL_ID:
- return new ValuePinInSendSigActEditPart(view);
- case ValuePinInSendSigActLabelEditPart.VISUAL_ID:
- return new ValuePinInSendSigActLabelEditPart(view);
- case ValuePinInSendSigActValueEditPart.VISUAL_ID:
- return new ValuePinInSendSigActValueEditPart(view);
- case ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID:
- return new ValuePinInSendSigActAppliedStereotypeEditPart(view);
- case InputPinInSendSigActEditPart.VISUAL_ID:
- return new InputPinInSendSigActEditPart(view);
- case InputPinInSendSigActLabelEditPart.VISUAL_ID:
- return new InputPinInSendSigActLabelEditPart(view);
- case InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID:
- return new InputPinInSendSigActAppliedStereotypeEditPart(view);
- case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID:
- return new ValuePinInSendSigActAsTargetEditPart(view);
- case ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID:
- return new ValuePinInSendSigActAsTargetLabelEditPart(view);
- case ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID:
- return new ValuePinInSendSigActAsTargetValueEditPart(view);
- case ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return new ValuePinInSendSigActAsTargetAppliedStereotypeEditPart(view);
- case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID:
- return new ActionInputPinInSendSigActAsTargetEditPart(view);
- case ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID:
- return new ActionInputPinInSendSigActAsTargetLabelEditPart(view);
- case ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID:
- return new ActionInputPinInSendSigActAsTargetValueEditPart(view);
- case ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return new ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart(view);
- case InputPinInSendSigActAsTargetEditPart.VISUAL_ID:
- return new InputPinInSendSigActAsTargetEditPart(view);
- case InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID:
- return new InputPinInSendSigActAsTargetLabelEditPart(view);
- case InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return new InputPinInSendSigActAsTargetAppliedStereotypeEditPart(view);
- case ActivityParameterNodeEditPart.VISUAL_ID:
- return new ActivityParameterNodeEditPart(view);
- case ParameterNodeNameEditPart.VISUAL_ID:
- return new ParameterNodeNameEditPart(view);
- case AcceptEventActionEditPart.VISUAL_ID:
- return new AcceptEventActionEditPart(view);
- case AcceptEventActionLabelEditPart.VISUAL_ID:
- return new AcceptEventActionLabelEditPart(view);
- case AcceptTimeEventActionLabelEditPart.VISUAL_ID:
- return new AcceptTimeEventActionLabelEditPart(view);
- case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID:
- return new AcceptTimeEventActionAppliedStereotypeEditPart(view);
- case OutputPinInAcceptEventActionEditPart.VISUAL_ID:
- return new OutputPinInAcceptEventActionEditPart(view);
- case OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID:
- return new OutputPinInAcceptEventActionLabelEditPart(view);
- case OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID:
- return new OutputPinInAcceptEventActionAppliedStereotypeEditPart(view);
- case ValueSpecificationActionEditPart.VISUAL_ID:
- return new ValueSpecificationActionEditPart(view);
- case ValueSpecificationActionNameEditPart.VISUAL_ID:
- return new ValueSpecificationActionNameEditPart(view);
- case OutputPinInValSpecActEditPart.VISUAL_ID:
- return new OutputPinInValSpecActEditPart(view);
- case OutputPinInValSpecActLabelEditPart.VISUAL_ID:
- return new OutputPinInValSpecActLabelEditPart(view);
- case OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID:
- return new OutputPinInValSpecActAppliedStereotypeEditPart(view);
- case ConditionalNodeEditPart.VISUAL_ID:
- return new ConditionalNodeEditPart(view);
- case ConditionalNodeKeywordEditPart.VISUAL_ID:
- return new ConditionalNodeKeywordEditPart(view);
- case ExpansionRegionEditPart.VISUAL_ID:
- return new ExpansionRegionEditPart(view);
- case ExpansionRegionKeywordEditPart.VISUAL_ID:
- return new ExpansionRegionKeywordEditPart(view);
- case ExpansionNodeAsInEditPart.VISUAL_ID:
- return new ExpansionNodeAsInEditPart(view);
- case ExpansionNodeAsOutEditPart.VISUAL_ID:
- return new ExpansionNodeAsOutEditPart(view);
- case LoopNodeEditPart.VISUAL_ID:
- return new LoopNodeEditPart(view);
- case LoopNodeKeywordEditPart.VISUAL_ID:
- return new LoopNodeKeywordEditPart(view);
- case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID:
- return new OutputPinInLoopNodeAsBodyOutputEditPart(view);
- case OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID:
- return new OutputPinInLoopNodeAsBodyOutputLabelEditPart(view);
- case OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID:
- return new OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart(view);
- case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID:
- return new OutputPinInLoopNodeAsLoopVariableEditPart(view);
- case OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID:
- return new OutputPinInLoopNodeAsLoopVariableLabelEditPart(view);
- case OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID:
- return new OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart(view);
- case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID:
- return new OutputPinInLoopNodeAsResultEditPart(view);
- case OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID:
- return new OutputPinInLoopNodeAsResultLabelEditPart(view);
- case OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID:
- return new OutputPinInLoopNodeAsResultAppliedStereotypeEditPart(view);
- case SequenceNodeEditPart.VISUAL_ID:
- return new SequenceNodeEditPart(view);
- case SequenceNodeKeywordEditPart.VISUAL_ID:
- return new SequenceNodeKeywordEditPart(view);
- case StructuredActivityNodeEditPart.VISUAL_ID:
- return new StructuredActivityNodeEditPart(view);
- case StructuredActivityNodeKeywordEditPart.VISUAL_ID:
- return new StructuredActivityNodeKeywordEditPart(view);
- case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID:
- return new InputPinInLoopNodeAsVariableEditPart(view);
- case InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID:
- return new InputPinInLoopNodeAsVariableLabelEditPart(view);
- case InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID:
- return new InputPinInStructuredActivityNodeAppliedStereotypeEditPart(view);
- case ActivityPartitionEditPart.VISUAL_ID:
- return new ActivityPartitionEditPart(view);
- case ActivityPartitionNameEditPart.VISUAL_ID:
- return new ActivityPartitionNameEditPart(view);
- case InterruptibleActivityRegionEditPart.VISUAL_ID:
- return new InterruptibleActivityRegionEditPart(view);
- case CommentEditPartCN.VISUAL_ID:
- return new CommentEditPartCN(view);
- case CommentBodyLabelEditPart.VISUAL_ID:
- return new CommentBodyLabelEditPart(view);
- case ReadSelfActionEditPart.VISUAL_ID:
- return new ReadSelfActionEditPart(view);
- case ReadSelfActionNameEditPart.VISUAL_ID:
- return new ReadSelfActionNameEditPart(view);
- case ReadSelfActionOutputPinEditPart.VISUAL_ID:
- return new ReadSelfActionOutputPinEditPart(view);
- case OutputPinInReadSelfActionLabelEditPart.VISUAL_ID:
- return new OutputPinInReadSelfActionLabelEditPart(view);
- case OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID:
- return new OutputPinInReadSelfActionAppliedStereotypeEditPart(view);
- case ActivityEditPartCN.VISUAL_ID:
- return new ActivityEditPartCN(view);
- case ActivityNameEditPartCN.VISUAL_ID:
- return new ActivityNameEditPartCN(view);
- case ActivityIsSingleExecutionCNEditPart.VISUAL_ID:
- return new ActivityIsSingleExecutionCNEditPart(view);
- case CreateObjectActionEditPart.VISUAL_ID:
- return new CreateObjectActionEditPart(view);
- case CreateObjectActionNameEditPart.VISUAL_ID:
- return new CreateObjectActionNameEditPart(view);
- case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID:
- return new OutputPinInCreateObjectActionAsResultEditPart(view);
- case OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID:
- return new OutputPinInCreateObjectActionAsResultLabelEditPart(view);
- case OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return new OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart(view);
- case ShapeNamedElementEditPart.VISUAL_ID:
- return new ShapeNamedElementEditPart(view);
- case ShapeNamedElementNameEditPart.VISUAL_ID:
- return new ShapeNamedElementNameEditPart(view);
- case ReadStructuralFeatureActionEditPart.VISUAL_ID:
- return new ReadStructuralFeatureActionEditPart(view);
- case ReadStructuralFeatureActionNameEditPart.VISUAL_ID:
- return new ReadStructuralFeatureActionNameEditPart(view);
- case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID:
- return new InputPinInReadStructuralFeatureAsObjectEditPart(view);
- case InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID:
- return new InputPinInReadStructuralFeatureAsObjectLabelEditPart(view);
- case InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return new InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart(view);
- case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID:
- return new OutputPinInReadStructuralFeatureAsResultEditPart(view);
- case OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID:
- return new OutputPinInReadStructuralFeatureAsResultLabelEditPart(view);
- case InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID:
- return new InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart(view);
- case AddStructuralFeatureValueActionEditPart.VISUAL_ID:
- return new AddStructuralFeatureValueActionEditPart(view);
- case AddStructuralFeatureValueActionNameEditPart.VISUAL_ID:
- return new AddStructuralFeatureValueActionNameEditPart(view);
- case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID:
- return new InputPinInAddStructuralFeatureValueActionAsObjectEditPart(view);
- case InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID:
- return new InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart(view);
- case InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return new InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart(view);
- case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID:
- return new InputPinInAddStructuralFeatureValueActionAsValueEditPart(view);
- case InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID:
- return new InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart(view);
- case InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID:
- return new InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart(view);
- case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID:
- return new OutputPinInAddStructuralFeatureValueActionAsResultEditPart(view);
- case OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID:
- return new OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart(view);
- case OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID:
- return new OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart(view);
- case DestroyObjectActionEditPart.VISUAL_ID:
- return new DestroyObjectActionEditPart(view);
- case DestroyObjectActionNameEditPart.VISUAL_ID:
- return new DestroyObjectActionNameEditPart(view);
- case InputPinInDestroyObjectActionEditPart.VISUAL_ID:
- return new InputPinInDestroyObjectActionEditPart(view);
- case InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID:
- return new InputPinInDestroyObjectActionLabelEditPart(view);
- case InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return new InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart(view);
- case ReadVariableActionEditPart.VISUAL_ID:
- return new ReadVariableActionEditPart(view);
- case ReadVariableActionNameEditPart.VISUAL_ID:
- return new ReadVariableActionNameEditPart(view);
- case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID:
- return new OutputPinInReadVariableActionAsResultEditPart(view);
- case OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID:
- return new OutputPinInReadVariableActionAsResultLabelEditPart(view);
- case OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return new OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart(view);
- case AddVariableValueActionEditPart.VISUAL_ID:
- return new AddVariableValueActionEditPart(view);
- case AddVariableValueActionNameEditPart.VISUAL_ID:
- return new AddVariableValueActionNameEditPart(view);
- case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID:
- return new InputPinInAddVariableValueActionAsInsertAtEditPart(view);
- case InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID:
- return new InputPinInAddVariableValueActionAsInsertAtLabelEditPart(view);
- case InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return new InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart(view);
- case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID:
- return new InputPinInAddVariableValueActionAsValueEditPart(view);
- case InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID:
- return new InputPinInAddVariableValueActionAsValueLabelEditPart(view);
- case InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return new InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart(view);
- case BroadcastSignalActionEditPart.VISUAL_ID:
- return new BroadcastSignalActionEditPart(view);
- case BroadcastSignalActionNameEditPart.VISUAL_ID:
- return new BroadcastSignalActionNameEditPart(view);
- case InputPinInBroadcastSignalActionEditPart.VISUAL_ID:
- return new InputPinInBroadcastSignalActionEditPart(view);
- case InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID:
- return new InputPinInBroadcastSignalActionLabelEditPart(view);
- case InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID:
- return new InputPinInBroadcastSignalActionValueLabelEditPart(view);
- case InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return new InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart(view);
- case CentralBufferNodeEditPart.VISUAL_ID:
- return new CentralBufferNodeEditPart(view);
- case CentralBufferNodeLabelEditPart.VISUAL_ID:
- return new CentralBufferNodeLabelEditPart(view);
- case CentralBufferNodeSelectionEditPart.VISUAL_ID:
- return new CentralBufferNodeSelectionEditPart(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 ActivityActivityParametersCompartmentEditPart.VISUAL_ID:
- return new ActivityActivityParametersCompartmentEditPart(view);
- case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID:
- return new ActivityActivityPreConditionsCompartmentEditPart(view);
- case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID:
- return new ActivityActivityPostConditionsCompartmentEditPart(view);
- case ActivityActivityContentCompartmentEditPart.VISUAL_ID:
- return new ActivityActivityContentCompartmentEditPart(view);
- case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- return new ConditionalNodeStructuredActivityNodeContentCompartmentEditPart(view);
- case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- return new ExpansionRegionStructuredActivityNodeContentCompartmentEditPart(view);
- case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- return new LoopNodeStructuredActivityNodeContentCompartmentEditPart(view);
- case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- return new SequenceNodeStructuredActivityNodeContentCompartmentEditPart(view);
- case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- return new StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart(view);
- case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID:
- return new ActivityPartitionActivityPartitionContentCompartmentEditPart(view);
- case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID:
- return new InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart(view);
- case ActivityCNParametersCompartmentEditPart.VISUAL_ID:
- return new ActivityCNParametersCompartmentEditPart(view);
- case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID:
- return new ActivityCNPreConditionsCompartmentEditPart(view);
- case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID:
- return new ActivityCNPostConditionsCompartmentEditPart(view);
- case ActivityCNContentCompartmentEditPart.VISUAL_ID:
- return new ActivityCNContentCompartmentEditPart(view);
- case ActionLocalPreconditionEditPart.VISUAL_ID:
- return new ActionLocalPreconditionEditPart(view);
- case ActionLocalPostconditionEditPart.VISUAL_ID:
- return new ActionLocalPostconditionEditPart(view);
- case ObjectFlowEditPart.VISUAL_ID:
- return new ObjectFlowEditPart(view);
- case ObjectFlowNameEditPart.VISUAL_ID:
- return new ObjectFlowNameEditPart(view);
- case ObjectFlowWeightEditPart.VISUAL_ID:
- return new ObjectFlowWeightEditPart(view);
- case ObjectFlowSelectionEditPart.VISUAL_ID:
- return new ObjectFlowSelectionEditPart(view);
- case ObjectFlowTransformationEditPart.VISUAL_ID:
- return new ObjectFlowTransformationEditPart(view);
- case DecisionInputFlowEditPart.VISUAL_ID:
- return new DecisionInputFlowEditPart(view);
- case ObjectFlowGuardEditPart.VISUAL_ID:
- return new ObjectFlowGuardEditPart(view);
- case ObjectFlowAppliedStereotypeEditPart.VISUAL_ID:
- return new ObjectFlowAppliedStereotypeEditPart(view);
- case ObjectFlowInterruptibleIconEditPart.VISUAL_ID:
- return new ObjectFlowInterruptibleIconEditPart(view);
- case ControlFlowEditPart.VISUAL_ID:
- return new ControlFlowEditPart(view);
- case ControlFlowNameEditPart.VISUAL_ID:
- return new ControlFlowNameEditPart(view);
- case ControlFlowWeightEditPart.VISUAL_ID:
- return new ControlFlowWeightEditPart(view);
- case ControlFlowGuardEditPart.VISUAL_ID:
- return new ControlFlowGuardEditPart(view);
- case ControlFlowAppliedStereotypeEditPart.VISUAL_ID:
- return new ControlFlowAppliedStereotypeEditPart(view);
- case ControlFlowInterruptibleIconEditPart.VISUAL_ID:
- return new ControlFlowInterruptibleIconEditPart(view);
- case ExceptionHandlerEditPart.VISUAL_ID:
- return new ExceptionHandlerEditPart(view);
- case ExceptionHandlerTypeEditPart.VISUAL_ID:
- return new ExceptionHandlerTypeEditPart(view);
- case ExceptionHandlerIconEditPart.VISUAL_ID:
- return new ExceptionHandlerIconEditPart(view);
- case CommentLinkEditPart.VISUAL_ID:
- return new CommentLinkEditPart(view);
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return new ConstraintConstrainedElementEditPart(view);
- }
- }
- return createUnrecognizedEditPart(context, model);
- }
-
- /**
- * @generated
- */
- private EditPart createUnrecognizedEditPart(EditPart context, Object model) {
- // Handle creation of unrecognized child node EditParts here
- return null;
- }
-
- /**
- * @generated NOT handle LinkAndCornerBentWithTextFigure
- */
- public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) {
- if (source.getFigure() instanceof IMultilineEditableFigure) {
- return new MultilineCellEditorLocator((IMultilineEditableFigure) source.getFigure());
- } else if (source.getFigure() instanceof WrappingLabel) {
- return new TextCellEditorLocator((WrappingLabel) source.getFigure());
- } else if (source.getFigure() instanceof DecisionInputEditPart.LinkAndCornerBentWithTextFigure) {
- return new TextCellEditorLocator(((DecisionInputEditPart.LinkAndCornerBentWithTextFigure) source.getFigure()).getCornerBentContent());
- } else if (source.getFigure() instanceof ObjectFlowSelectionEditPart.LinkAndCornerBentWithTextFigure) {
- return new TextCellEditorLocator(((ObjectFlowSelectionEditPart.LinkAndCornerBentWithTextFigure) source.getFigure()).getCornerBentContent());
- } else if (source.getFigure() instanceof ObjectFlowTransformationEditPart.LinkAndCornerBentWithTextFigure) {
- return new TextCellEditorLocator(((ObjectFlowTransformationEditPart.LinkAndCornerBentWithTextFigure) source.getFigure()).getCornerBentContent());
- } else {
- return new LabelCellEditorLocator((Label) source.getFigure());
- }
- }
-
- /**
- * @generated
- */
- static private class MultilineCellEditorLocator implements CellEditorLocator {
-
- /**
- * @generated
- */
- private IMultilineEditableFigure multilineEditableFigure;
-
- /**
- * @generated
- */
- public MultilineCellEditorLocator(IMultilineEditableFigure figure) {
- this.multilineEditableFigure = figure;
- }
-
- /**
- * @generated
- */
- public IMultilineEditableFigure getMultilineEditableFigure() {
- return multilineEditableFigure;
- }
-
- /**
- * @generated
- */
- @Override
- public void relocate(CellEditor celleditor) {
- Text text = (Text) celleditor.getControl();
- Rectangle rect = getMultilineEditableFigure().getBounds().getCopy();
- rect.x = getMultilineEditableFigure().getEditionLocation().x;
- rect.y = getMultilineEditableFigure().getEditionLocation().y;
- getMultilineEditableFigure().translateToAbsolute(rect);
- if (getMultilineEditableFigure().getText().length() > 0) {
- rect.setSize(new Dimension(text.computeSize(rect.width, SWT.DEFAULT)));
- }
- if (!rect.equals(new Rectangle(text.getBounds()))) {
- text.setBounds(rect.x, rect.y, rect.width, rect.height);
- }
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartFactory;
+import org.eclipse.gef.tools.CellEditorLocator;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.directedit.locator.LabelCellEditorLocator;
+import org.eclipse.gmf.tooling.runtime.directedit.locator.TextCellEditorLocator;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @generated
+ */
+public class UMLEditPartFactory implements EditPartFactory {
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart createEditPart(EditPart context, Object model) {
+ if (model instanceof View) {
+ View view = (View) model;
+ switch (UMLVisualIDRegistry.getVisualID(view)) {
+ case ActivityDiagramEditPart.VISUAL_ID:
+ return new ActivityDiagramEditPart(view);
+ case ActivityEditPart.VISUAL_ID:
+ return new ActivityEditPart(view);
+ case ActivityNameEditPart.VISUAL_ID:
+ return new ActivityNameEditPart(view);
+ case ActivityIsSingleExecutionEditPart.VISUAL_ID:
+ return new ActivityIsSingleExecutionEditPart(view);
+ case ParameterEditPart.VISUAL_ID:
+ return new ParameterEditPart(view);
+ case ConstraintInActivityAsPrecondEditPart.VISUAL_ID:
+ return new ConstraintInActivityAsPrecondEditPart(view);
+ case ConstraintInActivityAsPostcondEditPart.VISUAL_ID:
+ return new ConstraintInActivityAsPostcondEditPart(view);
+ case InitialNodeEditPart.VISUAL_ID:
+ return new InitialNodeEditPart(view);
+ case InitialNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new InitialNodeAppliedStereotypeEditPart(view);
+ case ActivityFinalNodeEditPart.VISUAL_ID:
+ return new ActivityFinalNodeEditPart(view);
+ case ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new ActivityFinalNodeAppliedStereotypeEditPart(view);
+ case FlowFinalNodeEditPart.VISUAL_ID:
+ return new FlowFinalNodeEditPart(view);
+ case FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new FlowFinalNodeAppliedStereotypeEditPart(view);
+ case OpaqueActionEditPart.VISUAL_ID:
+ return new OpaqueActionEditPart(view);
+ case OpaqueActionNameEditPart.VISUAL_ID:
+ return new OpaqueActionNameEditPart(view);
+ case ValuePinInOpaqueActEditPart.VISUAL_ID:
+ return new ValuePinInOpaqueActEditPart(view);
+ case ValuePinInOActLabelEditPart.VISUAL_ID:
+ return new ValuePinInOActLabelEditPart(view);
+ case ValuePinInOActValueEditPart.VISUAL_ID:
+ return new ValuePinInOActValueEditPart(view);
+ case ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID:
+ return new ValuePinInOActAppliedStereotypeEditPart(view);
+ case ActionInputPinInOpaqueActEditPart.VISUAL_ID:
+ return new ActionInputPinInOpaqueActEditPart(view);
+ case ActionInputPinInOActLabelEditPart.VISUAL_ID:
+ return new ActionInputPinInOActLabelEditPart(view);
+ case ActionInputPinInOActValueEditPart.VISUAL_ID:
+ return new ActionInputPinInOActValueEditPart(view);
+ case ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID:
+ return new ActionInputPinInOActAppliedStereotypeEditPart(view);
+ case InputPinInOpaqueActEditPart.VISUAL_ID:
+ return new InputPinInOpaqueActEditPart(view);
+ case InputPinInOActLabelEditPart.VISUAL_ID:
+ return new InputPinInOActLabelEditPart(view);
+ case InputPinInOActAppliedStereotypeEditPart.VISUAL_ID:
+ return new InputPinInOActAppliedStereotypeEditPart(view);
+ case OutputPinInOpaqueActEditPart.VISUAL_ID:
+ return new OutputPinInOpaqueActEditPart(view);
+ case OutputPinInOActLabelEditPart.VISUAL_ID:
+ return new OutputPinInOActLabelEditPart(view);
+ case OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID:
+ return new OutputPinInOActAppliedStereotypeEditPart(view);
+ case CallBehaviorActionEditPart.VISUAL_ID:
+ return new CallBehaviorActionEditPart(view);
+ case CallBehaviorActionNameEditPart.VISUAL_ID:
+ return new CallBehaviorActionNameEditPart(view);
+ case ValuePinInCallBeActEditPart.VISUAL_ID:
+ return new ValuePinInCallBeActEditPart(view);
+ case ValuePinInCBActLabelEditPart.VISUAL_ID:
+ return new ValuePinInCBActLabelEditPart(view);
+ case ValuePinInCBActValueEditPart.VISUAL_ID:
+ return new ValuePinInCBActValueEditPart(view);
+ case ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID:
+ return new ValuePinInCBActAppliedStereotypeEditPart(view);
+ case ActionInputPinInCallBeActEditPart.VISUAL_ID:
+ return new ActionInputPinInCallBeActEditPart(view);
+ case ActionInputPinInCBActLabelEditPart.VISUAL_ID:
+ return new ActionInputPinInCBActLabelEditPart(view);
+ case ActionInputPinInCBActValueEditPart.VISUAL_ID:
+ return new ActionInputPinInCBActValueEditPart(view);
+ case ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID:
+ return new ActionInputPinInCBActAppliedStereotypeEditPart(view);
+ case InputPinInCallBeActEditPart.VISUAL_ID:
+ return new InputPinInCallBeActEditPart(view);
+ case InputPinInCBActLabelEditPart.VISUAL_ID:
+ return new InputPinInCBActLabelEditPart(view);
+ case InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID:
+ return new InputPinInCBActAppliedStereotypeEditPart(view);
+ case OutputPinInCallBeActEditPart.VISUAL_ID:
+ return new OutputPinInCallBeActEditPart(view);
+ case OutputPinInCBActLabelEditPart.VISUAL_ID:
+ return new OutputPinInCBActLabelEditPart(view);
+ case OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID:
+ return new OutputPinInCBActAppliedStereotypeEditPart(view);
+ case CallOperationActionEditPart.VISUAL_ID:
+ return new CallOperationActionEditPart(view);
+ case CallOperationActionNameEditPart.VISUAL_ID:
+ return new CallOperationActionNameEditPart(view);
+ case ActionInputPinInCallOpActEditPart.VISUAL_ID:
+ return new ActionInputPinInCallOpActEditPart(view);
+ case ActionInputPinInCOActLabelEditPart.VISUAL_ID:
+ return new ActionInputPinInCOActLabelEditPart(view);
+ case ActionInputPinInCOActValueEditPart.VISUAL_ID:
+ return new ActionInputPinInCOActValueEditPart(view);
+ case ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID:
+ return new ActionInputPinInCOActAppliedStereotypeEditPart(view);
+ case ValuePinInCallOpActEditPart.VISUAL_ID:
+ return new ValuePinInCallOpActEditPart(view);
+ case ValuePinInCOActLabelEditPart.VISUAL_ID:
+ return new ValuePinInCOActLabelEditPart(view);
+ case ValuePinInCOActValueEditPart.VISUAL_ID:
+ return new ValuePinInCOActValueEditPart(view);
+ case ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID:
+ return new ValuePinInCOActAppliedStereotypeEditPart(view);
+ case InputPinInCallOpActEditPart.VISUAL_ID:
+ return new InputPinInCallOpActEditPart(view);
+ case InputPinInCOActLabelEditPart.VISUAL_ID:
+ return new InputPinInCOActLabelEditPart(view);
+ case InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID:
+ return new InputPinInCOActAppliedStereotypeEditPart(view);
+ case OutputPinInCallOpActEditPart.VISUAL_ID:
+ return new OutputPinInCallOpActEditPart(view);
+ case OutputPinInCOActLabelEditPart.VISUAL_ID:
+ return new OutputPinInCOActLabelEditPart(view);
+ case OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID:
+ return new OutputPinInCOActAppliedStereotypeEditPart(view);
+ case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID:
+ return new ValuePinInCallOpActAsTargetEditPart(view);
+ case ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID:
+ return new ValuePinInCOActAsTargetLabelEditPart(view);
+ case ValuePinInCOActAsTargetValueEditPart.VISUAL_ID:
+ return new ValuePinInCOActAsTargetValueEditPart(view);
+ case ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return new ValuePinInCOActAsTargetAppliedStereotypeEditPart(view);
+ case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID:
+ return new ActionInputPinInCallOpActAsTargetEditPart(view);
+ case ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID:
+ return new ActionInputPinInCOActAsTargetLabelEditPart(view);
+ case ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID:
+ return new ActionInputPinInCOActAsTargetValueEditPart(view);
+ case ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return new ActionInputPinInCOActAsTargetAppliedStereotypeEditPart(view);
+ case InputPinInCallOpActAsTargetEditPart.VISUAL_ID:
+ return new InputPinInCallOpActAsTargetEditPart(view);
+ case InputPinInCOActAsTargetLabelEditPart.VISUAL_ID:
+ return new InputPinInCOActAsTargetLabelEditPart(view);
+ case InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return new InputPinInCOActAsTargetAppliedStereotypeEditPart(view);
+ case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ return new DurationConstraintAsLocalPrecondEditPart(view);
+ case DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
+ return new DurationConstraintAsLocalPrecondNameEditPart(view);
+ case DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
+ return new DurationConstraintAsLocalPrecondBodyEditPart(view);
+ case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ return new DurationConstraintAsLocalPostcondEditPart(view);
+ case DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
+ return new DurationConstraintAsLocalPostcondNameEditPart(view);
+ case DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
+ return new DurationConstraintAsLocalPostcondBodyEditPart(view);
+ case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ return new TimeConstraintAsLocalPrecondEditPart(view);
+ case TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
+ return new TimeConstraintAsLocalPrecondNameEditPart(view);
+ case TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
+ return new TimeConstraintAsLocalPrecondBodyEditPart(view);
+ case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ return new TimeConstraintAsLocalPostcondEditPart(view);
+ case TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
+ return new TimeConstraintAsLocalPostcondNameEditPart(view);
+ case TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
+ return new TimeConstraintAsLocalPostcondBodyEditPart(view);
+ case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ return new IntervalConstraintAsLocalPrecondEditPart(view);
+ case IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
+ return new IntervalConstraintAsLocalPrecondNameEditPart(view);
+ case IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
+ return new IntervalConstraintAsLocalPrecondBodyEditPart(view);
+ case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ return new IntervalConstraintAsLocalPostcondEditPart(view);
+ case IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
+ return new IntervalConstraintAsLocalPostcondNameEditPart(view);
+ case IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
+ return new IntervalConstraintAsLocalPostcondBodyEditPart(view);
+ case ConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ return new ConstraintAsLocalPrecondEditPart(view);
+ case ConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
+ return new ConstraintAsLocalPrecondNameEditPart(view);
+ case ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
+ return new ConstraintAsLocalPrecondBodyEditPart(view);
+ case ConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ return new ConstraintAsLocalPostcondEditPart(view);
+ case ConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
+ return new ConstraintAsLocalPostcondNameEditPart(view);
+ case ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
+ return new ConstraintAsLocalPostcondBodyEditPart(view);
+ case DecisionNodeEditPart.VISUAL_ID:
+ return new DecisionNodeEditPart(view);
+ case DecisionInputEditPart.VISUAL_ID:
+ return new DecisionInputEditPart(view);
+ case DecisionNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new DecisionNodeAppliedStereotypeEditPart(view);
+ case MergeNodeEditPart.VISUAL_ID:
+ return new MergeNodeEditPart(view);
+ case MergeNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new MergeNodeAppliedStereotypeEditPart(view);
+ case ForkNodeEditPart.VISUAL_ID:
+ return new ForkNodeEditPart(view);
+ case ForkNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new ForkNodeAppliedStereotypeEditPart(view);
+ case JoinNodeEditPart.VISUAL_ID:
+ return new JoinNodeEditPart(view);
+ case JoinSpecEditPart.VISUAL_ID:
+ return new JoinSpecEditPart(view);
+ case JoinNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new JoinNodeAppliedStereotypeEditPart(view);
+ case DataStoreNodeEditPart.VISUAL_ID:
+ return new DataStoreNodeEditPart(view);
+ case DataStoreNodeLabelEditPart.VISUAL_ID:
+ return new DataStoreNodeLabelEditPart(view);
+ case DataStoreSelectionEditPart.VISUAL_ID:
+ return new DataStoreSelectionEditPart(view);
+ case SendObjectActionEditPart.VISUAL_ID:
+ return new SendObjectActionEditPart(view);
+ case SendObjectActionNameEditPart.VISUAL_ID:
+ return new SendObjectActionNameEditPart(view);
+ case ValuePinInSendObjActAsReqEditPart.VISUAL_ID:
+ return new ValuePinInSendObjActAsReqEditPart(view);
+ case ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID:
+ return new ValuePinInSendObjActAsReqLabelEditPart(view);
+ case ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID:
+ return new ValuePinInSendObjActAsReqValueEditPart(view);
+ case ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID:
+ return new ValuePinInSendObjActAsReqAppliedStereotypeEditPart(view);
+ case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID:
+ return new ActionInputPinInSendObjActAsReqEditPart(view);
+ case ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID:
+ return new ActionInputPinInSendObjActAsReqLabelEditPart(view);
+ case ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID:
+ return new ActionInputPinInSendObjActAsReqValueEditPart(view);
+ case ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID:
+ return new ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart(view);
+ case InputPinInSendObjActAsReqEditPart.VISUAL_ID:
+ return new InputPinInSendObjActAsReqEditPart(view);
+ case InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID:
+ return new InputPinInSendObjActAsReqLabelEditPart(view);
+ case InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID:
+ return new InputPinInSendObjActAsReqAppliedStereotypeEditPart(view);
+ case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID:
+ return new ValuePinInSendObjActAsTargetEditPart(view);
+ case ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID:
+ return new ValuePinInSendObjActAsTargetLabelEditPart(view);
+ case ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID:
+ return new ValuePinInSendObjActAsTargetValueEditPart(view);
+ case ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return new ValuePinInSendObjActAsTargetAppliedStereotypeEditPart(view);
+ case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID:
+ return new ActionInputPinInSendObjActAsTargetEditPart(view);
+ case ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID:
+ return new ActionInputPinInSendObjActAsTargetLabelEditPart(view);
+ case ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID:
+ return new ActionInputPinInSendObjActAsTargetValueEditPart(view);
+ case ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return new ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart(view);
+ case InputPinInSendObjActAsTargetEditPart.VISUAL_ID:
+ return new InputPinInSendObjActAsTargetEditPart(view);
+ case InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID:
+ return new InputPinInSendObjActAsTargetLabelEditPart(view);
+ case InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return new InputPinInSendObjActAsTargetAppliedStereotypeEditPart(view);
+ case SendSignalActionEditPart.VISUAL_ID:
+ return new SendSignalActionEditPart(view);
+ case SendSignalActionNameEditPart.VISUAL_ID:
+ return new SendSignalActionNameEditPart(view);
+ case ActionInputPinInSendSigActEditPart.VISUAL_ID:
+ return new ActionInputPinInSendSigActEditPart(view);
+ case ActionInputPinInSendSigActLabelEditPart.VISUAL_ID:
+ return new ActionInputPinInSendSigActLabelEditPart(view);
+ case ActionInputPinInSendSigActValueEditPart.VISUAL_ID:
+ return new ActionInputPinInSendSigActValueEditPart(view);
+ case ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID:
+ return new ActionInputPinInSendSigActAppliedStereotypeEditPart(view);
+ case ValuePinInSendSigActEditPart.VISUAL_ID:
+ return new ValuePinInSendSigActEditPart(view);
+ case ValuePinInSendSigActLabelEditPart.VISUAL_ID:
+ return new ValuePinInSendSigActLabelEditPart(view);
+ case ValuePinInSendSigActValueEditPart.VISUAL_ID:
+ return new ValuePinInSendSigActValueEditPart(view);
+ case ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID:
+ return new ValuePinInSendSigActAppliedStereotypeEditPart(view);
+ case InputPinInSendSigActEditPart.VISUAL_ID:
+ return new InputPinInSendSigActEditPart(view);
+ case InputPinInSendSigActLabelEditPart.VISUAL_ID:
+ return new InputPinInSendSigActLabelEditPart(view);
+ case InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID:
+ return new InputPinInSendSigActAppliedStereotypeEditPart(view);
+ case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID:
+ return new ValuePinInSendSigActAsTargetEditPart(view);
+ case ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID:
+ return new ValuePinInSendSigActAsTargetLabelEditPart(view);
+ case ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID:
+ return new ValuePinInSendSigActAsTargetValueEditPart(view);
+ case ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return new ValuePinInSendSigActAsTargetAppliedStereotypeEditPart(view);
+ case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID:
+ return new ActionInputPinInSendSigActAsTargetEditPart(view);
+ case ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID:
+ return new ActionInputPinInSendSigActAsTargetLabelEditPart(view);
+ case ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID:
+ return new ActionInputPinInSendSigActAsTargetValueEditPart(view);
+ case ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return new ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart(view);
+ case InputPinInSendSigActAsTargetEditPart.VISUAL_ID:
+ return new InputPinInSendSigActAsTargetEditPart(view);
+ case InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID:
+ return new InputPinInSendSigActAsTargetLabelEditPart(view);
+ case InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return new InputPinInSendSigActAsTargetAppliedStereotypeEditPart(view);
+ case ActivityParameterNodeEditPart.VISUAL_ID:
+ return new ActivityParameterNodeEditPart(view);
+ case ParameterNodeNameEditPart.VISUAL_ID:
+ return new ParameterNodeNameEditPart(view);
+ case AcceptEventActionEditPart.VISUAL_ID:
+ return new AcceptEventActionEditPart(view);
+ case AcceptEventActionLabelEditPart.VISUAL_ID:
+ return new AcceptEventActionLabelEditPart(view);
+ case AcceptTimeEventActionLabelEditPart.VISUAL_ID:
+ return new AcceptTimeEventActionLabelEditPart(view);
+ case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID:
+ return new AcceptTimeEventActionAppliedStereotypeEditPart(view);
+ case OutputPinInAcceptEventActionEditPart.VISUAL_ID:
+ return new OutputPinInAcceptEventActionEditPart(view);
+ case OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID:
+ return new OutputPinInAcceptEventActionLabelEditPart(view);
+ case OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID:
+ return new OutputPinInAcceptEventActionAppliedStereotypeEditPart(view);
+ case ValueSpecificationActionEditPart.VISUAL_ID:
+ return new ValueSpecificationActionEditPart(view);
+ case ValueSpecificationActionNameEditPart.VISUAL_ID:
+ return new ValueSpecificationActionNameEditPart(view);
+ case OutputPinInValSpecActEditPart.VISUAL_ID:
+ return new OutputPinInValSpecActEditPart(view);
+ case OutputPinInValSpecActLabelEditPart.VISUAL_ID:
+ return new OutputPinInValSpecActLabelEditPart(view);
+ case OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID:
+ return new OutputPinInValSpecActAppliedStereotypeEditPart(view);
+ case ConditionalNodeEditPart.VISUAL_ID:
+ return new ConditionalNodeEditPart(view);
+ case ConditionalNodeKeywordEditPart.VISUAL_ID:
+ return new ConditionalNodeKeywordEditPart(view);
+ case ExpansionRegionEditPart.VISUAL_ID:
+ return new ExpansionRegionEditPart(view);
+ case ExpansionRegionKeywordEditPart.VISUAL_ID:
+ return new ExpansionRegionKeywordEditPart(view);
+ case ExpansionNodeAsInEditPart.VISUAL_ID:
+ return new ExpansionNodeAsInEditPart(view);
+ case ExpansionNodeAsOutEditPart.VISUAL_ID:
+ return new ExpansionNodeAsOutEditPart(view);
+ case LoopNodeEditPart.VISUAL_ID:
+ return new LoopNodeEditPart(view);
+ case LoopNodeKeywordEditPart.VISUAL_ID:
+ return new LoopNodeKeywordEditPart(view);
+ case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID:
+ return new OutputPinInLoopNodeAsBodyOutputEditPart(view);
+ case OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID:
+ return new OutputPinInLoopNodeAsBodyOutputLabelEditPart(view);
+ case OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID:
+ return new OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart(view);
+ case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID:
+ return new OutputPinInLoopNodeAsLoopVariableEditPart(view);
+ case OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID:
+ return new OutputPinInLoopNodeAsLoopVariableLabelEditPart(view);
+ case OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID:
+ return new OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart(view);
+ case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID:
+ return new OutputPinInLoopNodeAsResultEditPart(view);
+ case OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID:
+ return new OutputPinInLoopNodeAsResultLabelEditPart(view);
+ case OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID:
+ return new OutputPinInLoopNodeAsResultAppliedStereotypeEditPart(view);
+ case SequenceNodeEditPart.VISUAL_ID:
+ return new SequenceNodeEditPart(view);
+ case SequenceNodeKeywordEditPart.VISUAL_ID:
+ return new SequenceNodeKeywordEditPart(view);
+ case StructuredActivityNodeEditPart.VISUAL_ID:
+ return new StructuredActivityNodeEditPart(view);
+ case StructuredActivityNodeKeywordEditPart.VISUAL_ID:
+ return new StructuredActivityNodeKeywordEditPart(view);
+ case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID:
+ return new InputPinInLoopNodeAsVariableEditPart(view);
+ case InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID:
+ return new InputPinInLoopNodeAsVariableLabelEditPart(view);
+ case InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return new InputPinInStructuredActivityNodeAppliedStereotypeEditPart(view);
+ case ActivityPartitionEditPart.VISUAL_ID:
+ return new ActivityPartitionEditPart(view);
+ case ActivityPartitionNameEditPart.VISUAL_ID:
+ return new ActivityPartitionNameEditPart(view);
+ case InterruptibleActivityRegionEditPart.VISUAL_ID:
+ return new InterruptibleActivityRegionEditPart(view);
+ case CommentEditPartCN.VISUAL_ID:
+ return new CommentEditPartCN(view);
+ case CommentBodyLabelEditPart.VISUAL_ID:
+ return new CommentBodyLabelEditPart(view);
+ case ReadSelfActionEditPart.VISUAL_ID:
+ return new ReadSelfActionEditPart(view);
+ case ReadSelfActionNameEditPart.VISUAL_ID:
+ return new ReadSelfActionNameEditPart(view);
+ case ReadSelfActionOutputPinEditPart.VISUAL_ID:
+ return new ReadSelfActionOutputPinEditPart(view);
+ case OutputPinInReadSelfActionLabelEditPart.VISUAL_ID:
+ return new OutputPinInReadSelfActionLabelEditPart(view);
+ case OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID:
+ return new OutputPinInReadSelfActionAppliedStereotypeEditPart(view);
+ case ActivityEditPartCN.VISUAL_ID:
+ return new ActivityEditPartCN(view);
+ case ActivityNameEditPartCN.VISUAL_ID:
+ return new ActivityNameEditPartCN(view);
+ case ActivityIsSingleExecutionCNEditPart.VISUAL_ID:
+ return new ActivityIsSingleExecutionCNEditPart(view);
+ case CreateObjectActionEditPart.VISUAL_ID:
+ return new CreateObjectActionEditPart(view);
+ case CreateObjectActionNameEditPart.VISUAL_ID:
+ return new CreateObjectActionNameEditPart(view);
+ case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID:
+ return new OutputPinInCreateObjectActionAsResultEditPart(view);
+ case OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID:
+ return new OutputPinInCreateObjectActionAsResultLabelEditPart(view);
+ case OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return new OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart(view);
+ case ShapeNamedElementEditPart.VISUAL_ID:
+ return new ShapeNamedElementEditPart(view);
+ case ShapeNamedElementNameEditPart.VISUAL_ID:
+ return new ShapeNamedElementNameEditPart(view);
+ case ReadStructuralFeatureActionEditPart.VISUAL_ID:
+ return new ReadStructuralFeatureActionEditPart(view);
+ case ReadStructuralFeatureActionNameEditPart.VISUAL_ID:
+ return new ReadStructuralFeatureActionNameEditPart(view);
+ case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID:
+ return new InputPinInReadStructuralFeatureAsObjectEditPart(view);
+ case InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID:
+ return new InputPinInReadStructuralFeatureAsObjectLabelEditPart(view);
+ case InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return new InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart(view);
+ case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID:
+ return new OutputPinInReadStructuralFeatureAsResultEditPart(view);
+ case OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID:
+ return new OutputPinInReadStructuralFeatureAsResultLabelEditPart(view);
+ case InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID:
+ return new InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart(view);
+ case AddStructuralFeatureValueActionEditPart.VISUAL_ID:
+ return new AddStructuralFeatureValueActionEditPart(view);
+ case AddStructuralFeatureValueActionNameEditPart.VISUAL_ID:
+ return new AddStructuralFeatureValueActionNameEditPart(view);
+ case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID:
+ return new InputPinInAddStructuralFeatureValueActionAsObjectEditPart(view);
+ case InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID:
+ return new InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart(view);
+ case InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return new InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart(view);
+ case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID:
+ return new InputPinInAddStructuralFeatureValueActionAsValueEditPart(view);
+ case InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID:
+ return new InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart(view);
+ case InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID:
+ return new InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart(view);
+ case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID:
+ return new OutputPinInAddStructuralFeatureValueActionAsResultEditPart(view);
+ case OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID:
+ return new OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart(view);
+ case OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID:
+ return new OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart(view);
+ case DestroyObjectActionEditPart.VISUAL_ID:
+ return new DestroyObjectActionEditPart(view);
+ case DestroyObjectActionNameEditPart.VISUAL_ID:
+ return new DestroyObjectActionNameEditPart(view);
+ case InputPinInDestroyObjectActionEditPart.VISUAL_ID:
+ return new InputPinInDestroyObjectActionEditPart(view);
+ case InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID:
+ return new InputPinInDestroyObjectActionLabelEditPart(view);
+ case InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return new InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart(view);
+ case ReadVariableActionEditPart.VISUAL_ID:
+ return new ReadVariableActionEditPart(view);
+ case ReadVariableActionNameEditPart.VISUAL_ID:
+ return new ReadVariableActionNameEditPart(view);
+ case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID:
+ return new OutputPinInReadVariableActionAsResultEditPart(view);
+ case OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID:
+ return new OutputPinInReadVariableActionAsResultLabelEditPart(view);
+ case OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return new OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart(view);
+ case AddVariableValueActionEditPart.VISUAL_ID:
+ return new AddVariableValueActionEditPart(view);
+ case AddVariableValueActionNameEditPart.VISUAL_ID:
+ return new AddVariableValueActionNameEditPart(view);
+ case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID:
+ return new InputPinInAddVariableValueActionAsInsertAtEditPart(view);
+ case InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID:
+ return new InputPinInAddVariableValueActionAsInsertAtLabelEditPart(view);
+ case InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return new InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart(view);
+ case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID:
+ return new InputPinInAddVariableValueActionAsValueEditPart(view);
+ case InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID:
+ return new InputPinInAddVariableValueActionAsValueLabelEditPart(view);
+ case InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return new InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart(view);
+ case BroadcastSignalActionEditPart.VISUAL_ID:
+ return new BroadcastSignalActionEditPart(view);
+ case BroadcastSignalActionNameEditPart.VISUAL_ID:
+ return new BroadcastSignalActionNameEditPart(view);
+ case InputPinInBroadcastSignalActionEditPart.VISUAL_ID:
+ return new InputPinInBroadcastSignalActionEditPart(view);
+ case InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID:
+ return new InputPinInBroadcastSignalActionLabelEditPart(view);
+ case InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID:
+ return new InputPinInBroadcastSignalActionValueLabelEditPart(view);
+ case InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return new InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart(view);
+ case CentralBufferNodeEditPart.VISUAL_ID:
+ return new CentralBufferNodeEditPart(view);
+ case CentralBufferNodeLabelEditPart.VISUAL_ID:
+ return new CentralBufferNodeLabelEditPart(view);
+ case CentralBufferNodeSelectionEditPart.VISUAL_ID:
+ return new CentralBufferNodeSelectionEditPart(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 ActivityActivityParametersCompartmentEditPart.VISUAL_ID:
+ return new ActivityActivityParametersCompartmentEditPart(view);
+ case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID:
+ return new ActivityActivityPreConditionsCompartmentEditPart(view);
+ case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID:
+ return new ActivityActivityPostConditionsCompartmentEditPart(view);
+ case ActivityActivityContentCompartmentEditPart.VISUAL_ID:
+ return new ActivityActivityContentCompartmentEditPart(view);
+ case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ return new ConditionalNodeStructuredActivityNodeContentCompartmentEditPart(view);
+ case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ return new ExpansionRegionStructuredActivityNodeContentCompartmentEditPart(view);
+ case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ return new LoopNodeStructuredActivityNodeContentCompartmentEditPart(view);
+ case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ return new SequenceNodeStructuredActivityNodeContentCompartmentEditPart(view);
+ case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ return new StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart(view);
+ case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID:
+ return new ActivityPartitionActivityPartitionContentCompartmentEditPart(view);
+ case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID:
+ return new InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart(view);
+ case ActivityCNParametersCompartmentEditPart.VISUAL_ID:
+ return new ActivityCNParametersCompartmentEditPart(view);
+ case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID:
+ return new ActivityCNPreConditionsCompartmentEditPart(view);
+ case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID:
+ return new ActivityCNPostConditionsCompartmentEditPart(view);
+ case ActivityCNContentCompartmentEditPart.VISUAL_ID:
+ return new ActivityCNContentCompartmentEditPart(view);
+ case ActionLocalPreconditionEditPart.VISUAL_ID:
+ return new ActionLocalPreconditionEditPart(view);
+ case ActionLocalPostconditionEditPart.VISUAL_ID:
+ return new ActionLocalPostconditionEditPart(view);
+ case ObjectFlowEditPart.VISUAL_ID:
+ return new ObjectFlowEditPart(view);
+ case ObjectFlowNameEditPart.VISUAL_ID:
+ return new ObjectFlowNameEditPart(view);
+ case ObjectFlowWeightEditPart.VISUAL_ID:
+ return new ObjectFlowWeightEditPart(view);
+ case ObjectFlowSelectionEditPart.VISUAL_ID:
+ return new ObjectFlowSelectionEditPart(view);
+ case ObjectFlowTransformationEditPart.VISUAL_ID:
+ return new ObjectFlowTransformationEditPart(view);
+ case DecisionInputFlowEditPart.VISUAL_ID:
+ return new DecisionInputFlowEditPart(view);
+ case ObjectFlowGuardEditPart.VISUAL_ID:
+ return new ObjectFlowGuardEditPart(view);
+ case ObjectFlowAppliedStereotypeEditPart.VISUAL_ID:
+ return new ObjectFlowAppliedStereotypeEditPart(view);
+ case ObjectFlowInterruptibleIconEditPart.VISUAL_ID:
+ return new ObjectFlowInterruptibleIconEditPart(view);
+ case ControlFlowEditPart.VISUAL_ID:
+ return new ControlFlowEditPart(view);
+ case ControlFlowNameEditPart.VISUAL_ID:
+ return new ControlFlowNameEditPart(view);
+ case ControlFlowWeightEditPart.VISUAL_ID:
+ return new ControlFlowWeightEditPart(view);
+ case ControlFlowGuardEditPart.VISUAL_ID:
+ return new ControlFlowGuardEditPart(view);
+ case ControlFlowAppliedStereotypeEditPart.VISUAL_ID:
+ return new ControlFlowAppliedStereotypeEditPart(view);
+ case ControlFlowInterruptibleIconEditPart.VISUAL_ID:
+ return new ControlFlowInterruptibleIconEditPart(view);
+ case ExceptionHandlerEditPart.VISUAL_ID:
+ return new ExceptionHandlerEditPart(view);
+ case ExceptionHandlerTypeEditPart.VISUAL_ID:
+ return new ExceptionHandlerTypeEditPart(view);
+ case ExceptionHandlerIconEditPart.VISUAL_ID:
+ return new ExceptionHandlerIconEditPart(view);
+ case CommentLinkEditPart.VISUAL_ID:
+ return new CommentLinkEditPart(view);
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return new ConstraintConstrainedElementEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case BroadcastSignalActionFloatingNameEditPart.VISUAL_ID:
+ return new BroadcastSignalActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case AddVariableValueActionFloatingNameEditPart.VISUAL_ID:
+ return new AddVariableValueActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case CallBehaviorActionFloatingNameEditPart.VISUAL_ID:
+ return new CallBehaviorActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case AddStructuralFeatureValueActionFloatingNameEditPart.VISUAL_ID:
+ return new AddStructuralFeatureValueActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case CallOperationActionFloatingNameEditPart.VISUAL_ID:
+ return new CallOperationActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case CreateObjectActionFloatingNameEditPart.VISUAL_ID:
+ return new CreateObjectActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case DestroyObjectActionFloatingNameEditPart.VISUAL_ID:
+ return new DestroyObjectActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case OpaqueActionFloatingNameEditPart.VISUAL_ID:
+ return new OpaqueActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case ReadSelfActionFloatingNameEditPart.VISUAL_ID:
+ return new ReadSelfActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case ReadStructuralFeatureActionFloatingNameEditPart.VISUAL_ID:
+ return new ReadStructuralFeatureActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case ReadVariableActionFloatingNameEditPart.VISUAL_ID:
+ return new ReadVariableActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case SendObjectActionFloatingNameEditPart.VISUAL_ID:
+ return new SendObjectActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case ValueSpecificationActionFloatingNameEditPart.VISUAL_ID:
+ return new ValueSpecificationActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case CentralBufferNodeFloatingNameEditPart.VISUAL_ID:
+ return new CentralBufferNodeFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case DataStoreNodeFloatingNameEditPart.VISUAL_ID:
+ return new DataStoreNodeFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case SendSignalActionFloatingNameEditPart.VISUAL_ID:
+ return new SendSignalActionFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case ActivityFinalNodeFloatingNameEditPart.VISUAL_ID:
+ return new ActivityFinalNodeFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case InitialNodeFloatingNameEditPart.VISUAL_ID:
+ return new InitialNodeFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case FlowFinalNodeFloatingNameEditPart.VISUAL_ID:
+ return new FlowFinalNodeFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case DecisionNodeFloatingNameEditPart.VISUAL_ID:
+ return new DecisionNodeFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case MergeNodeFloatingNameEditPart.VISUAL_ID:
+ return new MergeNodeFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case ForkNodeFloatingNameEditPart.VISUAL_ID:
+ return new ForkNodeFloatingNameEditPart(view);
+ // not generated but changes include on gmfgen, can be override at the generation
+ case JoinNodeFloatingNameEditPart.VISUAL_ID:
+ return new JoinNodeFloatingNameEditPart(view);
+
+ }
+ }
+ return createUnrecognizedEditPart(context, model);
+ }
+
+ /**
+ * @generated
+ */
+ private EditPart createUnrecognizedEditPart(EditPart context, Object model) {
+ // Handle creation of unrecognized child node EditParts here
+ return null;
+ }
+
+ /**
+ * @generated NOT handle LinkAndCornerBentWithTextFigure
+ */
+ public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) {
+ if (source.getFigure() instanceof IMultilineEditableFigure) {
+ return new MultilineCellEditorLocator((IMultilineEditableFigure) source.getFigure());
+ } else if (source.getFigure() instanceof WrappingLabel) {
+ return new TextCellEditorLocator((WrappingLabel) source.getFigure());
+ } else if (source.getFigure() instanceof DecisionInputEditPart.LinkAndCornerBentWithTextFigure) {
+ return new TextCellEditorLocator(((DecisionInputEditPart.LinkAndCornerBentWithTextFigure) source.getFigure()).getCornerBentContent());
+ } else if (source.getFigure() instanceof ObjectFlowSelectionEditPart.LinkAndCornerBentWithTextFigure) {
+ return new TextCellEditorLocator(((ObjectFlowSelectionEditPart.LinkAndCornerBentWithTextFigure) source.getFigure()).getCornerBentContent());
+ } else if (source.getFigure() instanceof ObjectFlowTransformationEditPart.LinkAndCornerBentWithTextFigure) {
+ return new TextCellEditorLocator(((ObjectFlowTransformationEditPart.LinkAndCornerBentWithTextFigure) source.getFigure()).getCornerBentContent());
+ } else {
+ return new LabelCellEditorLocator((Label) source.getFigure());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ static private class MultilineCellEditorLocator implements CellEditorLocator {
+
+ /**
+ * @generated
+ */
+ private IMultilineEditableFigure multilineEditableFigure;
+
+ /**
+ * @generated
+ */
+ public MultilineCellEditorLocator(IMultilineEditableFigure figure) {
+ this.multilineEditableFigure = figure;
+ }
+
+ /**
+ * @generated
+ */
+ public IMultilineEditableFigure getMultilineEditableFigure() {
+ return multilineEditableFigure;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void relocate(CellEditor celleditor) {
+ Text text = (Text) celleditor.getControl();
+ Rectangle rect = getMultilineEditableFigure().getBounds().getCopy();
+ rect.x = getMultilineEditableFigure().getEditionLocation().x;
+ rect.y = getMultilineEditableFigure().getEditionLocation().y;
+ getMultilineEditableFigure().translateToAbsolute(rect);
+ if (getMultilineEditableFigure().getText().length() > 0) {
+ rect.setSize(new Dimension(text.computeSize(rect.width, SWT.DEFAULT)));
+ }
+ if (!rect.equals(new Rectangle(text.getBounds()))) {
+ text.setBounds(rect.x, rect.y, rect.width, rect.height);
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionEditPart.java
index 1f919323769..9fae1b0cebc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionEditPart.java
@@ -1,1487 +1,1487 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.StackLayout;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionCanonicalEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.BorderItemResizableEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ValueSpecificationActionEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3076;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ValueSpecificationActionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ValueSpecificationActionItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- // in Papyrus diagrams are not strongly synchronised
- // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionCanonicalEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
- installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ValueSpecificationActionCanonicalEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected LayoutEditPolicy createLayoutEditPolicy() {
- org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case OutputPinInValSpecActEditPart.VISUAL_ID:
- return new BorderItemResizableEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new PapyrusRoundedNodeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public PapyrusRoundedNodeFigure getPrimaryShape() {
- return (PapyrusRoundedNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ValueSpecificationActionNameEditPart) {
- ((ValueSpecificationActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- // Papyrus Gencode :Affixed Pin locator for Actions
- if (childEditPart instanceof OutputPinInValSpecActEditPart) {
- IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST);
- getBorderedFigure().getBorderItemContainer().add(((OutputPinInValSpecActEditPart) childEditPart).getFigure(), locator);
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ValueSpecificationActionNameEditPart) {
- return true;
- }
- if (childEditPart instanceof OutputPinInValSpecActEditPart) {
- getBorderedFigure().getBorderItemContainer().remove(((OutputPinInValSpecActEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof IBorderItemEditPart) {
- return getBorderedFigure().getBorderItemContainer();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- String prefElementId = "ValueSpecificationAction";
- 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));
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
- }
-
- /**
- * Default implementation treats passed figure as content pane.
- * Respects layout one may have set for generated figure.
- *
- * @param nodeShape
- * instance of generated figure class
- * @generated
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ValueSpecificationActionNameEditPart.VISUAL_ID));
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSource() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.ExceptionHandler_4005);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPrecondition_4001);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof ConstraintEditPartCN) {
- types.add(UMLElementTypes.ActionLocalPostcondition_4002);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ObjectFlow_4003);
- }
- if (targetEditPart instanceof InitialNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof FlowFinalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OpaqueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallBehaviorActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CallOperationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DecisionNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof MergeNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ForkNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof JoinNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SendSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ValueSpecificationActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ConditionalNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionRegionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof LoopNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof SequenceNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof StructuredActivityNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CreateObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof DestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ReadVariableActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof AddVariableValueActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof BroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ControlFlow_4004);
- }
- if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof DataStoreNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ActivityParameterNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- if (targetEditPart instanceof CentralBufferNodeEditPart) {
- types.add(UMLElementTypes.ExceptionHandler_4005);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- }
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMARelTypesOnTarget() {
- ArrayList<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.ObjectFlow_4003);
- types.add(UMLElementTypes.ControlFlow_4004);
- types.add(UMLElementTypes.CommentAnnotatedElement_4006);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
- return types;
- }
-
- /**
- * @generated
- */
- public List<IElementType> getMATypesForSource(IElementType relationshipType) {
- LinkedList<IElementType> types = new LinkedList<IElementType>();
- if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
- types.add(UMLElementTypes.InitialNode_3004);
- types.add(UMLElementTypes.ActivityFinalNode_3005);
- types.add(UMLElementTypes.FlowFinalNode_3006);
- types.add(UMLElementTypes.OpaqueAction_3007);
- types.add(UMLElementTypes.ValuePin_3015);
- types.add(UMLElementTypes.ActionInputPin_3016);
- types.add(UMLElementTypes.InputPin_3013);
- types.add(UMLElementTypes.OutputPin_3014);
- types.add(UMLElementTypes.CallBehaviorAction_3008);
- types.add(UMLElementTypes.ValuePin_3017);
- types.add(UMLElementTypes.ActionInputPin_3018);
- types.add(UMLElementTypes.InputPin_3019);
- types.add(UMLElementTypes.OutputPin_3020);
- types.add(UMLElementTypes.CallOperationAction_3010);
- types.add(UMLElementTypes.ActionInputPin_3021);
- types.add(UMLElementTypes.ValuePin_3022);
- types.add(UMLElementTypes.InputPin_3023);
- types.add(UMLElementTypes.OutputPin_3024);
- types.add(UMLElementTypes.ValuePin_3025);
- types.add(UMLElementTypes.ActionInputPin_3026);
- types.add(UMLElementTypes.InputPin_3027);
- types.add(UMLElementTypes.DecisionNode_3038);
- types.add(UMLElementTypes.MergeNode_3039);
- types.add(UMLElementTypes.ForkNode_3040);
- types.add(UMLElementTypes.JoinNode_3041);
- types.add(UMLElementTypes.DataStoreNode_3078);
- types.add(UMLElementTypes.SendObjectAction_3042);
- types.add(UMLElementTypes.ValuePin_3046);
- types.add(UMLElementTypes.ActionInputPin_3047);
- types.add(UMLElementTypes.InputPin_3048);
- types.add(UMLElementTypes.ValuePin_3049);
- types.add(UMLElementTypes.ActionInputPin_3050);
- types.add(UMLElementTypes.InputPin_3051);
- types.add(UMLElementTypes.SendSignalAction_3052);
- types.add(UMLElementTypes.ActionInputPin_3053);
- types.add(UMLElementTypes.ValuePin_3054);
- types.add(UMLElementTypes.InputPin_3055);
- types.add(UMLElementTypes.ValuePin_3060);
- types.add(UMLElementTypes.ActionInputPin_3061);
- types.add(UMLElementTypes.InputPin_3062);
- types.add(UMLElementTypes.ActivityParameterNode_3059);
- types.add(UMLElementTypes.AcceptEventAction_3063);
- types.add(UMLElementTypes.OutputPin_3064);
- types.add(UMLElementTypes.ValueSpecificationAction_3076);
- types.add(UMLElementTypes.OutputPin_3077);
- types.add(UMLElementTypes.ConditionalNode_3069);
- types.add(UMLElementTypes.ExpansionRegion_3070);
- types.add(UMLElementTypes.ExpansionNode_3074);
- types.add(UMLElementTypes.ExpansionNode_3075);
- types.add(UMLElementTypes.LoopNode_3071);
- types.add(UMLElementTypes.OutputPin_3109);
- types.add(UMLElementTypes.OutputPin_3110);
- types.add(UMLElementTypes.OutputPin_3111);
- types.add(UMLElementTypes.SequenceNode_3073);
- types.add(UMLElementTypes.StructuredActivityNode_3065);
- types.add(UMLElementTypes.InputPin_3105);
- types.add(UMLElementTypes.ReadSelfAction_3081);
- types.add(UMLElementTypes.OutputPin_3084);
- types.add(UMLElementTypes.CreateObjectAction_3086);
- types.add(UMLElementTypes.OutputPin_3087);
- types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
- types.add(UMLElementTypes.InputPin_3089);
- types.add(UMLElementTypes.OutputPin_3090);
- types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
- types.add(UMLElementTypes.InputPin_3092);
- types.add(UMLElementTypes.InputPin_3093);
- types.add(UMLElementTypes.OutputPin_3094);
- types.add(UMLElementTypes.DestroyObjectAction_3095);
- types.add(UMLElementTypes.InputPin_3096);
- types.add(UMLElementTypes.ReadVariableAction_3097);
- types.add(UMLElementTypes.OutputPin_3098);
- types.add(UMLElementTypes.AddVariableValueAction_3099);
- types.add(UMLElementTypes.InputPin_3100);
- types.add(UMLElementTypes.InputPin_3101);
- types.add(UMLElementTypes.BroadcastSignalAction_3102);
- types.add(UMLElementTypes.InputPin_3103);
- types.add(UMLElementTypes.CentralBufferNode_3104);
- } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
- types.add(UMLElementTypes.Comment_3080);
- } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
- types.add(UMLElementTypes.DurationConstraint_3034);
- types.add(UMLElementTypes.DurationConstraint_3035);
- types.add(UMLElementTypes.TimeConstraint_3036);
- types.add(UMLElementTypes.TimeConstraint_3037);
- types.add(UMLElementTypes.IntervalConstraint_3032);
- types.add(UMLElementTypes.IntervalConstraint_3033);
- types.add(UMLElementTypes.Constraint_3011);
- types.add(UMLElementTypes.Constraint_3012);
- types.add(UMLElementTypes.Constraint_3112);
- }
- return types;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getPreferredValue(EStructuralFeature feature) {
- IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
- Object result = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- String prefColor = null;
- if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_LINE);
- } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_FONT);
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
- prefColor = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_FILL);
- }
- result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- String prefGradient = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_GRADIENT);
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
- if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
- result = new Integer(gradientPreferenceConverter.getTransparency());
- } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
- result = gradientPreferenceConverter.getGradientData();
- }
- }
- if (result == null) {
- result = getStructuralFeatureValue(feature);
- }
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.edit.parts;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.StackLayout;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CreateActionLocalConditionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.DeleteActionViewEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ObjectFlowWithPinsCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.OpenDiagramEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionCanonicalEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ValueSpecificationActionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3076;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ValueSpecificationActionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ValueSpecificationActionItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ValueSpecificationActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenDiagramEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new ActivityDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(RequestConstants.REQ_CREATE, new CreateActionLocalConditionEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ObjectFlowWithPinsCreationEditPolicy());
+ installEditPolicy(RequestConstants.REQ_DELETE, new DeleteActionViewEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ValueSpecificationActionCanonicalEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case OutputPinInValSpecActEditPart.VISUAL_ID:
+ return new BorderItemResizableEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new RoundedCompartmentFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ValueSpecificationActionNameEditPart) {
+ ((ValueSpecificationActionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ // Papyrus Gencode :Affixed Pin locator for Actions
+ if (childEditPart instanceof OutputPinInValSpecActEditPart) {
+ IBorderItemLocator locator = new PinPositionLocator(getMainFigure(), PositionConstants.EAST);
+ getBorderedFigure().getBorderItemContainer().add(((OutputPinInValSpecActEditPart) childEditPart).getFigure(), locator);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ValueSpecificationActionNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof OutputPinInValSpecActEditPart) {
+ getBorderedFigure().getBorderItemContainer().remove(((OutputPinInValSpecActEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ String prefElementId = "ValueSpecificationAction";
+ 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));
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ NodeFigure figure = createNodePlate();
+ figure.setLayoutManager(new StackLayout());
+ IFigure shape = createNodeShape();
+ figure.add(shape);
+ contentPane = setupContentPane(shape);
+ return figure;
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ *
+ * @param nodeShape
+ * instance of generated figure class
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineWidth(width);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) { // Manually replaced, waiting for next generation
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ValueSpecificationActionNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSource() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnSourceAndTarget(IGraphicalEditPart targetEditPart) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPrecondition_4001);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof DurationConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof TimeConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof IntervalConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPrecondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintAsLocalPostcondEditPart) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof ConstraintEditPartCN) {
+ types.add(UMLElementTypes.ActionLocalPostcondition_4002);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ }
+ if (targetEditPart instanceof InitialNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof FlowFinalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OpaqueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallBehaviorActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CallOperationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DecisionNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof MergeNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ForkNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof JoinNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SendSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof org.eclipse.papyrus.uml.diagram.activity.edit.parts.ValueSpecificationActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ConditionalNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionRegionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof LoopNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof SequenceNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof StructuredActivityNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CreateObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadStructuralFeatureActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddStructuralFeatureValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof DestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ReadVariableActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof AddVariableValueActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof BroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ControlFlow_4004);
+ }
+ if (targetEditPart instanceof ValuePinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInOpaqueActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallBeActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCallOpActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInCallOpActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof DataStoreNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsReqEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendObjActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ValuePinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActionInputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInSendSigActAsTargetEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ActivityParameterNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAcceptEventActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInValSpecActEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsInEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ExpansionNodeAsOutEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsBodyOutputEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsLoopVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInLoopNodeAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInLoopNodeAsVariableEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof ReadSelfActionOutputPinEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInCreateObjectActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInReadStructuralFeatureAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadStructuralFeatureAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsObjectEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddStructuralFeatureValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInAddStructuralFeatureValueActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInDestroyObjectActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof OutputPinInReadVariableActionAsResultEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsInsertAtEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInAddVariableValueActionAsValueEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof InputPinInBroadcastSignalActionEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ if (targetEditPart instanceof CentralBufferNodeEditPart) {
+ types.add(UMLElementTypes.ExceptionHandler_4005);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForTarget(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ActionLocalPrecondition_4001) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ActionLocalPostcondition_4002) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ } else if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ExceptionHandler_4005) {
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMARelTypesOnTarget() {
+ ArrayList<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.ObjectFlow_4003);
+ types.add(UMLElementTypes.ControlFlow_4004);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4006);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4007);
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ public List<IElementType> getMATypesForSource(IElementType relationshipType) {
+ LinkedList<IElementType> types = new LinkedList<IElementType>();
+ if (relationshipType == UMLElementTypes.ObjectFlow_4003) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.ControlFlow_4004) {
+ types.add(UMLElementTypes.InitialNode_3004);
+ types.add(UMLElementTypes.ActivityFinalNode_3005);
+ types.add(UMLElementTypes.FlowFinalNode_3006);
+ types.add(UMLElementTypes.OpaqueAction_3007);
+ types.add(UMLElementTypes.ValuePin_3015);
+ types.add(UMLElementTypes.ActionInputPin_3016);
+ types.add(UMLElementTypes.InputPin_3013);
+ types.add(UMLElementTypes.OutputPin_3014);
+ types.add(UMLElementTypes.CallBehaviorAction_3008);
+ types.add(UMLElementTypes.ValuePin_3017);
+ types.add(UMLElementTypes.ActionInputPin_3018);
+ types.add(UMLElementTypes.InputPin_3019);
+ types.add(UMLElementTypes.OutputPin_3020);
+ types.add(UMLElementTypes.CallOperationAction_3010);
+ types.add(UMLElementTypes.ActionInputPin_3021);
+ types.add(UMLElementTypes.ValuePin_3022);
+ types.add(UMLElementTypes.InputPin_3023);
+ types.add(UMLElementTypes.OutputPin_3024);
+ types.add(UMLElementTypes.ValuePin_3025);
+ types.add(UMLElementTypes.ActionInputPin_3026);
+ types.add(UMLElementTypes.InputPin_3027);
+ types.add(UMLElementTypes.DecisionNode_3038);
+ types.add(UMLElementTypes.MergeNode_3039);
+ types.add(UMLElementTypes.ForkNode_3040);
+ types.add(UMLElementTypes.JoinNode_3041);
+ types.add(UMLElementTypes.DataStoreNode_3078);
+ types.add(UMLElementTypes.SendObjectAction_3042);
+ types.add(UMLElementTypes.ValuePin_3046);
+ types.add(UMLElementTypes.ActionInputPin_3047);
+ types.add(UMLElementTypes.InputPin_3048);
+ types.add(UMLElementTypes.ValuePin_3049);
+ types.add(UMLElementTypes.ActionInputPin_3050);
+ types.add(UMLElementTypes.InputPin_3051);
+ types.add(UMLElementTypes.SendSignalAction_3052);
+ types.add(UMLElementTypes.ActionInputPin_3053);
+ types.add(UMLElementTypes.ValuePin_3054);
+ types.add(UMLElementTypes.InputPin_3055);
+ types.add(UMLElementTypes.ValuePin_3060);
+ types.add(UMLElementTypes.ActionInputPin_3061);
+ types.add(UMLElementTypes.InputPin_3062);
+ types.add(UMLElementTypes.ActivityParameterNode_3059);
+ types.add(UMLElementTypes.AcceptEventAction_3063);
+ types.add(UMLElementTypes.OutputPin_3064);
+ types.add(UMLElementTypes.ValueSpecificationAction_3076);
+ types.add(UMLElementTypes.OutputPin_3077);
+ types.add(UMLElementTypes.ConditionalNode_3069);
+ types.add(UMLElementTypes.ExpansionRegion_3070);
+ types.add(UMLElementTypes.ExpansionNode_3074);
+ types.add(UMLElementTypes.ExpansionNode_3075);
+ types.add(UMLElementTypes.LoopNode_3071);
+ types.add(UMLElementTypes.OutputPin_3109);
+ types.add(UMLElementTypes.OutputPin_3110);
+ types.add(UMLElementTypes.OutputPin_3111);
+ types.add(UMLElementTypes.SequenceNode_3073);
+ types.add(UMLElementTypes.StructuredActivityNode_3065);
+ types.add(UMLElementTypes.InputPin_3105);
+ types.add(UMLElementTypes.ReadSelfAction_3081);
+ types.add(UMLElementTypes.OutputPin_3084);
+ types.add(UMLElementTypes.CreateObjectAction_3086);
+ types.add(UMLElementTypes.OutputPin_3087);
+ types.add(UMLElementTypes.ReadStructuralFeatureAction_3088);
+ types.add(UMLElementTypes.InputPin_3089);
+ types.add(UMLElementTypes.OutputPin_3090);
+ types.add(UMLElementTypes.AddStructuralFeatureValueAction_3091);
+ types.add(UMLElementTypes.InputPin_3092);
+ types.add(UMLElementTypes.InputPin_3093);
+ types.add(UMLElementTypes.OutputPin_3094);
+ types.add(UMLElementTypes.DestroyObjectAction_3095);
+ types.add(UMLElementTypes.InputPin_3096);
+ types.add(UMLElementTypes.ReadVariableAction_3097);
+ types.add(UMLElementTypes.OutputPin_3098);
+ types.add(UMLElementTypes.AddVariableValueAction_3099);
+ types.add(UMLElementTypes.InputPin_3100);
+ types.add(UMLElementTypes.InputPin_3101);
+ types.add(UMLElementTypes.BroadcastSignalAction_3102);
+ types.add(UMLElementTypes.InputPin_3103);
+ types.add(UMLElementTypes.CentralBufferNode_3104);
+ } else if (relationshipType == UMLElementTypes.CommentAnnotatedElement_4006) {
+ types.add(UMLElementTypes.Comment_3080);
+ } else if (relationshipType == UMLElementTypes.ConstraintConstrainedElement_4007) {
+ types.add(UMLElementTypes.DurationConstraint_3034);
+ types.add(UMLElementTypes.DurationConstraint_3035);
+ types.add(UMLElementTypes.TimeConstraint_3036);
+ types.add(UMLElementTypes.TimeConstraint_3037);
+ types.add(UMLElementTypes.IntervalConstraint_3032);
+ types.add(UMLElementTypes.IntervalConstraint_3033);
+ types.add(UMLElementTypes.Constraint_3011);
+ types.add(UMLElementTypes.Constraint_3012);
+ types.add(UMLElementTypes.Constraint_3112);
+ }
+ return types;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getPreferredValue(EStructuralFeature feature) {
+ IPreferenceStore preferenceStore = (IPreferenceStore) getDiagramPreferencesHint().getPreferenceStore();
+ Object result = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor() || feature == NotationPackage.eINSTANCE.getFontStyle_FontColor() || feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ String prefColor = null;
+ if (feature == NotationPackage.eINSTANCE.getLineStyle_LineColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_LINE);
+ } else if (feature == NotationPackage.eINSTANCE.getFontStyle_FontColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_FONT);
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_FillColor()) {
+ prefColor = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_FILL);
+ }
+ result = FigureUtilities.RGBToInteger(PreferenceConverter.getColor(preferenceStore, prefColor));
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency() || feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ String prefGradient = PreferencesConstantsHelper.getElementConstant("ValueSpecificationAction", PreferencesConstantsHelper.COLOR_GRADIENT);
+ GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(preferenceStore.getString(prefGradient));
+ if (feature == NotationPackage.eINSTANCE.getFillStyle_Transparency()) {
+ result = new Integer(gradientPreferenceConverter.getTransparency());
+ } else if (feature == NotationPackage.eINSTANCE.getFillStyle_Gradient()) {
+ result = gradientPreferenceConverter.getGradientData();
+ }
+ }
+ if (result == null) {
+ result = getStructuralFeatureValue(feature);
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionFloatingNameEditPart.java
new file mode 100644
index 00000000000..349be5e9d9d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ValueSpecificationActionFloatingNameEditPart.java
@@ -0,0 +1,806 @@
+package org.eclipse.papyrus.uml.diagram.activity.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.activity.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 ValueSpecificationActionFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6026;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(ValueSpecificationActionFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ValueSpecificationActionFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.BroadcastSignalAction_3102, getParserElement(), UMLVisualIDRegistry.getType(ValueSpecificationActionFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java
index 64d184f2b72..21181250c10 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java
@@ -1,4302 +1,4412 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.part;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.structure.DiagramStructure;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.*;
-import org.eclipse.papyrus.uml.diagram.activity.expressions.UMLOCLFactory;
-import org.eclipse.uml2.uml.ActionInputPin;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.DurationConstraint;
-import org.eclipse.uml2.uml.ExpansionNode;
-import org.eclipse.uml2.uml.InputPin;
-import org.eclipse.uml2.uml.IntervalConstraint;
-import org.eclipse.uml2.uml.OutputPin;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.TimeConstraint;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.ValuePin;
-
-/**
- * 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 {
-
- /**
- * @generated
- */
- private static final String DEBUG_KEY = "org.eclipse.papyrus.uml.diagram.activity/debug/visualID"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static int getVisualID(View view) {
- if (view instanceof Diagram) {
- if (ActivityDiagramEditPart.MODEL_ID.equals(view.getType())) {
- return ActivityDiagramEditPart.VISUAL_ID;
- } else {
- return -1;
- }
- }
- return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(view.getType());
- }
-
- /**
- * @generated
- */
- public static String getModelID(View view) {
- View diagram = view.getDiagram();
- while (view != diagram) {
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if (annotation != null) {
- return annotation.getDetails().get("modelID"); //$NON-NLS-1$
- }
- view = (View) view.eContainer();
- }
- return diagram != null ? diagram.getType() : null;
- }
-
- /**
- * @generated
- */
- public static int getVisualID(String type) {
- try {
- return Integer.parseInt(type);
- } catch (NumberFormatException e) {
- if (Boolean.TRUE.toString().equalsIgnoreCase(Platform.getDebugOption(DEBUG_KEY))) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to parse view type as a visualID number: " + type);
- }
- }
- return -1;
- }
-
- /**
- * @generated
- */
- public static String getType(int visualID) {
- return Integer.toString(visualID);
- }
-
- public static int getDiagramVisualID(EObject domainElement) {
- return ActivityDiagramEditPart.VISUAL_ID;
- }
-
- /**
- * @generated
- */
- public static int getNodeVisualID(View containerView, EObject domainElement) {
- if (domainElement == null) {
- return -1;
- }
- String containerModelID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getModelID(containerView);
- if (!ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) {
- return -1;
- }
- int containerVisualID;
- if (ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) {
- containerVisualID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(containerView);
- } else {
- if (containerView instanceof Diagram) {
- containerVisualID = ActivityDiagramEditPart.VISUAL_ID;
- } else {
- return -1;
- }
- }
- switch (containerVisualID) {
- case ActivityDiagramEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
- return ActivityEditPart.VISUAL_ID;
- }
- break;
- case ActivityEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getActivityParameterNode().isSuperTypeOf(domainElement.eClass())) {
- return ActivityParameterNodeEditPart.VISUAL_ID;
- }
- break;
- case OpaqueActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass())) {
- return ValuePinInOpaqueActEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass())) {
- return ActionInputPinInOpaqueActEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) {
- return InputPinInOpaqueActEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
- return OutputPinInOpaqueActEditPart.VISUAL_ID;
- }
- break;
- case CallBehaviorActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass())) {
- return ValuePinInCallBeActEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass())) {
- return ActionInputPinInCallBeActEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) {
- return InputPinInCallBeActEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
- return OutputPinInCallBeActEditPart.VISUAL_ID;
- }
- break;
- case CallOperationActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3021(containerView, (ActionInputPin) domainElement)) {
- return ActionInputPinInCallOpActEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3022(containerView, (ValuePin) domainElement)) {
- return ValuePinInCallOpActEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3023(containerView, (InputPin) domainElement)) {
- return InputPinInCallOpActEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
- return OutputPinInCallOpActEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3025(containerView, (ValuePin) domainElement)) {
- return ValuePinInCallOpActAsTargetEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3026(containerView, (ActionInputPin) domainElement)) {
- return ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3027(containerView, (InputPin) domainElement)) {
- return InputPinInCallOpActAsTargetEditPart.VISUAL_ID;
- }
- break;
- case SendObjectActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3046(containerView, (ValuePin) domainElement)) {
- return ValuePinInSendObjActAsReqEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3047(containerView, (ActionInputPin) domainElement)) {
- return ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3048(containerView, (InputPin) domainElement)) {
- return InputPinInSendObjActAsReqEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3049(containerView, (ValuePin) domainElement)) {
- return ValuePinInSendObjActAsTargetEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3050(containerView, (ActionInputPin) domainElement)) {
- return ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3051(containerView, (InputPin) domainElement)) {
- return InputPinInSendObjActAsTargetEditPart.VISUAL_ID;
- }
- break;
- case SendSignalActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3053(containerView, (ActionInputPin) domainElement)) {
- return ActionInputPinInSendSigActEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3054(containerView, (ValuePin) domainElement)) {
- return ValuePinInSendSigActEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3055(containerView, (InputPin) domainElement)) {
- return InputPinInSendSigActEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3060(containerView, (ValuePin) domainElement)) {
- return ValuePinInSendSigActAsTargetEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3061(containerView, (ActionInputPin) domainElement)) {
- return ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3062(containerView, (InputPin) domainElement)) {
- return InputPinInSendSigActAsTargetEditPart.VISUAL_ID;
- }
- break;
- case AcceptEventActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
- return OutputPinInAcceptEventActionEditPart.VISUAL_ID;
- }
- break;
- case ValueSpecificationActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
- return OutputPinInValSpecActEditPart.VISUAL_ID;
- }
- break;
- case ExpansionRegionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getExpansionNode().isSuperTypeOf(domainElement.eClass()) && isExpansionNode_3074(containerView, (ExpansionNode) domainElement)) {
- return ExpansionNodeAsInEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExpansionNode().isSuperTypeOf(domainElement.eClass()) && isExpansionNode_3075(containerView, (ExpansionNode) domainElement)) {
- return ExpansionNodeAsOutEditPart.VISUAL_ID;
- }
- break;
- case LoopNodeEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) {
- return InputPinInLoopNodeAsVariableEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
- return OutputPinInLoopNodeAsResultEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
- return OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
- return OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID;
- }
- break;
- case ReadSelfActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
- return ReadSelfActionOutputPinEditPart.VISUAL_ID;
- }
- break;
- case ActivityEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getActivityParameterNode().isSuperTypeOf(domainElement.eClass())) {
- return ActivityParameterNodeEditPart.VISUAL_ID;
- }
- break;
- case CreateObjectActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
- return OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID;
- }
- break;
- case ReadStructuralFeatureActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) {
- return InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
- return OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID;
- }
- break;
- case AddStructuralFeatureValueActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3092(containerView, (InputPin) domainElement)) {
- return InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3093(containerView, (InputPin) domainElement)) {
- return InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
- return OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID;
- }
- break;
- case DestroyObjectActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3096(containerView, (InputPin) domainElement)) {
- return InputPinInDestroyObjectActionEditPart.VISUAL_ID;
- }
- break;
- case ReadVariableActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass()) && isOutputPin_3098(containerView, (OutputPin) domainElement)) {
- return OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID;
- }
- break;
- case AddVariableValueActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3100(containerView, (InputPin) domainElement)) {
- return InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3101(containerView, (InputPin) domainElement)) {
- return InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID;
- }
- break;
- case BroadcastSignalActionEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3103(containerView, (InputPin) domainElement)) {
- return InputPinInBroadcastSignalActionEditPart.VISUAL_ID;
- }
- break;
- case ActivityActivityParametersCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
- return ParameterEditPart.VISUAL_ID;
- }
- break;
- case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintInActivityAsPrecondEditPart.VISUAL_ID;
- }
- break;
- case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintInActivityAsPostcondEditPart.VISUAL_ID;
- }
- break;
- case ActivityActivityContentCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
- return InitialNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return ActivityFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return FlowFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
- return OpaqueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
- return CallBehaviorActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
- return CallOperationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
- return DecisionNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
- return MergeNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
- return ForkNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
- return JoinNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
- return DataStoreNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return SendObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return SendSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
- return AcceptEventActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
- return ValueSpecificationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
- return ConditionalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
- return ExpansionRegionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
- return LoopNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
- return SequenceNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
- return StructuredActivityNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivityPartition().isSuperTypeOf(domainElement.eClass())) {
- return ActivityPartitionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getInterruptibleActivityRegion().isSuperTypeOf(domainElement.eClass())) {
- return InterruptibleActivityRegionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadSelfActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
- return ActivityEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return CreateObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadStructuralFeatureActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return DestroyObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadVariableActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddVariableValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return BroadcastSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
- return CentralBufferNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintEditPartCN.VISUAL_ID;
- }
- break;
- case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
- return InitialNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return ActivityFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return FlowFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
- return OpaqueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
- return CallBehaviorActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
- return CallOperationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
- return DecisionNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
- return MergeNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
- return ForkNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
- return JoinNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
- return DataStoreNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return SendObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return SendSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
- return AcceptEventActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
- return ValueSpecificationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
- return ConditionalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
- return ExpansionRegionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
- return LoopNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
- return SequenceNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
- return StructuredActivityNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadSelfActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return CreateObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadStructuralFeatureActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return DestroyObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadVariableActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddVariableValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
- return CentralBufferNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintEditPartCN.VISUAL_ID;
- }
- break;
- case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
- return InitialNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return ActivityFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return FlowFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
- return OpaqueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
- return CallBehaviorActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
- return CallOperationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
- return DecisionNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
- return MergeNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
- return ForkNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
- return JoinNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
- return DataStoreNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return SendObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return SendSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
- return AcceptEventActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
- return ValueSpecificationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
- return ConditionalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
- return ExpansionRegionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
- return LoopNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
- return SequenceNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
- return StructuredActivityNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadSelfActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return CreateObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadStructuralFeatureActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return DestroyObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadVariableActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddVariableValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return BroadcastSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
- return CentralBufferNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintEditPartCN.VISUAL_ID;
- }
- break;
- case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
- return InitialNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return ActivityFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return FlowFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
- return OpaqueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
- return CallBehaviorActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
- return CallOperationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
- return DecisionNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
- return MergeNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
- return ForkNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
- return JoinNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
- return DataStoreNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return SendObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return SendSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
- return AcceptEventActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
- return ValueSpecificationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
- return ConditionalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
- return ExpansionRegionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
- return LoopNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
- return SequenceNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
- return StructuredActivityNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadSelfActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return CreateObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadStructuralFeatureActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return DestroyObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadVariableActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddVariableValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return BroadcastSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
- return CentralBufferNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintEditPartCN.VISUAL_ID;
- }
- break;
- case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
- return InitialNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return ActivityFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return FlowFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
- return OpaqueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
- return CallBehaviorActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
- return CallOperationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
- return DecisionNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
- return MergeNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
- return ForkNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
- return JoinNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
- return DataStoreNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return SendObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return SendSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
- return AcceptEventActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
- return ValueSpecificationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
- return ConditionalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
- return ExpansionRegionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
- return LoopNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
- return SequenceNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
- return StructuredActivityNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadSelfActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return CreateObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadStructuralFeatureActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return DestroyObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadVariableActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddVariableValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return BroadcastSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
- return CentralBufferNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintEditPartCN.VISUAL_ID;
- }
- break;
- case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
- return InitialNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return ActivityFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return FlowFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
- return OpaqueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
- return CallBehaviorActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
- return CallOperationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
- return DecisionNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
- return MergeNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
- return ForkNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
- return JoinNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
- return DataStoreNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return SendObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return SendSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
- return AcceptEventActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
- return ValueSpecificationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
- return ConditionalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
- return ExpansionRegionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
- return LoopNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
- return SequenceNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
- return StructuredActivityNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadSelfActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return CreateObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadStructuralFeatureActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return DestroyObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadVariableActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddVariableValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return BroadcastSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
- return CentralBufferNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintEditPartCN.VISUAL_ID;
- }
- break;
- case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
- return InitialNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return ActivityFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return FlowFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
- return OpaqueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
- return CallBehaviorActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
- return CallOperationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
- return DecisionNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
- return MergeNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
- return ForkNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
- return JoinNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
- return DataStoreNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return SendObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return SendSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
- return AcceptEventActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
- return ValueSpecificationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
- return ConditionalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
- return ExpansionRegionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
- return LoopNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
- return SequenceNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
- return StructuredActivityNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadSelfActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivityPartition().isSuperTypeOf(domainElement.eClass())) {
- return ActivityPartitionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return CreateObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadStructuralFeatureActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return DestroyObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadVariableActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddVariableValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return BroadcastSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
- return CentralBufferNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintEditPartCN.VISUAL_ID;
- }
- break;
- case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
- return InitialNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return ActivityFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return FlowFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
- return OpaqueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
- return CallBehaviorActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
- return CallOperationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
- return DecisionNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
- return MergeNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
- return ForkNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
- return JoinNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
- return DataStoreNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return SendObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return SendSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
- return AcceptEventActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
- return ValueSpecificationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
- return ConditionalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
- return ExpansionRegionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
- return LoopNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
- return SequenceNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
- return StructuredActivityNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadSelfActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return CreateObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadStructuralFeatureActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return DestroyObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadVariableActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddVariableValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return BroadcastSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
- return CentralBufferNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintEditPartCN.VISUAL_ID;
- }
- break;
- case ActivityCNParametersCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
- return ParameterEditPart.VISUAL_ID;
- }
- break;
- case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintInActivityAsPrecondEditPart.VISUAL_ID;
- }
- break;
- case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintInActivityAsPostcondEditPart.VISUAL_ID;
- }
- break;
- case ActivityCNContentCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
- return InitialNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return ActivityFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
- return FlowFinalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
- return OpaqueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
- return CallBehaviorActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
- return CallOperationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
- return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
- return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
- return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
- return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
- return DecisionNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
- return MergeNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
- return ForkNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
- return JoinNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
- return DataStoreNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return SendObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return SendSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
- return AcceptEventActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
- return ValueSpecificationActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
- return ConditionalNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
- return ExpansionRegionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
- return LoopNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
- return SequenceNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
- return StructuredActivityNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivityPartition().isSuperTypeOf(domainElement.eClass())) {
- return ActivityPartitionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getInterruptibleActivityRegion().isSuperTypeOf(domainElement.eClass())) {
- return InterruptibleActivityRegionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadSelfActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
- return ActivityEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return CreateObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadStructuralFeatureActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
- return DestroyObjectActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
- return ReadVariableActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
- return AddVariableValueActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
- return BroadcastSignalActionEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
- return CentralBufferNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getActivityParameterNode().isSuperTypeOf(domainElement.eClass())) {
- return ActivityParameterNodeEditPart.VISUAL_ID;
- }
- break;
- }
- return -1;
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isExpansionNode_3075(View containerView, ExpansionNode domainElement) {
- return isExpansionNode_3075(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isExpansionNode_3074(View containerView, ExpansionNode domainElement) {
- return isExpansionNode_3074(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isValuePin_3022(View containerView, ValuePin domainElement) {
- return isValuePin_3022(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isValuePin_3025(View containerView, ValuePin domainElement) {
- return isValuePin_3025(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isValuePin_3046(View containerView, ValuePin domainElement) {
- return isValuePin_3046(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isValuePin_3049(View containerView, ValuePin domainElement) {
- return isValuePin_3049(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isValuePin_3054(View containerView, ValuePin domainElement) {
- return isValuePin_3054(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isValuePin_3060(View containerView, ValuePin domainElement) {
- return isValuePin_3060(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isInputPin_3023(View containerView, InputPin domainElement) {
- return isInputPin_3023(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isInputPin_3027(View containerView, InputPin domainElement) {
- return isInputPin_3027(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isInputPin_3048(View containerView, InputPin domainElement) {
- return isInputPin_3048(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isInputPin_3051(View containerView, InputPin domainElement) {
- return isInputPin_3051(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isInputPin_3055(View containerView, InputPin domainElement) {
- return isInputPin_3055(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isInputPin_3062(View containerView, InputPin domainElement) {
- return isInputPin_3062(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isActionInputPin_3026(View containerView, ActionInputPin domainElement) {
- return isActionInputPin_3026(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isActionInputPin_3021(View containerView, ActionInputPin domainElement) {
- return isActionInputPin_3021(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isActionInputPin_3047(View containerView, ActionInputPin domainElement) {
- return isActionInputPin_3047(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isActionInputPin_3050(View containerView, ActionInputPin domainElement) {
- return isActionInputPin_3050(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isActionInputPin_3053(View containerView, ActionInputPin domainElement) {
- return isActionInputPin_3053(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isActionInputPin_3061(View containerView, ActionInputPin domainElement) {
- return isActionInputPin_3061(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isConstraint_3011(View containerView, Constraint domainElement) {
- return isConstraint_3011(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isConstraint_3012(View containerView, Constraint domainElement) {
- return isConstraint_3012(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isIntervalConstraint_3032(View containerView, IntervalConstraint domainElement) {
- return isIntervalConstraint_3032(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isIntervalConstraint_3033(View containerView, IntervalConstraint domainElement) {
- return isIntervalConstraint_3033(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isDurationConstraint_3034(View containerView, DurationConstraint domainElement) {
- return isDurationConstraint_3034(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isDurationConstraint_3035(View containerView, DurationConstraint domainElement) {
- return isDurationConstraint_3035(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isTimeConstraint_3036(View containerView, TimeConstraint domainElement) {
- return isTimeConstraint_3036(domainElement);
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isTimeConstraint_3037(View containerView, TimeConstraint domainElement) {
- return isTimeConstraint_3037(domainElement);
- }
-
- /**
- * @generated
- */
- public static boolean canCreateNode(View containerView, int nodeVisualID) {
- String containerModelID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getModelID(containerView);
- if (!ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) {
- return false;
- }
- int containerVisualID;
- if (ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) {
- containerVisualID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(containerView);
- } else {
- if (containerView instanceof Diagram) {
- containerVisualID = ActivityDiagramEditPart.VISUAL_ID;
- } else {
- return false;
- }
- }
- switch (containerVisualID) {
- case ActivityDiagramEditPart.VISUAL_ID:
- if (ActivityEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityEditPart.VISUAL_ID:
- if (ActivityNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityIsSingleExecutionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityActivityParametersCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityActivityContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityParameterNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InitialNodeEditPart.VISUAL_ID:
- if (InitialNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityFinalNodeEditPart.VISUAL_ID:
- if (ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case FlowFinalNodeEditPart.VISUAL_ID:
- if (FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case OpaqueActionEditPart.VISUAL_ID:
- if (OpaqueActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ValuePinInOpaqueActEditPart.VISUAL_ID:
- if (ValuePinInOActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInOActValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActionInputPinInOpaqueActEditPart.VISUAL_ID:
- if (ActionInputPinInOActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInOActValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInOpaqueActEditPart.VISUAL_ID:
- if (InputPinInOActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case OutputPinInOpaqueActEditPart.VISUAL_ID:
- if (OutputPinInOActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case CallBehaviorActionEditPart.VISUAL_ID:
- if (CallBehaviorActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInCallBeActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInCallBeActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInCallBeActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInCallBeActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ValuePinInCallBeActEditPart.VISUAL_ID:
- if (ValuePinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInCBActValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActionInputPinInCallBeActEditPart.VISUAL_ID:
- if (ActionInputPinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInCBActValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInCallBeActEditPart.VISUAL_ID:
- if (InputPinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case OutputPinInCallBeActEditPart.VISUAL_ID:
- if (OutputPinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case CallOperationActionEditPart.VISUAL_ID:
- if (CallOperationActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInCallOpActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInCallOpActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInCallOpActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInCallOpActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInCallOpActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInCallOpActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActionInputPinInCallOpActEditPart.VISUAL_ID:
- if (ActionInputPinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInCOActValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ValuePinInCallOpActEditPart.VISUAL_ID:
- if (ValuePinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInCOActValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInCallOpActEditPart.VISUAL_ID:
- if (InputPinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case OutputPinInCallOpActEditPart.VISUAL_ID:
- if (OutputPinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID:
- if (ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInCOActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID:
- if (ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInCallOpActAsTargetEditPart.VISUAL_ID:
- if (InputPinInCOActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID:
- if (DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID:
- if (DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID:
- if (TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID:
- if (TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID:
- if (IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID:
- if (IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ConstraintAsLocalPrecondEditPart.VISUAL_ID:
- if (ConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ConstraintAsLocalPostcondEditPart.VISUAL_ID:
- if (ConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DecisionNodeEditPart.VISUAL_ID:
- if (DecisionInputEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DecisionNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case MergeNodeEditPart.VISUAL_ID:
- if (MergeNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ForkNodeEditPart.VISUAL_ID:
- if (ForkNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case JoinNodeEditPart.VISUAL_ID:
- if (JoinSpecEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (JoinNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DataStoreNodeEditPart.VISUAL_ID:
- if (DataStoreNodeLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DataStoreSelectionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case SendObjectActionEditPart.VISUAL_ID:
- if (SendObjectActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInSendObjActAsReqEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInSendObjActAsReqEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInSendObjActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInSendObjActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ValuePinInSendObjActAsReqEditPart.VISUAL_ID:
- if (ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID:
- if (ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInSendObjActAsReqEditPart.VISUAL_ID:
- if (InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID:
- if (ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID:
- if (ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInSendObjActAsTargetEditPart.VISUAL_ID:
- if (InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case SendSignalActionEditPart.VISUAL_ID:
- if (SendSignalActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInSendSigActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInSendSigActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInSendSigActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInSendSigActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInSendSigActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActionInputPinInSendSigActEditPart.VISUAL_ID:
- if (ActionInputPinInSendSigActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInSendSigActValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ValuePinInSendSigActEditPart.VISUAL_ID:
- if (ValuePinInSendSigActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInSendSigActValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInSendSigActEditPart.VISUAL_ID:
- if (InputPinInSendSigActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID:
- if (ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID:
- if (ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInSendSigActAsTargetEditPart.VISUAL_ID:
- if (InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityParameterNodeEditPart.VISUAL_ID:
- if (ParameterNodeNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case AcceptEventActionEditPart.VISUAL_ID:
- if (AcceptEventActionLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AcceptTimeEventActionLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInAcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case OutputPinInAcceptEventActionEditPart.VISUAL_ID:
- if (OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ValueSpecificationActionEditPart.VISUAL_ID:
- if (ValueSpecificationActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInValSpecActEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case OutputPinInValSpecActEditPart.VISUAL_ID:
- if (OutputPinInValSpecActLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ConditionalNodeEditPart.VISUAL_ID:
- if (ConditionalNodeKeywordEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ExpansionRegionEditPart.VISUAL_ID:
- if (ExpansionRegionKeywordEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExpansionNodeAsInEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExpansionNodeAsOutEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case LoopNodeEditPart.VISUAL_ID:
- if (LoopNodeKeywordEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInLoopNodeAsVariableEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInLoopNodeAsResultEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID:
- if (OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID:
- if (OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID:
- if (OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case SequenceNodeEditPart.VISUAL_ID:
- if (SequenceNodeKeywordEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case StructuredActivityNodeEditPart.VISUAL_ID:
- if (StructuredActivityNodeKeywordEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID:
- if (InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityPartitionEditPart.VISUAL_ID:
- if (ActivityPartitionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InterruptibleActivityRegionEditPart.VISUAL_ID:
- if (InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case CommentEditPartCN.VISUAL_ID:
- if (CommentBodyLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ReadSelfActionEditPart.VISUAL_ID:
- if (ReadSelfActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadSelfActionOutputPinEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ReadSelfActionOutputPinEditPart.VISUAL_ID:
- if (OutputPinInReadSelfActionLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityEditPartCN.VISUAL_ID:
- if (ActivityNameEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityIsSingleExecutionCNEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityCNParametersCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityCNContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityParameterNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case CreateObjectActionEditPart.VISUAL_ID:
- if (CreateObjectActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID:
- if (OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ShapeNamedElementEditPart.VISUAL_ID:
- if (ShapeNamedElementNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ReadStructuralFeatureActionEditPart.VISUAL_ID:
- if (ReadStructuralFeatureActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID:
- if (InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID:
- if (OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case AddStructuralFeatureValueActionEditPart.VISUAL_ID:
- if (AddStructuralFeatureValueActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID:
- if (InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID:
- if (InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID:
- if (OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DestroyObjectActionEditPart.VISUAL_ID:
- if (DestroyObjectActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInDestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInDestroyObjectActionEditPart.VISUAL_ID:
- if (InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ReadVariableActionEditPart.VISUAL_ID:
- if (ReadVariableActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID:
- if (OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case AddVariableValueActionEditPart.VISUAL_ID:
- if (AddVariableValueActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID:
- if (InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID:
- if (InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case BroadcastSignalActionEditPart.VISUAL_ID:
- if (BroadcastSignalActionNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInBroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InputPinInBroadcastSignalActionEditPart.VISUAL_ID:
- if (InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case CentralBufferNodeEditPart.VISUAL_ID:
- if (CentralBufferNodeLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CentralBufferNodeSelectionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ConstraintEditPartCN.VISUAL_ID:
- if (ConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintBodyEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityActivityParametersCompartmentEditPart.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID:
- if (ConstraintInActivityAsPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID:
- if (ConstraintInActivityAsPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityActivityContentCompartmentEditPart.VISUAL_ID:
- if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityPartitionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InterruptibleActivityRegionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID:
- if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityPartitionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID:
- if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityCNParametersCompartmentEditPart.VISUAL_ID:
- if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID:
- if (ConstraintInActivityAsPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID:
- if (ConstraintInActivityAsPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ActivityCNContentCompartmentEditPart.VISUAL_ID:
- if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityPartitionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (InterruptibleActivityRegionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ActivityParameterNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ObjectFlowEditPart.VISUAL_ID:
- if (ObjectFlowNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ObjectFlowWeightEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ObjectFlowSelectionEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ObjectFlowTransformationEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DecisionInputFlowEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ObjectFlowGuardEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ObjectFlowAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ObjectFlowInterruptibleIconEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ControlFlowEditPart.VISUAL_ID:
- if (ControlFlowNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ControlFlowWeightEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ControlFlowGuardEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ControlFlowAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ControlFlowInterruptibleIconEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ExceptionHandlerEditPart.VISUAL_ID:
- if (ExceptionHandlerTypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExceptionHandlerIconEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- }
- return false;
- }
-
- /**
- * @generated
- */
- public static int getLinkWithClassVisualID(EObject domainElement) {
- if (domainElement == null) {
- return -1;
- }
- if (UMLPackage.eINSTANCE.getObjectFlow().isSuperTypeOf(domainElement.eClass())) {
- return ObjectFlowEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getControlFlow().isSuperTypeOf(domainElement.eClass())) {
- return ControlFlowEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExceptionHandler().isSuperTypeOf(domainElement.eClass())) {
- return ExceptionHandlerEditPart.VISUAL_ID;
- }
- return -1;
- }
-
- /**
- * User can change implementation of this method to handle some specific
- * situations not covered by default logic.
- *
- * @generated
- */
- private static boolean isDiagram(Package element) {
- return true;
- }
-
- /**
- * @generated
- */
- private static boolean isActionInputPin_3021(ActionInputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isValuePin_3022(ValuePin domainElement) {
- Object result = UMLOCLFactory.getExpression(1, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isInputPin_3023(InputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(2, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isValuePin_3025(ValuePin domainElement) {
- Object result = UMLOCLFactory.getExpression(3, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isActionInputPin_3026(ActionInputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(4, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isInputPin_3027(InputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(5, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isConstraint_3011(Constraint domainElement) {
- Object result = UMLOCLFactory.getExpression(12, UMLPackage.eINSTANCE.getConstraint(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isConstraint_3012(Constraint domainElement) {
- Object result = UMLOCLFactory.getExpression(13, UMLPackage.eINSTANCE.getConstraint(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isValuePin_3046(ValuePin domainElement) {
- Object result = UMLOCLFactory.getExpression(14, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isActionInputPin_3047(ActionInputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(15, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isInputPin_3048(InputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(16, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isValuePin_3049(ValuePin domainElement) {
- Object result = UMLOCLFactory.getExpression(17, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isActionInputPin_3050(ActionInputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(18, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isInputPin_3051(InputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(19, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isActionInputPin_3053(ActionInputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(20, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isValuePin_3054(ValuePin domainElement) {
- Object result = UMLOCLFactory.getExpression(21, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isInputPin_3055(InputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(22, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isValuePin_3060(ValuePin domainElement) {
- Object result = UMLOCLFactory.getExpression(23, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isActionInputPin_3061(ActionInputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(24, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isInputPin_3062(InputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(25, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isExpansionNode_3074(ExpansionNode domainElement) {
- Object result = UMLOCLFactory.getExpression(26, UMLPackage.eINSTANCE.getExpansionNode(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isExpansionNode_3075(ExpansionNode domainElement) {
- Object result = UMLOCLFactory.getExpression(27, UMLPackage.eINSTANCE.getExpansionNode(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * Redirect call to defined method
- *
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isInputPin_3092(View containerView, InputPin domainElement) {
- return isInputPin_3092(domainElement);
- }
-
- /**
- * @generated
- */
- private static boolean isInputPin_3092(InputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(29, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isInputPin_3093(View containerView, InputPin domainElement) {
- return isInputPin_3093(domainElement);
- }
-
- /**
- * @generated
- */
- private static boolean isInputPin_3093(InputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(30, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isInputPin_3096(View containerView, InputPin domainElement) {
- return isInputPin_3096(domainElement);
- }
-
- /**
- * @generated
- */
- private static boolean isInputPin_3096(InputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(31, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isOutputPin_3098(View containerView, OutputPin domainElement) {
- return isOutputPin_3098(domainElement);
- }
-
- /**
- * @generated
- */
- private static boolean isOutputPin_3098(OutputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(32, UMLPackage.eINSTANCE.getOutputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isInputPin_3100(View containerView, InputPin domainElement) {
- return isInputPin_3100(domainElement);
- }
-
- /**
- * @generated
- */
- private static boolean isInputPin_3100(InputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(33, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isInputPin_3101(View containerView, InputPin domainElement) {
- return isInputPin_3101(domainElement);
- }
-
- /**
- * @generated
- */
- private static boolean isInputPin_3101(InputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(34, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated NOT (method generation is missing or generated calls are incorrect)
- */
- private static boolean isInputPin_3103(View containerView, InputPin domainElement) {
- return isInputPin_3103(domainElement);
- }
-
- /**
- * @generated
- */
- private static boolean isInputPin_3103(InputPin domainElement) {
- Object result = UMLOCLFactory.getExpression(35, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- public static boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
- if (candidate == -1) {
- // unrecognized id is always bad
- return false;
- }
- int basic = getNodeVisualID(containerView, domainElement);
- return basic == candidate;
- }
-
- /**
- * @generated
- */
- public static boolean isCompartmentVisualID(int visualID) {
- switch (visualID) {
- case ActivityActivityParametersCompartmentEditPart.VISUAL_ID:
- case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID:
- case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID:
- case ActivityActivityContentCompartmentEditPart.VISUAL_ID:
- case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
- case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID:
- case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID:
- case ActivityCNParametersCompartmentEditPart.VISUAL_ID:
- case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID:
- case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID:
- case ActivityCNContentCompartmentEditPart.VISUAL_ID:
- return true;
- default:
- break;
- }
- return false;
- }
-
- /**
- * @generated
- */
- public static boolean isSemanticLeafVisualID(int visualID) {
- switch (visualID) {
- case ActivityDiagramEditPart.VISUAL_ID:
- return false;
- case ParameterEditPart.VISUAL_ID:
- case ConstraintInActivityAsPrecondEditPart.VISUAL_ID:
- case ConstraintInActivityAsPostcondEditPart.VISUAL_ID:
- case InitialNodeEditPart.VISUAL_ID:
- case ActivityFinalNodeEditPart.VISUAL_ID:
- case FlowFinalNodeEditPart.VISUAL_ID:
- case ConstraintAsLocalPrecondEditPart.VISUAL_ID:
- case ConstraintAsLocalPostcondEditPart.VISUAL_ID:
- case InputPinInOpaqueActEditPart.VISUAL_ID:
- case OutputPinInOpaqueActEditPart.VISUAL_ID:
- case ValuePinInOpaqueActEditPart.VISUAL_ID:
- case ActionInputPinInOpaqueActEditPart.VISUAL_ID:
- case ValuePinInCallBeActEditPart.VISUAL_ID:
- case ActionInputPinInCallBeActEditPart.VISUAL_ID:
- case InputPinInCallBeActEditPart.VISUAL_ID:
- case OutputPinInCallBeActEditPart.VISUAL_ID:
- case ActionInputPinInCallOpActEditPart.VISUAL_ID:
- case ValuePinInCallOpActEditPart.VISUAL_ID:
- case InputPinInCallOpActEditPart.VISUAL_ID:
- case OutputPinInCallOpActEditPart.VISUAL_ID:
- case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID:
- case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID:
- case InputPinInCallOpActAsTargetEditPart.VISUAL_ID:
- case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID:
- case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID:
- case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID:
- case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID:
- case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID:
- case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID:
- case DecisionNodeEditPart.VISUAL_ID:
- case MergeNodeEditPart.VISUAL_ID:
- case ForkNodeEditPart.VISUAL_ID:
- case JoinNodeEditPart.VISUAL_ID:
- case ValuePinInSendObjActAsReqEditPart.VISUAL_ID:
- case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID:
- case InputPinInSendObjActAsReqEditPart.VISUAL_ID:
- case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID:
- case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID:
- case InputPinInSendObjActAsTargetEditPart.VISUAL_ID:
- case ActionInputPinInSendSigActEditPart.VISUAL_ID:
- case ValuePinInSendSigActEditPart.VISUAL_ID:
- case InputPinInSendSigActEditPart.VISUAL_ID:
- case ActivityParameterNodeEditPart.VISUAL_ID:
- case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID:
- case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID:
- case InputPinInSendSigActAsTargetEditPart.VISUAL_ID:
- case OutputPinInAcceptEventActionEditPart.VISUAL_ID:
- case ExpansionNodeAsInEditPart.VISUAL_ID:
- case ExpansionNodeAsOutEditPart.VISUAL_ID:
- case OutputPinInValSpecActEditPart.VISUAL_ID:
- case DataStoreNodeEditPart.VISUAL_ID:
- case CommentEditPartCN.VISUAL_ID:
- case ReadSelfActionOutputPinEditPart.VISUAL_ID:
- case ShapeNamedElementEditPart.VISUAL_ID:
- case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID:
- case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID:
- case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID:
- case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID:
- case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID:
- case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID:
- case InputPinInDestroyObjectActionEditPart.VISUAL_ID:
- case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID:
- case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID:
- case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID:
- case InputPinInBroadcastSignalActionEditPart.VISUAL_ID:
- case CentralBufferNodeEditPart.VISUAL_ID:
- case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID:
- case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID:
- case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID:
- case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID:
- case ConstraintEditPartCN.VISUAL_ID:
- return true;
- default:
- break;
- }
- return false;
- }
-
- /**
- * @generated
- */
- public static final DiagramStructure TYPED_INSTANCE = new DiagramStructure() {
-
- /**
- * @generated
- */
- @Override
- public int getVisualID(View view) {
- return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getModelID(View view) {
- return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getModelID(view);
- }
-
- /**
- * @generated
- */
- @Override
- public int getNodeVisualID(View containerView, EObject domainElement) {
- return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
- return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.checkNodeVisualID(containerView, domainElement, candidate);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean isCompartmentVisualID(int visualID) {
- return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.isCompartmentVisualID(visualID);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean isSemanticLeafVisualID(int visualID) {
- return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.isSemanticLeafVisualID(visualID);
- }
- };
-
- /**
- * @generated
- */
- private static boolean isIntervalConstraint_3032(IntervalConstraint domainElement) {
- Object result = UMLOCLFactory.getExpression(10, UMLPackage.eINSTANCE.getIntervalConstraint(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isIntervalConstraint_3033(IntervalConstraint domainElement) {
- Object result = UMLOCLFactory.getExpression(11, UMLPackage.eINSTANCE.getIntervalConstraint(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isDurationConstraint_3034(DurationConstraint domainElement) {
- Object result = UMLOCLFactory.getExpression(6, UMLPackage.eINSTANCE.getDurationConstraint(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isDurationConstraint_3035(DurationConstraint domainElement) {
- Object result = UMLOCLFactory.getExpression(7, UMLPackage.eINSTANCE.getDurationConstraint(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isTimeConstraint_3036(TimeConstraint domainElement) {
- Object result = UMLOCLFactory.getExpression(8, UMLPackage.eINSTANCE.getTimeConstraint(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-
- /**
- * @generated
- */
- private static boolean isTimeConstraint_3037(TimeConstraint domainElement) {
- Object result = UMLOCLFactory.getExpression(9, UMLPackage.eINSTANCE.getTimeConstraint(), null).evaluate(domainElement);
- return result instanceof Boolean && ((Boolean) result).booleanValue();
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.part;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.structure.DiagramStructure;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.*;
+import org.eclipse.papyrus.uml.diagram.activity.expressions.UMLOCLFactory;
+import org.eclipse.uml2.uml.ActionInputPin;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.DurationConstraint;
+import org.eclipse.uml2.uml.ExpansionNode;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.IntervalConstraint;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.TimeConstraint;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.ValuePin;
+
+/**
+ * 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 {
+
+ /**
+ * @generated
+ */
+ private static final String DEBUG_KEY = "org.eclipse.papyrus.uml.diagram.activity/debug/visualID"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static int getVisualID(View view) {
+ if (view instanceof Diagram) {
+ if (ActivityDiagramEditPart.MODEL_ID.equals(view.getType())) {
+ return ActivityDiagramEditPart.VISUAL_ID;
+ } else {
+ return -1;
+ }
+ }
+ return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(view.getType());
+ }
+
+ /**
+ * @generated
+ */
+ public static String getModelID(View view) {
+ View diagram = view.getDiagram();
+ while (view != diagram) {
+ EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+ if (annotation != null) {
+ return annotation.getDetails().get("modelID"); //$NON-NLS-1$
+ }
+ view = (View) view.eContainer();
+ }
+ return diagram != null ? diagram.getType() : null;
+ }
+
+ /**
+ * @generated
+ */
+ public static int getVisualID(String type) {
+ try {
+ return Integer.parseInt(type);
+ } catch (NumberFormatException e) {
+ if (Boolean.TRUE.toString().equalsIgnoreCase(Platform.getDebugOption(DEBUG_KEY))) {
+ UMLDiagramEditorPlugin.getInstance().logError("Unable to parse view type as a visualID number: " + type);
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * @generated
+ */
+ public static String getType(int visualID) {
+ return Integer.toString(visualID);
+ }
+
+ public static int getDiagramVisualID(EObject domainElement) {
+ return ActivityDiagramEditPart.VISUAL_ID;
+ }
+
+ /**
+ * @generated
+ */
+ public static int getNodeVisualID(View containerView, EObject domainElement) {
+ if (domainElement == null) {
+ return -1;
+ }
+ String containerModelID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getModelID(containerView);
+ if (!ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) {
+ return -1;
+ }
+ int containerVisualID;
+ if (ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) {
+ containerVisualID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(containerView);
+ } else {
+ if (containerView instanceof Diagram) {
+ containerVisualID = ActivityDiagramEditPart.VISUAL_ID;
+ } else {
+ return -1;
+ }
+ }
+ switch (containerVisualID) {
+ case ActivityDiagramEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityEditPart.VISUAL_ID;
+ }
+ break;
+ case ActivityEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getActivityParameterNode().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityParameterNodeEditPart.VISUAL_ID;
+ }
+ break;
+ case OpaqueActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass())) {
+ return ValuePinInOpaqueActEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass())) {
+ return ActionInputPinInOpaqueActEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) {
+ return InputPinInOpaqueActEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
+ return OutputPinInOpaqueActEditPart.VISUAL_ID;
+ }
+ break;
+ case CallBehaviorActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass())) {
+ return ValuePinInCallBeActEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass())) {
+ return ActionInputPinInCallBeActEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) {
+ return InputPinInCallBeActEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
+ return OutputPinInCallBeActEditPart.VISUAL_ID;
+ }
+ break;
+ case CallOperationActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3021(containerView, (ActionInputPin) domainElement)) {
+ return ActionInputPinInCallOpActEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3022(containerView, (ValuePin) domainElement)) {
+ return ValuePinInCallOpActEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3023(containerView, (InputPin) domainElement)) {
+ return InputPinInCallOpActEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
+ return OutputPinInCallOpActEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3025(containerView, (ValuePin) domainElement)) {
+ return ValuePinInCallOpActAsTargetEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3026(containerView, (ActionInputPin) domainElement)) {
+ return ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3027(containerView, (InputPin) domainElement)) {
+ return InputPinInCallOpActAsTargetEditPart.VISUAL_ID;
+ }
+ break;
+ case SendObjectActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3046(containerView, (ValuePin) domainElement)) {
+ return ValuePinInSendObjActAsReqEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3047(containerView, (ActionInputPin) domainElement)) {
+ return ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3048(containerView, (InputPin) domainElement)) {
+ return InputPinInSendObjActAsReqEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3049(containerView, (ValuePin) domainElement)) {
+ return ValuePinInSendObjActAsTargetEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3050(containerView, (ActionInputPin) domainElement)) {
+ return ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3051(containerView, (InputPin) domainElement)) {
+ return InputPinInSendObjActAsTargetEditPart.VISUAL_ID;
+ }
+ break;
+ case SendSignalActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3053(containerView, (ActionInputPin) domainElement)) {
+ return ActionInputPinInSendSigActEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3054(containerView, (ValuePin) domainElement)) {
+ return ValuePinInSendSigActEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3055(containerView, (InputPin) domainElement)) {
+ return InputPinInSendSigActEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValuePin().isSuperTypeOf(domainElement.eClass()) && isValuePin_3060(containerView, (ValuePin) domainElement)) {
+ return ValuePinInSendSigActAsTargetEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActionInputPin().isSuperTypeOf(domainElement.eClass()) && isActionInputPin_3061(containerView, (ActionInputPin) domainElement)) {
+ return ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3062(containerView, (InputPin) domainElement)) {
+ return InputPinInSendSigActAsTargetEditPart.VISUAL_ID;
+ }
+ break;
+ case AcceptEventActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
+ return OutputPinInAcceptEventActionEditPart.VISUAL_ID;
+ }
+ break;
+ case ValueSpecificationActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
+ return OutputPinInValSpecActEditPart.VISUAL_ID;
+ }
+ break;
+ case ExpansionRegionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getExpansionNode().isSuperTypeOf(domainElement.eClass()) && isExpansionNode_3074(containerView, (ExpansionNode) domainElement)) {
+ return ExpansionNodeAsInEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExpansionNode().isSuperTypeOf(domainElement.eClass()) && isExpansionNode_3075(containerView, (ExpansionNode) domainElement)) {
+ return ExpansionNodeAsOutEditPart.VISUAL_ID;
+ }
+ break;
+ case LoopNodeEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) {
+ return InputPinInLoopNodeAsVariableEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
+ return OutputPinInLoopNodeAsResultEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
+ return OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
+ return OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID;
+ }
+ break;
+ case ReadSelfActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
+ return ReadSelfActionOutputPinEditPart.VISUAL_ID;
+ }
+ break;
+ case ActivityEditPartCN.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getActivityParameterNode().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityParameterNodeEditPart.VISUAL_ID;
+ }
+ break;
+ case CreateObjectActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
+ return OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID;
+ }
+ break;
+ case ReadStructuralFeatureActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass())) {
+ return InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
+ return OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID;
+ }
+ break;
+ case AddStructuralFeatureValueActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3092(containerView, (InputPin) domainElement)) {
+ return InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3093(containerView, (InputPin) domainElement)) {
+ return InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass())) {
+ return OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID;
+ }
+ break;
+ case DestroyObjectActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3096(containerView, (InputPin) domainElement)) {
+ return InputPinInDestroyObjectActionEditPart.VISUAL_ID;
+ }
+ break;
+ case ReadVariableActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getOutputPin().isSuperTypeOf(domainElement.eClass()) && isOutputPin_3098(containerView, (OutputPin) domainElement)) {
+ return OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID;
+ }
+ break;
+ case AddVariableValueActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3100(containerView, (InputPin) domainElement)) {
+ return InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3101(containerView, (InputPin) domainElement)) {
+ return InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID;
+ }
+ break;
+ case BroadcastSignalActionEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInputPin().isSuperTypeOf(domainElement.eClass()) && isInputPin_3103(containerView, (InputPin) domainElement)) {
+ return InputPinInBroadcastSignalActionEditPart.VISUAL_ID;
+ }
+ break;
+ case ActivityActivityParametersCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ return ParameterEditPart.VISUAL_ID;
+ }
+ break;
+ case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintInActivityAsPrecondEditPart.VISUAL_ID;
+ }
+ break;
+ case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintInActivityAsPostcondEditPart.VISUAL_ID;
+ }
+ break;
+ case ActivityActivityContentCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
+ return InitialNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return FlowFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
+ return OpaqueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallBehaviorActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallOperationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
+ return DecisionNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
+ return MergeNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
+ return ForkNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
+ return JoinNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
+ return DataStoreNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
+ return AcceptEventActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
+ return ValueSpecificationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ConditionalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
+ return ExpansionRegionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
+ return LoopNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
+ return SequenceNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
+ return StructuredActivityNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivityPartition().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityPartitionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getInterruptibleActivityRegion().isSuperTypeOf(domainElement.eClass())) {
+ return InterruptibleActivityRegionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadSelfActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return CreateObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadStructuralFeatureActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return DestroyObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadVariableActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddVariableValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return BroadcastSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
+ return CentralBufferNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintEditPartCN.VISUAL_ID;
+ }
+ break;
+ case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
+ return InitialNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return FlowFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
+ return OpaqueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallBehaviorActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallOperationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
+ return DecisionNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
+ return MergeNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
+ return ForkNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
+ return JoinNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
+ return DataStoreNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
+ return AcceptEventActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
+ return ValueSpecificationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ConditionalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
+ return ExpansionRegionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
+ return LoopNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
+ return SequenceNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
+ return StructuredActivityNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadSelfActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return CreateObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadStructuralFeatureActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return DestroyObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadVariableActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddVariableValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
+ return CentralBufferNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintEditPartCN.VISUAL_ID;
+ }
+ break;
+ case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
+ return InitialNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return FlowFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
+ return OpaqueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallBehaviorActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallOperationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
+ return DecisionNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
+ return MergeNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
+ return ForkNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
+ return JoinNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
+ return DataStoreNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
+ return AcceptEventActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
+ return ValueSpecificationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ConditionalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
+ return ExpansionRegionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
+ return LoopNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
+ return SequenceNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
+ return StructuredActivityNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadSelfActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return CreateObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadStructuralFeatureActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return DestroyObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadVariableActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddVariableValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return BroadcastSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
+ return CentralBufferNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintEditPartCN.VISUAL_ID;
+ }
+ break;
+ case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
+ return InitialNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return FlowFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
+ return OpaqueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallBehaviorActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallOperationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
+ return DecisionNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
+ return MergeNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
+ return ForkNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
+ return JoinNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
+ return DataStoreNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
+ return AcceptEventActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
+ return ValueSpecificationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ConditionalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
+ return ExpansionRegionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
+ return LoopNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
+ return SequenceNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
+ return StructuredActivityNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadSelfActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return CreateObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadStructuralFeatureActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return DestroyObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadVariableActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddVariableValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return BroadcastSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
+ return CentralBufferNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintEditPartCN.VISUAL_ID;
+ }
+ break;
+ case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
+ return InitialNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return FlowFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
+ return OpaqueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallBehaviorActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallOperationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
+ return DecisionNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
+ return MergeNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
+ return ForkNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
+ return JoinNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
+ return DataStoreNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
+ return AcceptEventActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
+ return ValueSpecificationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ConditionalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
+ return ExpansionRegionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
+ return LoopNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
+ return SequenceNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
+ return StructuredActivityNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadSelfActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return CreateObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadStructuralFeatureActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return DestroyObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadVariableActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddVariableValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return BroadcastSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
+ return CentralBufferNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintEditPartCN.VISUAL_ID;
+ }
+ break;
+ case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
+ return InitialNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return FlowFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
+ return OpaqueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallBehaviorActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallOperationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
+ return DecisionNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
+ return MergeNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
+ return ForkNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
+ return JoinNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
+ return DataStoreNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
+ return AcceptEventActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
+ return ValueSpecificationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ConditionalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
+ return ExpansionRegionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
+ return LoopNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
+ return SequenceNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
+ return StructuredActivityNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadSelfActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return CreateObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadStructuralFeatureActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return DestroyObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadVariableActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddVariableValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return BroadcastSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
+ return CentralBufferNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintEditPartCN.VISUAL_ID;
+ }
+ break;
+ case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
+ return InitialNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return FlowFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
+ return OpaqueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallBehaviorActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallOperationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
+ return DecisionNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
+ return MergeNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
+ return ForkNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
+ return JoinNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
+ return DataStoreNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
+ return AcceptEventActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
+ return ValueSpecificationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ConditionalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
+ return ExpansionRegionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
+ return LoopNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
+ return SequenceNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
+ return StructuredActivityNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadSelfActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivityPartition().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityPartitionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return CreateObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadStructuralFeatureActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return DestroyObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadVariableActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddVariableValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return BroadcastSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
+ return CentralBufferNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintEditPartCN.VISUAL_ID;
+ }
+ break;
+ case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
+ return InitialNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return FlowFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
+ return OpaqueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallBehaviorActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallOperationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
+ return DecisionNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
+ return MergeNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
+ return ForkNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
+ return JoinNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
+ return DataStoreNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
+ return AcceptEventActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
+ return ValueSpecificationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ConditionalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
+ return ExpansionRegionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
+ return LoopNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
+ return SequenceNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
+ return StructuredActivityNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadSelfActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return CreateObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadStructuralFeatureActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return DestroyObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadVariableActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddVariableValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return BroadcastSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
+ return CentralBufferNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintEditPartCN.VISUAL_ID;
+ }
+ break;
+ case ActivityCNParametersCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getParameter().isSuperTypeOf(domainElement.eClass())) {
+ return ParameterEditPart.VISUAL_ID;
+ }
+ break;
+ case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintInActivityAsPrecondEditPart.VISUAL_ID;
+ }
+ break;
+ case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintInActivityAsPostcondEditPart.VISUAL_ID;
+ }
+ break;
+ case ActivityCNContentCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getInitialNode().isSuperTypeOf(domainElement.eClass())) {
+ return InitialNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivityFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getFlowFinalNode().isSuperTypeOf(domainElement.eClass())) {
+ return FlowFinalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getOpaqueAction().isSuperTypeOf(domainElement.eClass())) {
+ return OpaqueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallBehaviorAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallBehaviorActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCallOperationAction().isSuperTypeOf(domainElement.eClass())) {
+ return CallOperationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3034(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDurationConstraint().isSuperTypeOf(domainElement.eClass()) && isDurationConstraint_3035(containerView, (DurationConstraint) domainElement)) {
+ return DurationConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3036(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getTimeConstraint().isSuperTypeOf(domainElement.eClass()) && isTimeConstraint_3037(containerView, (TimeConstraint) domainElement)) {
+ return TimeConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3032(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getIntervalConstraint().isSuperTypeOf(domainElement.eClass()) && isIntervalConstraint_3033(containerView, (IntervalConstraint) domainElement)) {
+ return IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3011(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPrecondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass()) && isConstraint_3012(containerView, (Constraint) domainElement)) {
+ return ConstraintAsLocalPostcondEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDecisionNode().isSuperTypeOf(domainElement.eClass())) {
+ return DecisionNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getMergeNode().isSuperTypeOf(domainElement.eClass())) {
+ return MergeNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getForkNode().isSuperTypeOf(domainElement.eClass())) {
+ return ForkNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getJoinNode().isSuperTypeOf(domainElement.eClass())) {
+ return JoinNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDataStoreNode().isSuperTypeOf(domainElement.eClass())) {
+ return DataStoreNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSendSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return SendSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAcceptEventAction().isSuperTypeOf(domainElement.eClass())) {
+ return AcceptEventActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getValueSpecificationAction().isSuperTypeOf(domainElement.eClass())) {
+ return ValueSpecificationActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConditionalNode().isSuperTypeOf(domainElement.eClass())) {
+ return ConditionalNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExpansionRegion().isSuperTypeOf(domainElement.eClass())) {
+ return ExpansionRegionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getLoopNode().isSuperTypeOf(domainElement.eClass())) {
+ return LoopNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getSequenceNode().isSuperTypeOf(domainElement.eClass())) {
+ return SequenceNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getStructuredActivityNode().isSuperTypeOf(domainElement.eClass())) {
+ return StructuredActivityNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivityPartition().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityPartitionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getInterruptibleActivityRegion().isSuperTypeOf(domainElement.eClass())) {
+ return InterruptibleActivityRegionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadSelfAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadSelfActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivity().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCreateObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return CreateObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadStructuralFeatureAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadStructuralFeatureActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddStructuralFeatureValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDestroyObjectAction().isSuperTypeOf(domainElement.eClass())) {
+ return DestroyObjectActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getReadVariableAction().isSuperTypeOf(domainElement.eClass())) {
+ return ReadVariableActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getAddVariableValueAction().isSuperTypeOf(domainElement.eClass())) {
+ return AddVariableValueActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getBroadcastSignalAction().isSuperTypeOf(domainElement.eClass())) {
+ return BroadcastSignalActionEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getCentralBufferNode().isSuperTypeOf(domainElement.eClass())) {
+ return CentralBufferNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getActivityParameterNode().isSuperTypeOf(domainElement.eClass())) {
+ return ActivityParameterNodeEditPart.VISUAL_ID;
+ }
+ break;
+ }
+ return -1;
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isExpansionNode_3075(View containerView, ExpansionNode domainElement) {
+ return isExpansionNode_3075(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isExpansionNode_3074(View containerView, ExpansionNode domainElement) {
+ return isExpansionNode_3074(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isValuePin_3022(View containerView, ValuePin domainElement) {
+ return isValuePin_3022(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isValuePin_3025(View containerView, ValuePin domainElement) {
+ return isValuePin_3025(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isValuePin_3046(View containerView, ValuePin domainElement) {
+ return isValuePin_3046(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isValuePin_3049(View containerView, ValuePin domainElement) {
+ return isValuePin_3049(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isValuePin_3054(View containerView, ValuePin domainElement) {
+ return isValuePin_3054(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isValuePin_3060(View containerView, ValuePin domainElement) {
+ return isValuePin_3060(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isInputPin_3023(View containerView, InputPin domainElement) {
+ return isInputPin_3023(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isInputPin_3027(View containerView, InputPin domainElement) {
+ return isInputPin_3027(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isInputPin_3048(View containerView, InputPin domainElement) {
+ return isInputPin_3048(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isInputPin_3051(View containerView, InputPin domainElement) {
+ return isInputPin_3051(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isInputPin_3055(View containerView, InputPin domainElement) {
+ return isInputPin_3055(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isInputPin_3062(View containerView, InputPin domainElement) {
+ return isInputPin_3062(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isActionInputPin_3026(View containerView, ActionInputPin domainElement) {
+ return isActionInputPin_3026(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isActionInputPin_3021(View containerView, ActionInputPin domainElement) {
+ return isActionInputPin_3021(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isActionInputPin_3047(View containerView, ActionInputPin domainElement) {
+ return isActionInputPin_3047(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isActionInputPin_3050(View containerView, ActionInputPin domainElement) {
+ return isActionInputPin_3050(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isActionInputPin_3053(View containerView, ActionInputPin domainElement) {
+ return isActionInputPin_3053(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isActionInputPin_3061(View containerView, ActionInputPin domainElement) {
+ return isActionInputPin_3061(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isConstraint_3011(View containerView, Constraint domainElement) {
+ return isConstraint_3011(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isConstraint_3012(View containerView, Constraint domainElement) {
+ return isConstraint_3012(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isIntervalConstraint_3032(View containerView, IntervalConstraint domainElement) {
+ return isIntervalConstraint_3032(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isIntervalConstraint_3033(View containerView, IntervalConstraint domainElement) {
+ return isIntervalConstraint_3033(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isDurationConstraint_3034(View containerView, DurationConstraint domainElement) {
+ return isDurationConstraint_3034(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isDurationConstraint_3035(View containerView, DurationConstraint domainElement) {
+ return isDurationConstraint_3035(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isTimeConstraint_3036(View containerView, TimeConstraint domainElement) {
+ return isTimeConstraint_3036(domainElement);
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isTimeConstraint_3037(View containerView, TimeConstraint domainElement) {
+ return isTimeConstraint_3037(domainElement);
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean canCreateNode(View containerView, int nodeVisualID) {
+ String containerModelID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getModelID(containerView);
+ if (!ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) {
+ return false;
+ }
+ int containerVisualID;
+ if (ActivityDiagramEditPart.MODEL_ID.equals(containerModelID)) {
+ containerVisualID = org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(containerView);
+ } else {
+ if (containerView instanceof Diagram) {
+ containerVisualID = ActivityDiagramEditPart.VISUAL_ID;
+ } else {
+ return false;
+ }
+ }
+ switch (containerVisualID) {
+ case ActivityDiagramEditPart.VISUAL_ID:
+ if (ActivityEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActivityEditPart.VISUAL_ID:
+ if (ActivityNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityIsSingleExecutionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityActivityParametersCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityActivityContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityParameterNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InitialNodeEditPart.VISUAL_ID:
+ if (InitialNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ // not generated but change include on gmfgen, can be override at the generation
+ if (InitialNodeFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ break;
+ case ActivityFinalNodeEditPart.VISUAL_ID:
+ if (ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ // not generated but change include on gmfgen, can be override at the generation
+ if (ActivityFinalNodeFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case FlowFinalNodeEditPart.VISUAL_ID:
+ if (FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ // not generated but change include on gmfgen, can be override at the generation
+ if (FlowFinalNodeFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ break;
+ case OpaqueActionEditPart.VISUAL_ID:
+ // not generated but change include on gmfgen, can be override at the generation
+ if (OpaqueActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ if (OpaqueActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInOpaqueActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ValuePinInOpaqueActEditPart.VISUAL_ID:
+ if (ValuePinInOActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInOActValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActionInputPinInOpaqueActEditPart.VISUAL_ID:
+ if (ActionInputPinInOActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInOActValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInOpaqueActEditPart.VISUAL_ID:
+ if (InputPinInOActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case OutputPinInOpaqueActEditPart.VISUAL_ID:
+ if (OutputPinInOActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case CallBehaviorActionEditPart.VISUAL_ID:
+ if (CallBehaviorActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInCallBeActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInCallBeActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInCallBeActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInCallBeActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ // not generated but change include on gmfgen, can be override at the generation
+ if (CallBehaviorActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ValuePinInCallBeActEditPart.VISUAL_ID:
+ if (ValuePinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInCBActValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActionInputPinInCallBeActEditPart.VISUAL_ID:
+ if (ActionInputPinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInCBActValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInCallBeActEditPart.VISUAL_ID:
+ if (InputPinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case OutputPinInCallBeActEditPart.VISUAL_ID:
+ if (OutputPinInCBActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case CallOperationActionEditPart.VISUAL_ID:
+ // not generated but change include on gmfgen, can be override at the generation
+ if (CallOperationActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ if (CallOperationActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInCallOpActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInCallOpActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInCallOpActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInCallOpActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInCallOpActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInCallOpActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActionInputPinInCallOpActEditPart.VISUAL_ID:
+ if (ActionInputPinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInCOActValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ValuePinInCallOpActEditPart.VISUAL_ID:
+ if (ValuePinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInCOActValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInCallOpActEditPart.VISUAL_ID:
+ if (InputPinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case OutputPinInCallOpActEditPart.VISUAL_ID:
+ if (OutputPinInCOActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID:
+ if (ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInCOActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID:
+ if (ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInCallOpActAsTargetEditPart.VISUAL_ID:
+ if (InputPinInCOActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ if (DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ if (DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ if (TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ if (TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ if (IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ if (IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ if (ConstraintAsLocalPrecondNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ if (ConstraintAsLocalPostcondNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case DecisionNodeEditPart.VISUAL_ID:
+ if (DecisionInputEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DecisionNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ // not generated but change include on gmfgen, can be override at the generation
+ if (DecisionNodeFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ break;
+ case MergeNodeEditPart.VISUAL_ID:
+ if (MergeNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ // not generated but changes include on gmfgen, can be override at the generation
+ if (MergeNodeFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ break;
+ case ForkNodeEditPart.VISUAL_ID:
+ if (ForkNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ // not generated but changes include on gmfgen, can be override at the generation
+ if (ForkNodeFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ break;
+ case JoinNodeEditPart.VISUAL_ID:
+ if (JoinSpecEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (JoinNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ // not generated but changes include on gmfgen, can be override at the generation
+ if (JoinNodeFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ break;
+ case DataStoreNodeEditPart.VISUAL_ID:
+ if (DataStoreNodeLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DataStoreSelectionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ // not generated but change include on gmfgen, can be override at the generation
+ if (DataStoreNodeFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ break;
+ case SendObjectActionEditPart.VISUAL_ID:
+ // not generated but change include on gmfgen, can be override at the generation
+ if (SendObjectActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ if (SendObjectActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInSendObjActAsReqEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInSendObjActAsReqEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInSendObjActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInSendObjActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ValuePinInSendObjActAsReqEditPart.VISUAL_ID:
+ if (ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID:
+ if (ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInSendObjActAsReqEditPart.VISUAL_ID:
+ if (InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID:
+ if (ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID:
+ if (ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInSendObjActAsTargetEditPart.VISUAL_ID:
+ if (InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case SendSignalActionEditPart.VISUAL_ID:
+ // not generated but change include on gmfgen, can be override at the generation
+ if (SendSignalActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendSignalActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInSendSigActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInSendSigActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInSendSigActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInSendSigActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInSendSigActAsTargetEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActionInputPinInSendSigActEditPart.VISUAL_ID:
+ if (ActionInputPinInSendSigActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInSendSigActValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ValuePinInSendSigActEditPart.VISUAL_ID:
+ if (ValuePinInSendSigActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInSendSigActValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInSendSigActEditPart.VISUAL_ID:
+ if (InputPinInSendSigActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID:
+ if (ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID:
+ if (ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInSendSigActAsTargetEditPart.VISUAL_ID:
+ if (InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActivityParameterNodeEditPart.VISUAL_ID:
+ if (ParameterNodeNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case AcceptEventActionEditPart.VISUAL_ID:
+ if (AcceptEventActionLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AcceptTimeEventActionLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInAcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case OutputPinInAcceptEventActionEditPart.VISUAL_ID:
+ if (OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ValueSpecificationActionEditPart.VISUAL_ID:
+ // not generated but change include on gmfgen, can be override at the generation
+ if (ValueSpecificationActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ if (ValueSpecificationActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInValSpecActEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case OutputPinInValSpecActEditPart.VISUAL_ID:
+ if (OutputPinInValSpecActLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ConditionalNodeEditPart.VISUAL_ID:
+ if (ConditionalNodeKeywordEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ExpansionRegionEditPart.VISUAL_ID:
+ if (ExpansionRegionKeywordEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExpansionNodeAsInEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExpansionNodeAsOutEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case LoopNodeEditPart.VISUAL_ID:
+ if (LoopNodeKeywordEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInLoopNodeAsVariableEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInLoopNodeAsResultEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID:
+ if (OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID:
+ if (OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID:
+ if (OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case SequenceNodeEditPart.VISUAL_ID:
+ if (SequenceNodeKeywordEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case StructuredActivityNodeEditPart.VISUAL_ID:
+ if (StructuredActivityNodeKeywordEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID:
+ if (InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActivityPartitionEditPart.VISUAL_ID:
+ if (ActivityPartitionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ // not generated but change include on gmfgen, can be override at the generation
+ if (BroadcastSignalActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ // not generated but change include on gmfgen, can be override at the generation
+ if (AddVariableValueActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ break;
+ case InterruptibleActivityRegionEditPart.VISUAL_ID:
+ if (InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case CommentEditPartCN.VISUAL_ID:
+ if (CommentBodyLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ReadSelfActionEditPart.VISUAL_ID:
+ // not generated but change include on gmfgen, can be override at the generation
+ if (ReadSelfActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ if (ReadSelfActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadSelfActionOutputPinEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ReadSelfActionOutputPinEditPart.VISUAL_ID:
+ if (OutputPinInReadSelfActionLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActivityEditPartCN.VISUAL_ID:
+ if (ActivityNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityIsSingleExecutionCNEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityCNParametersCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityCNContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityParameterNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case CreateObjectActionEditPart.VISUAL_ID:
+ // not generated but change include on gmfgen, can be override at the generation
+ if (CreateObjectActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ if (CreateObjectActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID:
+ if (OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ShapeNamedElementEditPart.VISUAL_ID:
+ if (ShapeNamedElementNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ReadStructuralFeatureActionEditPart.VISUAL_ID:
+ // not generated but change include on gmfgen, can be override at the generation
+ if (ReadStructuralFeatureActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ if (ReadStructuralFeatureActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID:
+ if (InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID:
+ if (OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case AddStructuralFeatureValueActionEditPart.VISUAL_ID:
+ if (AddStructuralFeatureValueActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ // not generated but change include on gmfgen, can be override at the generation
+ if (AddStructuralFeatureValueActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID:
+ if (InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID:
+ if (InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID:
+ if (OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case DestroyObjectActionEditPart.VISUAL_ID:
+ // not generated but change include on gmfgen, can be override at the generation
+ if (DestroyObjectActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ if (DestroyObjectActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInDestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInDestroyObjectActionEditPart.VISUAL_ID:
+ if (InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ReadVariableActionEditPart.VISUAL_ID:
+ // not generated but change include on gmfgen, can be override at the generation
+ if (ReadVariableActionFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ if (ReadVariableActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID:
+ if (OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case AddVariableValueActionEditPart.VISUAL_ID:
+ if (AddVariableValueActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID:
+ if (InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID:
+ if (InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case BroadcastSignalActionEditPart.VISUAL_ID:
+ if (BroadcastSignalActionNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInBroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InputPinInBroadcastSignalActionEditPart.VISUAL_ID:
+ if (InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case CentralBufferNodeEditPart.VISUAL_ID:
+ if (CentralBufferNodeLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CentralBufferNodeSelectionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ // not generated but change include on gmfgen, can be override at the generation
+ if (CentralBufferNodeFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+
+ break;
+ case ConstraintEditPartCN.VISUAL_ID:
+ if (ConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintBodyEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActivityActivityParametersCompartmentEditPart.VISUAL_ID:
+ if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID:
+ if (ConstraintInActivityAsPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID:
+ if (ConstraintInActivityAsPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActivityActivityContentCompartmentEditPart.VISUAL_ID:
+ if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityPartitionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InterruptibleActivityRegionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID:
+ if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityPartitionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID:
+ if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActivityCNParametersCompartmentEditPart.VISUAL_ID:
+ if (ParameterEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID:
+ if (ConstraintInActivityAsPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID:
+ if (ConstraintInActivityAsPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ActivityCNContentCompartmentEditPart.VISUAL_ID:
+ if (InitialNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (FlowFinalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (OpaqueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallBehaviorActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CallOperationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DurationConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (TimeConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPrecondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintAsLocalPostcondEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DecisionNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (MergeNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ForkNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (JoinNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DataStoreNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SendSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AcceptEventActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ValueSpecificationActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConditionalNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExpansionRegionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (LoopNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (SequenceNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (StructuredActivityNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityPartitionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (InterruptibleActivityRegionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadSelfActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CreateObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadStructuralFeatureActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddStructuralFeatureValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DestroyObjectActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ReadVariableActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (AddVariableValueActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (BroadcastSignalActionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CentralBufferNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ActivityParameterNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ObjectFlowEditPart.VISUAL_ID:
+ if (ObjectFlowNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ObjectFlowWeightEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ObjectFlowSelectionEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ObjectFlowTransformationEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DecisionInputFlowEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ObjectFlowGuardEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ObjectFlowAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ObjectFlowInterruptibleIconEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ControlFlowEditPart.VISUAL_ID:
+ if (ControlFlowNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ControlFlowWeightEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ControlFlowGuardEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ControlFlowAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ControlFlowInterruptibleIconEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ExceptionHandlerEditPart.VISUAL_ID:
+ if (ExceptionHandlerTypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExceptionHandlerIconEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public static int getLinkWithClassVisualID(EObject domainElement) {
+ if (domainElement == null) {
+ return -1;
+ }
+ if (UMLPackage.eINSTANCE.getObjectFlow().isSuperTypeOf(domainElement.eClass())) {
+ return ObjectFlowEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getControlFlow().isSuperTypeOf(domainElement.eClass())) {
+ return ControlFlowEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExceptionHandler().isSuperTypeOf(domainElement.eClass())) {
+ return ExceptionHandlerEditPart.VISUAL_ID;
+ }
+ return -1;
+ }
+
+ /**
+ * User can change implementation of this method to handle some specific
+ * situations not covered by default logic.
+ *
+ * @generated
+ */
+ private static boolean isDiagram(Package element) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isActionInputPin_3021(ActionInputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isValuePin_3022(ValuePin domainElement) {
+ Object result = UMLOCLFactory.getExpression(1, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isInputPin_3023(InputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(2, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isValuePin_3025(ValuePin domainElement) {
+ Object result = UMLOCLFactory.getExpression(3, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isActionInputPin_3026(ActionInputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(4, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isInputPin_3027(InputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(5, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isConstraint_3011(Constraint domainElement) {
+ Object result = UMLOCLFactory.getExpression(12, UMLPackage.eINSTANCE.getConstraint(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isConstraint_3012(Constraint domainElement) {
+ Object result = UMLOCLFactory.getExpression(13, UMLPackage.eINSTANCE.getConstraint(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isValuePin_3046(ValuePin domainElement) {
+ Object result = UMLOCLFactory.getExpression(14, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isActionInputPin_3047(ActionInputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(15, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isInputPin_3048(InputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(16, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isValuePin_3049(ValuePin domainElement) {
+ Object result = UMLOCLFactory.getExpression(17, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isActionInputPin_3050(ActionInputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(18, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isInputPin_3051(InputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(19, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isActionInputPin_3053(ActionInputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(20, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isValuePin_3054(ValuePin domainElement) {
+ Object result = UMLOCLFactory.getExpression(21, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isInputPin_3055(InputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(22, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isValuePin_3060(ValuePin domainElement) {
+ Object result = UMLOCLFactory.getExpression(23, UMLPackage.eINSTANCE.getValuePin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isActionInputPin_3061(ActionInputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(24, UMLPackage.eINSTANCE.getActionInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isInputPin_3062(InputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(25, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isExpansionNode_3074(ExpansionNode domainElement) {
+ Object result = UMLOCLFactory.getExpression(26, UMLPackage.eINSTANCE.getExpansionNode(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isExpansionNode_3075(ExpansionNode domainElement) {
+ Object result = UMLOCLFactory.getExpression(27, UMLPackage.eINSTANCE.getExpansionNode(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * Redirect call to defined method
+ *
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isInputPin_3092(View containerView, InputPin domainElement) {
+ return isInputPin_3092(domainElement);
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isInputPin_3092(InputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(29, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isInputPin_3093(View containerView, InputPin domainElement) {
+ return isInputPin_3093(domainElement);
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isInputPin_3093(InputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(30, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isInputPin_3096(View containerView, InputPin domainElement) {
+ return isInputPin_3096(domainElement);
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isInputPin_3096(InputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(31, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isOutputPin_3098(View containerView, OutputPin domainElement) {
+ return isOutputPin_3098(domainElement);
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isOutputPin_3098(OutputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(32, UMLPackage.eINSTANCE.getOutputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isInputPin_3100(View containerView, InputPin domainElement) {
+ return isInputPin_3100(domainElement);
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isInputPin_3100(InputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(33, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isInputPin_3101(View containerView, InputPin domainElement) {
+ return isInputPin_3101(domainElement);
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isInputPin_3101(InputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(34, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated NOT (method generation is missing or generated calls are incorrect)
+ */
+ private static boolean isInputPin_3103(View containerView, InputPin domainElement) {
+ return isInputPin_3103(domainElement);
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isInputPin_3103(InputPin domainElement) {
+ Object result = UMLOCLFactory.getExpression(35, UMLPackage.eINSTANCE.getInputPin(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
+ if (candidate == -1) {
+ // unrecognized id is always bad
+ return false;
+ }
+ int basic = getNodeVisualID(containerView, domainElement);
+ return basic == candidate;
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean isCompartmentVisualID(int visualID) {
+ switch (visualID) {
+ case ActivityActivityParametersCompartmentEditPart.VISUAL_ID:
+ case ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID:
+ case ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID:
+ case ActivityActivityContentCompartmentEditPart.VISUAL_ID:
+ case ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ case ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ case LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ case SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ case StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID:
+ case ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID:
+ case InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID:
+ case ActivityCNParametersCompartmentEditPart.VISUAL_ID:
+ case ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID:
+ case ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID:
+ case ActivityCNContentCompartmentEditPart.VISUAL_ID:
+ return true;
+ default:
+ break;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean isSemanticLeafVisualID(int visualID) {
+ switch (visualID) {
+ case ActivityDiagramEditPart.VISUAL_ID:
+ return false;
+ case ParameterEditPart.VISUAL_ID:
+ case ConstraintInActivityAsPrecondEditPart.VISUAL_ID:
+ case ConstraintInActivityAsPostcondEditPart.VISUAL_ID:
+ case InitialNodeEditPart.VISUAL_ID:
+ case ActivityFinalNodeEditPart.VISUAL_ID:
+ case FlowFinalNodeEditPart.VISUAL_ID:
+ case ConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ case ConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ case InputPinInOpaqueActEditPart.VISUAL_ID:
+ case OutputPinInOpaqueActEditPart.VISUAL_ID:
+ case ValuePinInOpaqueActEditPart.VISUAL_ID:
+ case ActionInputPinInOpaqueActEditPart.VISUAL_ID:
+ case ValuePinInCallBeActEditPart.VISUAL_ID:
+ case ActionInputPinInCallBeActEditPart.VISUAL_ID:
+ case InputPinInCallBeActEditPart.VISUAL_ID:
+ case OutputPinInCallBeActEditPart.VISUAL_ID:
+ case ActionInputPinInCallOpActEditPart.VISUAL_ID:
+ case ValuePinInCallOpActEditPart.VISUAL_ID:
+ case InputPinInCallOpActEditPart.VISUAL_ID:
+ case OutputPinInCallOpActEditPart.VISUAL_ID:
+ case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID:
+ case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID:
+ case InputPinInCallOpActAsTargetEditPart.VISUAL_ID:
+ case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ case DecisionNodeEditPart.VISUAL_ID:
+ case MergeNodeEditPart.VISUAL_ID:
+ case ForkNodeEditPart.VISUAL_ID:
+ case JoinNodeEditPart.VISUAL_ID:
+ case ValuePinInSendObjActAsReqEditPart.VISUAL_ID:
+ case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID:
+ case InputPinInSendObjActAsReqEditPart.VISUAL_ID:
+ case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID:
+ case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID:
+ case InputPinInSendObjActAsTargetEditPart.VISUAL_ID:
+ case ActionInputPinInSendSigActEditPart.VISUAL_ID:
+ case ValuePinInSendSigActEditPart.VISUAL_ID:
+ case InputPinInSendSigActEditPart.VISUAL_ID:
+ case ActivityParameterNodeEditPart.VISUAL_ID:
+ case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID:
+ case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID:
+ case InputPinInSendSigActAsTargetEditPart.VISUAL_ID:
+ case OutputPinInAcceptEventActionEditPart.VISUAL_ID:
+ case ExpansionNodeAsInEditPart.VISUAL_ID:
+ case ExpansionNodeAsOutEditPart.VISUAL_ID:
+ case OutputPinInValSpecActEditPart.VISUAL_ID:
+ case DataStoreNodeEditPart.VISUAL_ID:
+ case CommentEditPartCN.VISUAL_ID:
+ case ReadSelfActionOutputPinEditPart.VISUAL_ID:
+ case ShapeNamedElementEditPart.VISUAL_ID:
+ case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID:
+ case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID:
+ case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID:
+ case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID:
+ case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID:
+ case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID:
+ case InputPinInDestroyObjectActionEditPart.VISUAL_ID:
+ case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID:
+ case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID:
+ case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID:
+ case InputPinInBroadcastSignalActionEditPart.VISUAL_ID:
+ case CentralBufferNodeEditPart.VISUAL_ID:
+ case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID:
+ case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID:
+ case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID:
+ case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID:
+ case ConstraintEditPartCN.VISUAL_ID:
+ return true;
+ default:
+ break;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public static final DiagramStructure TYPED_INSTANCE = new DiagramStructure() {
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getVisualID(View view) {
+ return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getVisualID(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getModelID(View view) {
+ return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getModelID(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getNodeVisualID(View containerView, EObject domainElement) {
+ return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
+ return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.checkNodeVisualID(containerView, domainElement, candidate);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isCompartmentVisualID(int visualID) {
+ return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.isCompartmentVisualID(visualID);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isSemanticLeafVisualID(int visualID) {
+ return org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry.isSemanticLeafVisualID(visualID);
+ }
+ };
+
+ /**
+ * @generated
+ */
+ private static boolean isIntervalConstraint_3032(IntervalConstraint domainElement) {
+ Object result = UMLOCLFactory.getExpression(10, UMLPackage.eINSTANCE.getIntervalConstraint(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isIntervalConstraint_3033(IntervalConstraint domainElement) {
+ Object result = UMLOCLFactory.getExpression(11, UMLPackage.eINSTANCE.getIntervalConstraint(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isDurationConstraint_3034(DurationConstraint domainElement) {
+ Object result = UMLOCLFactory.getExpression(6, UMLPackage.eINSTANCE.getDurationConstraint(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isDurationConstraint_3035(DurationConstraint domainElement) {
+ Object result = UMLOCLFactory.getExpression(7, UMLPackage.eINSTANCE.getDurationConstraint(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isTimeConstraint_3036(TimeConstraint domainElement) {
+ Object result = UMLOCLFactory.getExpression(8, UMLPackage.eINSTANCE.getTimeConstraint(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean isTimeConstraint_3037(TimeConstraint domainElement) {
+ Object result = UMLOCLFactory.getExpression(9, UMLPackage.eINSTANCE.getTimeConstraint(), null).evaluate(domainElement);
+ return result instanceof Boolean && ((Boolean) result).booleanValue();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLParserProvider.java
index 3382ed274c5..bf380418964 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLParserProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLParserProvider.java
@@ -1,3305 +1,3815 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.providers;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.*;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.AcceptEventActionParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.AcceptTimeEventActionParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivityEdgeWeightParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivityParameterNodeParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivitySingleExecutionParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.CallBehaviorActionParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.CallOperationActionParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.DecisionInputFlowParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.EdgeGuardParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ExceptionHandlerTypeParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.InputDecisionParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.JoinSpecParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectFlowSelectionParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectFlowTransformationParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectNodeParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectNodeSelectionParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ParameterParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PinParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PinValueParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PostConditionConstraintLabelParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PreConditionConstraintLabelParser;
-import org.eclipse.papyrus.uml.diagram.activity.parser.custom.StructuredActivityNodeKeywordParser;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.common.parser.CommentParser;
-import org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser;
-import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class UMLParserProvider extends AbstractProvider implements IParserProvider {
-
- /**
- * @generated
- */
- private IParser activityName_5001Parser;
-
- /**
- * @generated
- */
- private IParser getActivityName_5001Parser() {
- if (activityName_5001Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- activityName_5001Parser = parser;
- }
- return activityName_5001Parser;
- }
-
- /**
- * @generated
- */
- private ActivitySingleExecutionParser activityIsSingleExecution_5002Parser;
-
- /**
- * @generated
- */
- private IParser getActivityIsSingleExecution_5002Parser() {
- if (activityIsSingleExecution_5002Parser == null) {
- activityIsSingleExecution_5002Parser = new ActivitySingleExecutionParser();
- }
- return activityIsSingleExecution_5002Parser;
- }
-
- /**
- * @generated
- */
- private ParameterParser parameter_3001Parser;
-
- /**
- * @generated
- */
- private IParser getParameter_3001Parser() {
- if (parameter_3001Parser == null) {
- parameter_3001Parser = new ParameterParser();
- }
- return parameter_3001Parser;
- }
-
- /**
- * @generated
- */
- private PreConditionConstraintLabelParser constraint_3002Parser;
-
- /**
- * @generated
- */
- private IParser getConstraint_3002Parser() {
- if (constraint_3002Parser == null) {
- constraint_3002Parser = new PreConditionConstraintLabelParser();
- }
- return constraint_3002Parser;
- }
-
- /**
- * @generated
- */
- private PostConditionConstraintLabelParser constraint_3003Parser;
-
- /**
- * @generated
- */
- private IParser getConstraint_3003Parser() {
- if (constraint_3003Parser == null) {
- constraint_3003Parser = new PostConditionConstraintLabelParser();
- }
- return constraint_3003Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser initialNodeLabel_5080Parser;
-
- /**
- * @generated
- */
- private IParser getInitialNodeLabel_5080Parser() {
- if (initialNodeLabel_5080Parser == null) {
- initialNodeLabel_5080Parser = new AppliedStereotypeParser();
- }
- return initialNodeLabel_5080Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser activityFinalNodeLabel_5081Parser;
-
- /**
- * @generated
- */
- private IParser getActivityFinalNodeLabel_5081Parser() {
- if (activityFinalNodeLabel_5081Parser == null) {
- activityFinalNodeLabel_5081Parser = new AppliedStereotypeParser();
- }
- return activityFinalNodeLabel_5081Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser flowFinalNodeLabel_5082Parser;
-
- /**
- * @generated
- */
- private IParser getFlowFinalNodeLabel_5082Parser() {
- if (flowFinalNodeLabel_5082Parser == null) {
- flowFinalNodeLabel_5082Parser = new AppliedStereotypeParser();
- }
- return flowFinalNodeLabel_5082Parser;
- }
-
- /**
- * @generated
- */
- private IParser opaqueActionName_5003Parser;
-
- /**
- * @generated
- */
- private IParser getOpaqueActionName_5003Parser() {
- if (opaqueActionName_5003Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- opaqueActionName_5003Parser = parser;
- }
- return opaqueActionName_5003Parser;
- }
-
- /**
- * @generated
- */
- private PinParser valuePinLabel_5011Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5011Parser() {
- if (valuePinLabel_5011Parser == null) {
- valuePinLabel_5011Parser = new PinParser();
- }
- return valuePinLabel_5011Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser valuePinLabel_5024Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5024Parser() {
- if (valuePinLabel_5024Parser == null) {
- valuePinLabel_5024Parser = new PinValueParser();
- }
- return valuePinLabel_5024Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser valuePinLabel_5083Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5083Parser() {
- if (valuePinLabel_5083Parser == null) {
- valuePinLabel_5083Parser = new AppliedStereotypeParser();
- }
- return valuePinLabel_5083Parser;
- }
-
- /**
- * @generated
- */
- private PinParser actionInputPinLabel_5012Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5012Parser() {
- if (actionInputPinLabel_5012Parser == null) {
- actionInputPinLabel_5012Parser = new PinParser();
- }
- return actionInputPinLabel_5012Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser actionInputPinLabel_5025Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5025Parser() {
- if (actionInputPinLabel_5025Parser == null) {
- actionInputPinLabel_5025Parser = new PinValueParser();
- }
- return actionInputPinLabel_5025Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser actionInputPinLabel_5084Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5084Parser() {
- if (actionInputPinLabel_5084Parser == null) {
- actionInputPinLabel_5084Parser = new AppliedStereotypeParser();
- }
- return actionInputPinLabel_5084Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5009Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5009Parser() {
- if (inputPinLabel_5009Parser == null) {
- inputPinLabel_5009Parser = new PinParser();
- }
- return inputPinLabel_5009Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5085Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5085Parser() {
- if (inputPinLabel_5085Parser == null) {
- inputPinLabel_5085Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5085Parser;
- }
-
- /**
- * @generated
- */
- private PinParser outputPinLabel_5010Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5010Parser() {
- if (outputPinLabel_5010Parser == null) {
- outputPinLabel_5010Parser = new PinParser();
- }
- return outputPinLabel_5010Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser outputPinLabel_5086Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5086Parser() {
- if (outputPinLabel_5086Parser == null) {
- outputPinLabel_5086Parser = new AppliedStereotypeParser();
- }
- return outputPinLabel_5086Parser;
- }
-
- /**
- * @generated
- */
- private CallBehaviorActionParser callBehaviorActionLabel_5004Parser;
-
- /**
- * @generated
- */
- private IParser getCallBehaviorActionLabel_5004Parser() {
- if (callBehaviorActionLabel_5004Parser == null) {
- callBehaviorActionLabel_5004Parser = new CallBehaviorActionParser();
- }
- return callBehaviorActionLabel_5004Parser;
- }
-
- /**
- * @generated
- */
- private PinParser valuePinLabel_5013Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5013Parser() {
- if (valuePinLabel_5013Parser == null) {
- valuePinLabel_5013Parser = new PinParser();
- }
- return valuePinLabel_5013Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser valuePinLabel_5026Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5026Parser() {
- if (valuePinLabel_5026Parser == null) {
- valuePinLabel_5026Parser = new PinValueParser();
- }
- return valuePinLabel_5026Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser valuePinLabel_5087Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5087Parser() {
- if (valuePinLabel_5087Parser == null) {
- valuePinLabel_5087Parser = new AppliedStereotypeParser();
- }
- return valuePinLabel_5087Parser;
- }
-
- /**
- * @generated
- */
- private PinParser actionInputPinLabel_5014Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5014Parser() {
- if (actionInputPinLabel_5014Parser == null) {
- actionInputPinLabel_5014Parser = new PinParser();
- }
- return actionInputPinLabel_5014Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser actionInputPinLabel_5027Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5027Parser() {
- if (actionInputPinLabel_5027Parser == null) {
- actionInputPinLabel_5027Parser = new PinValueParser();
- }
- return actionInputPinLabel_5027Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser actionInputPinLabel_5088Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5088Parser() {
- if (actionInputPinLabel_5088Parser == null) {
- actionInputPinLabel_5088Parser = new AppliedStereotypeParser();
- }
- return actionInputPinLabel_5088Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5015Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5015Parser() {
- if (inputPinLabel_5015Parser == null) {
- inputPinLabel_5015Parser = new PinParser();
- }
- return inputPinLabel_5015Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5089Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5089Parser() {
- if (inputPinLabel_5089Parser == null) {
- inputPinLabel_5089Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5089Parser;
- }
-
- /**
- * @generated
- */
- private PinParser outputPinLabel_5016Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5016Parser() {
- if (outputPinLabel_5016Parser == null) {
- outputPinLabel_5016Parser = new PinParser();
- }
- return outputPinLabel_5016Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser outputPinLabel_5090Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5090Parser() {
- if (outputPinLabel_5090Parser == null) {
- outputPinLabel_5090Parser = new AppliedStereotypeParser();
- }
- return outputPinLabel_5090Parser;
- }
-
- /**
- * @generated
- */
- private CallOperationActionParser callOperationActionLabel_5006Parser;
-
- /**
- * @generated
- */
- private IParser getCallOperationActionLabel_5006Parser() {
- if (callOperationActionLabel_5006Parser == null) {
- callOperationActionLabel_5006Parser = new CallOperationActionParser();
- }
- return callOperationActionLabel_5006Parser;
- }
-
- /**
- * @generated
- */
- private PinParser actionInputPinLabel_5017Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5017Parser() {
- if (actionInputPinLabel_5017Parser == null) {
- actionInputPinLabel_5017Parser = new PinParser();
- }
- return actionInputPinLabel_5017Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser actionInputPinLabel_5028Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5028Parser() {
- if (actionInputPinLabel_5028Parser == null) {
- actionInputPinLabel_5028Parser = new PinValueParser();
- }
- return actionInputPinLabel_5028Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser actionInputPinLabel_5091Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5091Parser() {
- if (actionInputPinLabel_5091Parser == null) {
- actionInputPinLabel_5091Parser = new AppliedStereotypeParser();
- }
- return actionInputPinLabel_5091Parser;
- }
-
- /**
- * @generated
- */
- private PinParser valuePinLabel_5018Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5018Parser() {
- if (valuePinLabel_5018Parser == null) {
- valuePinLabel_5018Parser = new PinParser();
- }
- return valuePinLabel_5018Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser valuePinLabel_5029Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5029Parser() {
- if (valuePinLabel_5029Parser == null) {
- valuePinLabel_5029Parser = new PinValueParser();
- }
- return valuePinLabel_5029Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser valuePinLabel_5092Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5092Parser() {
- if (valuePinLabel_5092Parser == null) {
- valuePinLabel_5092Parser = new AppliedStereotypeParser();
- }
- return valuePinLabel_5092Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5019Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5019Parser() {
- if (inputPinLabel_5019Parser == null) {
- inputPinLabel_5019Parser = new PinParser();
- }
- return inputPinLabel_5019Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5093Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5093Parser() {
- if (inputPinLabel_5093Parser == null) {
- inputPinLabel_5093Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5093Parser;
- }
-
- /**
- * @generated
- */
- private PinParser outputPinLabel_5020Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5020Parser() {
- if (outputPinLabel_5020Parser == null) {
- outputPinLabel_5020Parser = new PinParser();
- }
- return outputPinLabel_5020Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser outputPinLabel_5094Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5094Parser() {
- if (outputPinLabel_5094Parser == null) {
- outputPinLabel_5094Parser = new AppliedStereotypeParser();
- }
- return outputPinLabel_5094Parser;
- }
-
- /**
- * @generated
- */
- private PinParser valuePinLabel_5021Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5021Parser() {
- if (valuePinLabel_5021Parser == null) {
- valuePinLabel_5021Parser = new PinParser();
- }
- return valuePinLabel_5021Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser valuePinLabel_5030Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5030Parser() {
- if (valuePinLabel_5030Parser == null) {
- valuePinLabel_5030Parser = new PinValueParser();
- }
- return valuePinLabel_5030Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser valuePinLabel_5095Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5095Parser() {
- if (valuePinLabel_5095Parser == null) {
- valuePinLabel_5095Parser = new AppliedStereotypeParser();
- }
- return valuePinLabel_5095Parser;
- }
-
- /**
- * @generated
- */
- private PinParser actionInputPinLabel_5022Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5022Parser() {
- if (actionInputPinLabel_5022Parser == null) {
- actionInputPinLabel_5022Parser = new PinParser();
- }
- return actionInputPinLabel_5022Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser actionInputPinLabel_5031Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5031Parser() {
- if (actionInputPinLabel_5031Parser == null) {
- actionInputPinLabel_5031Parser = new PinValueParser();
- }
- return actionInputPinLabel_5031Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser actionInputPinLabel_5096Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5096Parser() {
- if (actionInputPinLabel_5096Parser == null) {
- actionInputPinLabel_5096Parser = new AppliedStereotypeParser();
- }
- return actionInputPinLabel_5096Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5023Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5023Parser() {
- if (inputPinLabel_5023Parser == null) {
- inputPinLabel_5023Parser = new PinParser();
- }
- return inputPinLabel_5023Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5097Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5097Parser() {
- if (inputPinLabel_5097Parser == null) {
- inputPinLabel_5097Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5097Parser;
- }
-
- /**
- * @generated
- */
- private IParser constraintName_5007Parser;
-
- /**
- * @generated
- */
- private IParser getConstraintName_5007Parser() {
- if (constraintName_5007Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- constraintName_5007Parser = parser;
- }
- return constraintName_5007Parser;
- }
-
- /**
- * @generated
- */
- private ConstraintParser constraintLabel_5136Parser;
-
- /**
- * @generated
- */
- private IParser getConstraintLabel_5136Parser() {
- if (constraintLabel_5136Parser == null) {
- constraintLabel_5136Parser = new ConstraintParser();
- }
- return constraintLabel_5136Parser;
- }
-
- /**
- * @generated
- */
- private IParser constraintName_5008Parser;
-
- /**
- * @generated
- */
- private IParser getConstraintName_5008Parser() {
- if (constraintName_5008Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- constraintName_5008Parser = parser;
- }
- return constraintName_5008Parser;
- }
-
- /**
- * @generated
- */
- private ConstraintParser constraintLabel_5137Parser;
-
- /**
- * @generated
- */
- private IParser getConstraintLabel_5137Parser() {
- if (constraintLabel_5137Parser == null) {
- constraintLabel_5137Parser = new ConstraintParser();
- }
- return constraintLabel_5137Parser;
- }
-
- /**
- * @generated
- */
- private InputDecisionParser decisionNodeLabel_5043Parser;
-
- /**
- * @generated
- */
- private IParser getDecisionNodeLabel_5043Parser() {
- if (decisionNodeLabel_5043Parser == null) {
- decisionNodeLabel_5043Parser = new InputDecisionParser();
- }
- return decisionNodeLabel_5043Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser decisionNodeLabel_5098Parser;
-
- /**
- * @generated
- */
- private IParser getDecisionNodeLabel_5098Parser() {
- if (decisionNodeLabel_5098Parser == null) {
- decisionNodeLabel_5098Parser = new AppliedStereotypeParser();
- }
- return decisionNodeLabel_5098Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser mergeNodeLabel_5099Parser;
-
- /**
- * @generated
- */
- private IParser getMergeNodeLabel_5099Parser() {
- if (mergeNodeLabel_5099Parser == null) {
- mergeNodeLabel_5099Parser = new AppliedStereotypeParser();
- }
- return mergeNodeLabel_5099Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser forkNodeLabel_5100Parser;
-
- /**
- * @generated
- */
- private IParser getForkNodeLabel_5100Parser() {
- if (forkNodeLabel_5100Parser == null) {
- forkNodeLabel_5100Parser = new AppliedStereotypeParser();
- }
- return forkNodeLabel_5100Parser;
- }
-
- /**
- * @generated
- */
- private JoinSpecParser joinNodeLabel_5042Parser;
-
- /**
- * @generated
- */
- private IParser getJoinNodeLabel_5042Parser() {
- if (joinNodeLabel_5042Parser == null) {
- joinNodeLabel_5042Parser = new JoinSpecParser();
- }
- return joinNodeLabel_5042Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser joinNodeLabel_5101Parser;
-
- /**
- * @generated
- */
- private IParser getJoinNodeLabel_5101Parser() {
- if (joinNodeLabel_5101Parser == null) {
- joinNodeLabel_5101Parser = new AppliedStereotypeParser();
- }
- return joinNodeLabel_5101Parser;
- }
-
- /**
- * @generated
- */
- private IParser sendObjectActionName_5059Parser;
-
- /**
- * @generated
- */
- private IParser getSendObjectActionName_5059Parser() {
- if (sendObjectActionName_5059Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- sendObjectActionName_5059Parser = parser;
- }
- return sendObjectActionName_5059Parser;
- }
-
- /**
- * @generated
- */
- private PinParser valuePinLabel_5049Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5049Parser() {
- if (valuePinLabel_5049Parser == null) {
- valuePinLabel_5049Parser = new PinParser();
- }
- return valuePinLabel_5049Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser valuePinLabel_5050Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5050Parser() {
- if (valuePinLabel_5050Parser == null) {
- valuePinLabel_5050Parser = new PinValueParser();
- }
- return valuePinLabel_5050Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser valuePinLabel_5102Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5102Parser() {
- if (valuePinLabel_5102Parser == null) {
- valuePinLabel_5102Parser = new AppliedStereotypeParser();
- }
- return valuePinLabel_5102Parser;
- }
-
- /**
- * @generated
- */
- private PinParser actionInputPinLabel_5051Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5051Parser() {
- if (actionInputPinLabel_5051Parser == null) {
- actionInputPinLabel_5051Parser = new PinParser();
- }
- return actionInputPinLabel_5051Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser actionInputPinLabel_5052Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5052Parser() {
- if (actionInputPinLabel_5052Parser == null) {
- actionInputPinLabel_5052Parser = new PinValueParser();
- }
- return actionInputPinLabel_5052Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser actionInputPinLabel_5103Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5103Parser() {
- if (actionInputPinLabel_5103Parser == null) {
- actionInputPinLabel_5103Parser = new AppliedStereotypeParser();
- }
- return actionInputPinLabel_5103Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5053Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5053Parser() {
- if (inputPinLabel_5053Parser == null) {
- inputPinLabel_5053Parser = new PinParser();
- }
- return inputPinLabel_5053Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5104Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5104Parser() {
- if (inputPinLabel_5104Parser == null) {
- inputPinLabel_5104Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5104Parser;
- }
-
- /**
- * @generated
- */
- private PinParser valuePinLabel_5054Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5054Parser() {
- if (valuePinLabel_5054Parser == null) {
- valuePinLabel_5054Parser = new PinParser();
- }
- return valuePinLabel_5054Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser valuePinLabel_5055Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5055Parser() {
- if (valuePinLabel_5055Parser == null) {
- valuePinLabel_5055Parser = new PinValueParser();
- }
- return valuePinLabel_5055Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser valuePinLabel_5105Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5105Parser() {
- if (valuePinLabel_5105Parser == null) {
- valuePinLabel_5105Parser = new AppliedStereotypeParser();
- }
- return valuePinLabel_5105Parser;
- }
-
- /**
- * @generated
- */
- private PinParser actionInputPinLabel_5056Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5056Parser() {
- if (actionInputPinLabel_5056Parser == null) {
- actionInputPinLabel_5056Parser = new PinParser();
- }
- return actionInputPinLabel_5056Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser actionInputPinLabel_5057Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5057Parser() {
- if (actionInputPinLabel_5057Parser == null) {
- actionInputPinLabel_5057Parser = new PinValueParser();
- }
- return actionInputPinLabel_5057Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser actionInputPinLabel_5106Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5106Parser() {
- if (actionInputPinLabel_5106Parser == null) {
- actionInputPinLabel_5106Parser = new AppliedStereotypeParser();
- }
- return actionInputPinLabel_5106Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5058Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5058Parser() {
- if (inputPinLabel_5058Parser == null) {
- inputPinLabel_5058Parser = new PinParser();
- }
- return inputPinLabel_5058Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5107Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5107Parser() {
- if (inputPinLabel_5107Parser == null) {
- inputPinLabel_5107Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5107Parser;
- }
-
- /**
- * @generated
- */
- private IParser sendSignalActionName_5060Parser;
-
- /**
- * @generated
- */
- private IParser getSendSignalActionName_5060Parser() {
- if (sendSignalActionName_5060Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- sendSignalActionName_5060Parser = parser;
- }
- return sendSignalActionName_5060Parser;
- }
-
- /**
- * @generated
- */
- private PinParser actionInputPinLabel_5061Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5061Parser() {
- if (actionInputPinLabel_5061Parser == null) {
- actionInputPinLabel_5061Parser = new PinParser();
- }
- return actionInputPinLabel_5061Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser actionInputPinLabel_5062Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5062Parser() {
- if (actionInputPinLabel_5062Parser == null) {
- actionInputPinLabel_5062Parser = new PinValueParser();
- }
- return actionInputPinLabel_5062Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser actionInputPinLabel_5108Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5108Parser() {
- if (actionInputPinLabel_5108Parser == null) {
- actionInputPinLabel_5108Parser = new AppliedStereotypeParser();
- }
- return actionInputPinLabel_5108Parser;
- }
-
- /**
- * @generated
- */
- private PinParser valuePinLabel_5063Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5063Parser() {
- if (valuePinLabel_5063Parser == null) {
- valuePinLabel_5063Parser = new PinParser();
- }
- return valuePinLabel_5063Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser valuePinLabel_5064Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5064Parser() {
- if (valuePinLabel_5064Parser == null) {
- valuePinLabel_5064Parser = new PinValueParser();
- }
- return valuePinLabel_5064Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser valuePinLabel_5109Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5109Parser() {
- if (valuePinLabel_5109Parser == null) {
- valuePinLabel_5109Parser = new AppliedStereotypeParser();
- }
- return valuePinLabel_5109Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5065Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5065Parser() {
- if (inputPinLabel_5065Parser == null) {
- inputPinLabel_5065Parser = new PinParser();
- }
- return inputPinLabel_5065Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5110Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5110Parser() {
- if (inputPinLabel_5110Parser == null) {
- inputPinLabel_5110Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5110Parser;
- }
-
- /**
- * @generated
- */
- private PinParser valuePinLabel_5072Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5072Parser() {
- if (valuePinLabel_5072Parser == null) {
- valuePinLabel_5072Parser = new PinParser();
- }
- return valuePinLabel_5072Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser valuePinLabel_5073Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5073Parser() {
- if (valuePinLabel_5073Parser == null) {
- valuePinLabel_5073Parser = new PinValueParser();
- }
- return valuePinLabel_5073Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser valuePinLabel_5111Parser;
-
- /**
- * @generated
- */
- private IParser getValuePinLabel_5111Parser() {
- if (valuePinLabel_5111Parser == null) {
- valuePinLabel_5111Parser = new AppliedStereotypeParser();
- }
- return valuePinLabel_5111Parser;
- }
-
- /**
- * @generated
- */
- private PinParser actionInputPinLabel_5074Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5074Parser() {
- if (actionInputPinLabel_5074Parser == null) {
- actionInputPinLabel_5074Parser = new PinParser();
- }
- return actionInputPinLabel_5074Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser actionInputPinLabel_5075Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5075Parser() {
- if (actionInputPinLabel_5075Parser == null) {
- actionInputPinLabel_5075Parser = new PinValueParser();
- }
- return actionInputPinLabel_5075Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser actionInputPinLabel_5112Parser;
-
- /**
- * @generated
- */
- private IParser getActionInputPinLabel_5112Parser() {
- if (actionInputPinLabel_5112Parser == null) {
- actionInputPinLabel_5112Parser = new AppliedStereotypeParser();
- }
- return actionInputPinLabel_5112Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5076Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5076Parser() {
- if (inputPinLabel_5076Parser == null) {
- inputPinLabel_5076Parser = new PinParser();
- }
- return inputPinLabel_5076Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5113Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5113Parser() {
- if (inputPinLabel_5113Parser == null) {
- inputPinLabel_5113Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5113Parser;
- }
-
- /**
- * @generated
- */
- private ActivityParameterNodeParser activityParameterNodeLabel_5071Parser;
-
- /**
- * @generated
- */
- private IParser getActivityParameterNodeLabel_5071Parser() {
- if (activityParameterNodeLabel_5071Parser == null) {
- activityParameterNodeLabel_5071Parser = new ActivityParameterNodeParser();
- }
- return activityParameterNodeLabel_5071Parser;
- }
-
- /**
- * @generated
- */
- private AcceptEventActionParser acceptEventActionLabel_5078Parser;
-
- /**
- * @generated
- */
- private IParser getAcceptEventActionLabel_5078Parser() {
- if (acceptEventActionLabel_5078Parser == null) {
- acceptEventActionLabel_5078Parser = new AcceptEventActionParser();
- }
- return acceptEventActionLabel_5078Parser;
- }
-
- /**
- * @generated
- */
- private AcceptTimeEventActionParser acceptEventActionLabel_5079Parser;
-
- /**
- * @generated
- */
- private IParser getAcceptEventActionLabel_5079Parser() {
- if (acceptEventActionLabel_5079Parser == null) {
- acceptEventActionLabel_5079Parser = new AcceptTimeEventActionParser();
- }
- return acceptEventActionLabel_5079Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser acceptEventActionLabel_5115Parser;
-
- /**
- * @generated
- */
- private IParser getAcceptEventActionLabel_5115Parser() {
- if (acceptEventActionLabel_5115Parser == null) {
- acceptEventActionLabel_5115Parser = new AppliedStereotypeParser();
- }
- return acceptEventActionLabel_5115Parser;
- }
-
- /**
- * @generated
- */
- private PinParser outputPinLabel_5077Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5077Parser() {
- if (outputPinLabel_5077Parser == null) {
- outputPinLabel_5077Parser = new PinParser();
- }
- return outputPinLabel_5077Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser outputPinLabel_5114Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5114Parser() {
- if (outputPinLabel_5114Parser == null) {
- outputPinLabel_5114Parser = new AppliedStereotypeParser();
- }
- return outputPinLabel_5114Parser;
- }
-
- /**
- * @generated
- */
- private StructuredActivityNodeKeywordParser structuredActivityNodeLabel_5117Parser;
-
- /**
- * @generated
- */
- private IParser getStructuredActivityNodeLabel_5117Parser() {
- if (structuredActivityNodeLabel_5117Parser == null) {
- structuredActivityNodeLabel_5117Parser = new StructuredActivityNodeKeywordParser();
- }
- return structuredActivityNodeLabel_5117Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5178Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5178Parser() {
- if (inputPinLabel_5178Parser == null) {
- inputPinLabel_5178Parser = new PinParser();
- }
- return inputPinLabel_5178Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5179Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5179Parser() {
- if (inputPinLabel_5179Parser == null) {
- inputPinLabel_5179Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5179Parser;
- }
-
- /**
- * @generated
- */
- private IParser activityPartitionName_5118Parser;
-
- /**
- * @generated
- */
- private IParser getActivityPartitionName_5118Parser() {
- if (activityPartitionName_5118Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- activityPartitionName_5118Parser = parser;
- }
- return activityPartitionName_5118Parser;
- }
-
- /**
- * @generated
- */
- private ActivitySingleExecutionParser namedElementName_5129Parser;
-
- /**
- * @generated
- */
- private IParser getNamedElementName_5129Parser() {
- if (namedElementName_5129Parser == null) {
- namedElementName_5129Parser = new ActivitySingleExecutionParser();
- }
- return namedElementName_5129Parser;
- }
-
- /**
- * @generated
- */
- private IParser createObjectActionName_5148Parser;
-
- /**
- * @generated
- */
- private IParser getCreateObjectActionName_5148Parser() {
- if (createObjectActionName_5148Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- createObjectActionName_5148Parser = parser;
- }
- return createObjectActionName_5148Parser;
- }
-
- /**
- * @generated
- */
- private PinParser outputPinLabel_5146Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5146Parser() {
- if (outputPinLabel_5146Parser == null) {
- outputPinLabel_5146Parser = new PinParser();
- }
- return outputPinLabel_5146Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser outputPinLabel_5147Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5147Parser() {
- if (outputPinLabel_5147Parser == null) {
- outputPinLabel_5147Parser = new AppliedStereotypeParser();
- }
- return outputPinLabel_5147Parser;
- }
-
- /**
- * @generated
- */
- private IParser readStructuralFeatureActionName_5153Parser;
-
- /**
- * @generated
- */
- private IParser getReadStructuralFeatureActionName_5153Parser() {
- if (readStructuralFeatureActionName_5153Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- readStructuralFeatureActionName_5153Parser = parser;
- }
- return readStructuralFeatureActionName_5153Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5149Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5149Parser() {
- if (inputPinLabel_5149Parser == null) {
- inputPinLabel_5149Parser = new PinParser();
- }
- return inputPinLabel_5149Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5150Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5150Parser() {
- if (inputPinLabel_5150Parser == null) {
- inputPinLabel_5150Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5150Parser;
- }
-
- /**
- * @generated
- */
- private PinParser outputPinLabel_5151Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5151Parser() {
- if (outputPinLabel_5151Parser == null) {
- outputPinLabel_5151Parser = new PinParser();
- }
- return outputPinLabel_5151Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser outputPinLabel_5152Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5152Parser() {
- if (outputPinLabel_5152Parser == null) {
- outputPinLabel_5152Parser = new AppliedStereotypeParser();
- }
- return outputPinLabel_5152Parser;
- }
-
- /**
- * @generated
- */
- private IParser addStructuralFeatureValueActionName_5160Parser;
-
- /**
- * @generated
- */
- private IParser getAddStructuralFeatureValueActionName_5160Parser() {
- if (addStructuralFeatureValueActionName_5160Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- addStructuralFeatureValueActionName_5160Parser = parser;
- }
- return addStructuralFeatureValueActionName_5160Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5154Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5154Parser() {
- if (inputPinLabel_5154Parser == null) {
- inputPinLabel_5154Parser = new PinParser();
- }
- return inputPinLabel_5154Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5155Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5155Parser() {
- if (inputPinLabel_5155Parser == null) {
- inputPinLabel_5155Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5155Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5156Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5156Parser() {
- if (inputPinLabel_5156Parser == null) {
- inputPinLabel_5156Parser = new PinParser();
- }
- return inputPinLabel_5156Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5157Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5157Parser() {
- if (inputPinLabel_5157Parser == null) {
- inputPinLabel_5157Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5157Parser;
- }
-
- /**
- * @generated
- */
- private PinParser outputPinLabel_5158Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5158Parser() {
- if (outputPinLabel_5158Parser == null) {
- outputPinLabel_5158Parser = new PinParser();
- }
- return outputPinLabel_5158Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser outputPinLabel_5159Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5159Parser() {
- if (outputPinLabel_5159Parser == null) {
- outputPinLabel_5159Parser = new AppliedStereotypeParser();
- }
- return outputPinLabel_5159Parser;
- }
-
- /**
- * @generated
- */
- private IParser destroyObjectActionName_5163Parser;
-
- /**
- * @generated
- */
- private IParser getDestroyObjectActionName_5163Parser() {
- if (destroyObjectActionName_5163Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- destroyObjectActionName_5163Parser = parser;
- }
- return destroyObjectActionName_5163Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5161Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5161Parser() {
- if (inputPinLabel_5161Parser == null) {
- inputPinLabel_5161Parser = new PinParser();
- }
- return inputPinLabel_5161Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5162Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5162Parser() {
- if (inputPinLabel_5162Parser == null) {
- inputPinLabel_5162Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5162Parser;
- }
-
- /**
- * @generated
- */
- private IParser readVariableActionName_5166Parser;
-
- /**
- * @generated
- */
- private IParser getReadVariableActionName_5166Parser() {
- if (readVariableActionName_5166Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- readVariableActionName_5166Parser = parser;
- }
- return readVariableActionName_5166Parser;
- }
-
- /**
- * @generated
- */
- private PinParser outputPinLabel_5164Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5164Parser() {
- if (outputPinLabel_5164Parser == null) {
- outputPinLabel_5164Parser = new PinParser();
- }
- return outputPinLabel_5164Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser outputPinLabel_5165Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5165Parser() {
- if (outputPinLabel_5165Parser == null) {
- outputPinLabel_5165Parser = new AppliedStereotypeParser();
- }
- return outputPinLabel_5165Parser;
- }
-
- /**
- * @generated
- */
- private IParser addVariableValueActionName_5171Parser;
-
- /**
- * @generated
- */
- private IParser getAddVariableValueActionName_5171Parser() {
- if (addVariableValueActionName_5171Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- addVariableValueActionName_5171Parser = parser;
- }
- return addVariableValueActionName_5171Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5167Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5167Parser() {
- if (inputPinLabel_5167Parser == null) {
- inputPinLabel_5167Parser = new PinParser();
- }
- return inputPinLabel_5167Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5168Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5168Parser() {
- if (inputPinLabel_5168Parser == null) {
- inputPinLabel_5168Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5168Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5169Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5169Parser() {
- if (inputPinLabel_5169Parser == null) {
- inputPinLabel_5169Parser = new PinParser();
- }
- return inputPinLabel_5169Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5170Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5170Parser() {
- if (inputPinLabel_5170Parser == null) {
- inputPinLabel_5170Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5170Parser;
- }
-
- /**
- * @generated
- */
- private IParser broadcastSignalActionName_5175Parser;
-
- /**
- * @generated
- */
- private IParser getBroadcastSignalActionName_5175Parser() {
- if (broadcastSignalActionName_5175Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- broadcastSignalActionName_5175Parser = parser;
- }
- return broadcastSignalActionName_5175Parser;
- }
-
- /**
- * @generated
- */
- private PinParser inputPinLabel_5172Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5172Parser() {
- if (inputPinLabel_5172Parser == null) {
- inputPinLabel_5172Parser = new PinParser();
- }
- return inputPinLabel_5172Parser;
- }
-
- /**
- * @generated
- */
- private PinValueParser inputPinLabel_5173Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5173Parser() {
- if (inputPinLabel_5173Parser == null) {
- inputPinLabel_5173Parser = new PinValueParser();
- }
- return inputPinLabel_5173Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser inputPinLabel_5174Parser;
-
- /**
- * @generated
- */
- private IParser getInputPinLabel_5174Parser() {
- if (inputPinLabel_5174Parser == null) {
- inputPinLabel_5174Parser = new AppliedStereotypeParser();
- }
- return inputPinLabel_5174Parser;
- }
-
- /**
- * @generated
- */
- private ObjectNodeParser centralBufferNodeLabel_5176Parser;
-
- /**
- * @generated
- */
- private IParser getCentralBufferNodeLabel_5176Parser() {
- if (centralBufferNodeLabel_5176Parser == null) {
- centralBufferNodeLabel_5176Parser = new ObjectNodeParser();
- }
- return centralBufferNodeLabel_5176Parser;
- }
-
- /**
- * @generated
- */
- private ObjectNodeSelectionParser centralBufferNodeLabel_5177Parser;
-
- /**
- * @generated
- */
- private IParser getCentralBufferNodeLabel_5177Parser() {
- if (centralBufferNodeLabel_5177Parser == null) {
- centralBufferNodeLabel_5177Parser = new ObjectNodeSelectionParser();
- }
- return centralBufferNodeLabel_5177Parser;
- }
-
- /**
- * @generated
- */
- private IParser constraintName_5189Parser;
-
- /**
- * @generated
- */
- private IParser getConstraintName_5189Parser() {
- if (constraintName_5189Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- constraintName_5189Parser = parser;
- }
- return constraintName_5189Parser;
- }
-
- /**
- * @generated
- */
- private ConstraintParser constraintSpecification_5190Parser;
-
- /**
- * @generated
- */
- private IParser getConstraintSpecification_5190Parser() {
- if (constraintSpecification_5190Parser == null) {
- constraintSpecification_5190Parser = new ConstraintParser();
- }
- return constraintSpecification_5190Parser;
- }
-
- /**
- * @generated
- */
- private CommentParser commentBody_5138Parser;
-
- /**
- * @generated
- */
- private IParser getCommentBody_5138Parser() {
- if (commentBody_5138Parser == null) {
- commentBody_5138Parser = new CommentParser();
- }
- return commentBody_5138Parser;
- }
-
- /**
- * @generated
- */
- private IParser readSelfActionName_5139Parser;
-
- /**
- * @generated
- */
- private IParser getReadSelfActionName_5139Parser() {
- if (readSelfActionName_5139Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- readSelfActionName_5139Parser = parser;
- }
- return readSelfActionName_5139Parser;
- }
-
- /**
- * @generated
- */
- private PinParser outputPinLabel_5144Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5144Parser() {
- if (outputPinLabel_5144Parser == null) {
- outputPinLabel_5144Parser = new PinParser();
- }
- return outputPinLabel_5144Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser outputPinLabel_5145Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5145Parser() {
- if (outputPinLabel_5145Parser == null) {
- outputPinLabel_5145Parser = new AppliedStereotypeParser();
- }
- return outputPinLabel_5145Parser;
- }
-
- /**
- * @generated
- */
- private IParser activityName_5142Parser;
-
- /**
- * @generated
- */
- private IParser getActivityName_5142Parser() {
- if (activityName_5142Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- activityName_5142Parser = parser;
- }
- return activityName_5142Parser;
- }
-
- /**
- * @generated
- */
- private ActivitySingleExecutionParser activityIsSingleExecution_5143Parser;
-
- /**
- * @generated
- */
- private IParser getActivityIsSingleExecution_5143Parser() {
- if (activityIsSingleExecution_5143Parser == null) {
- activityIsSingleExecution_5143Parser = new ActivitySingleExecutionParser();
- }
- return activityIsSingleExecution_5143Parser;
- }
-
- /**
- * @generated
- */
- private IParser valueSpecificationActionName_5126Parser;
-
- /**
- * @generated
- */
- private IParser getValueSpecificationActionName_5126Parser() {
- if (valueSpecificationActionName_5126Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- valueSpecificationActionName_5126Parser = parser;
- }
- return valueSpecificationActionName_5126Parser;
- }
-
- /**
- * @generated
- */
- private PinParser outputPinLabel_5124Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5124Parser() {
- if (outputPinLabel_5124Parser == null) {
- outputPinLabel_5124Parser = new PinParser();
- }
- return outputPinLabel_5124Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser outputPinLabel_5125Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5125Parser() {
- if (outputPinLabel_5125Parser == null) {
- outputPinLabel_5125Parser = new AppliedStereotypeParser();
- }
- return outputPinLabel_5125Parser;
- }
-
- /**
- * @generated
- */
- private ObjectNodeParser dataStoreNodeLabel_5127Parser;
-
- /**
- * @generated
- */
- private IParser getDataStoreNodeLabel_5127Parser() {
- if (dataStoreNodeLabel_5127Parser == null) {
- dataStoreNodeLabel_5127Parser = new ObjectNodeParser();
- }
- return dataStoreNodeLabel_5127Parser;
- }
-
- /**
- * @generated
- */
- private ObjectNodeSelectionParser dataStoreNodeLabel_5128Parser;
-
- /**
- * @generated
- */
- private IParser getDataStoreNodeLabel_5128Parser() {
- if (dataStoreNodeLabel_5128Parser == null) {
- dataStoreNodeLabel_5128Parser = new ObjectNodeSelectionParser();
- }
- return dataStoreNodeLabel_5128Parser;
- }
-
- /**
- * @generated
- */
- private StructuredActivityNodeKeywordParser conditionalNodeLabel_5119Parser;
-
- /**
- * @generated
- */
- private IParser getConditionalNodeLabel_5119Parser() {
- if (conditionalNodeLabel_5119Parser == null) {
- conditionalNodeLabel_5119Parser = new StructuredActivityNodeKeywordParser();
- }
- return conditionalNodeLabel_5119Parser;
- }
-
- /**
- * @generated
- */
- private StructuredActivityNodeKeywordParser expansionRegionLabel_5120Parser;
-
- /**
- * @generated
- */
- private IParser getExpansionRegionLabel_5120Parser() {
- if (expansionRegionLabel_5120Parser == null) {
- expansionRegionLabel_5120Parser = new StructuredActivityNodeKeywordParser();
- }
- return expansionRegionLabel_5120Parser;
- }
-
- /**
- * @generated
- */
- private StructuredActivityNodeKeywordParser loopNodeLabel_5121Parser;
-
- /**
- * @generated
- */
- private IParser getLoopNodeLabel_5121Parser() {
- if (loopNodeLabel_5121Parser == null) {
- loopNodeLabel_5121Parser = new StructuredActivityNodeKeywordParser();
- }
- return loopNodeLabel_5121Parser;
- }
-
- /**
- * @generated
- */
- private PinParser outputPinLabel_5184Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5184Parser() {
- if (outputPinLabel_5184Parser == null) {
- outputPinLabel_5184Parser = new PinParser();
- }
- return outputPinLabel_5184Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser outputPinLabel_5185Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5185Parser() {
- if (outputPinLabel_5185Parser == null) {
- outputPinLabel_5185Parser = new AppliedStereotypeParser();
- }
- return outputPinLabel_5185Parser;
- }
-
- /**
- * @generated
- */
- private PinParser outputPinLabel_5186Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5186Parser() {
- if (outputPinLabel_5186Parser == null) {
- outputPinLabel_5186Parser = new PinParser();
- }
- return outputPinLabel_5186Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser outputPinLabel_5183Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5183Parser() {
- if (outputPinLabel_5183Parser == null) {
- outputPinLabel_5183Parser = new AppliedStereotypeParser();
- }
- return outputPinLabel_5183Parser;
- }
-
- /**
- * @generated
- */
- private PinParser outputPinLabel_5187Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5187Parser() {
- if (outputPinLabel_5187Parser == null) {
- outputPinLabel_5187Parser = new PinParser();
- }
- return outputPinLabel_5187Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser outputPinLabel_5188Parser;
-
- /**
- * @generated
- */
- private IParser getOutputPinLabel_5188Parser() {
- if (outputPinLabel_5188Parser == null) {
- outputPinLabel_5188Parser = new AppliedStereotypeParser();
- }
- return outputPinLabel_5188Parser;
- }
-
- /**
- * @generated
- */
- private StructuredActivityNodeKeywordParser sequenceNodeLabel_5123Parser;
-
- /**
- * @generated
- */
- private IParser getSequenceNodeLabel_5123Parser() {
- if (sequenceNodeLabel_5123Parser == null) {
- sequenceNodeLabel_5123Parser = new StructuredActivityNodeKeywordParser();
- }
- return sequenceNodeLabel_5123Parser;
- }
-
- /**
- * @generated
- */
- private IParser intervalConstraintName_5036Parser;
-
- /**
- * @generated
- */
- private IParser getIntervalConstraintName_5036Parser() {
- if (intervalConstraintName_5036Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- intervalConstraintName_5036Parser = parser;
- }
- return intervalConstraintName_5036Parser;
- }
-
- /**
- * @generated
- */
- private ConstraintParser intervalConstraintLabel_5134Parser;
-
- /**
- * @generated
- */
- private IParser getIntervalConstraintLabel_5134Parser() {
- if (intervalConstraintLabel_5134Parser == null) {
- intervalConstraintLabel_5134Parser = new ConstraintParser();
- }
- return intervalConstraintLabel_5134Parser;
- }
-
- /**
- * @generated
- */
- private IParser intervalConstraintName_5037Parser;
-
- /**
- * @generated
- */
- private IParser getIntervalConstraintName_5037Parser() {
- if (intervalConstraintName_5037Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- intervalConstraintName_5037Parser = parser;
- }
- return intervalConstraintName_5037Parser;
- }
-
- /**
- * @generated
- */
- private ConstraintParser intervalConstraintLabel_5135Parser;
-
- /**
- * @generated
- */
- private IParser getIntervalConstraintLabel_5135Parser() {
- if (intervalConstraintLabel_5135Parser == null) {
- intervalConstraintLabel_5135Parser = new ConstraintParser();
- }
- return intervalConstraintLabel_5135Parser;
- }
-
- /**
- * @generated
- */
- private IParser durationConstraintName_5038Parser;
-
- /**
- * @generated
- */
- private IParser getDurationConstraintName_5038Parser() {
- if (durationConstraintName_5038Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- durationConstraintName_5038Parser = parser;
- }
- return durationConstraintName_5038Parser;
- }
-
- /**
- * @generated
- */
- private ConstraintParser durationConstraintLabel_5130Parser;
-
- /**
- * @generated
- */
- private IParser getDurationConstraintLabel_5130Parser() {
- if (durationConstraintLabel_5130Parser == null) {
- durationConstraintLabel_5130Parser = new ConstraintParser();
- }
- return durationConstraintLabel_5130Parser;
- }
-
- /**
- * @generated
- */
- private IParser durationConstraintName_5039Parser;
-
- /**
- * @generated
- */
- private IParser getDurationConstraintName_5039Parser() {
- if (durationConstraintName_5039Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- durationConstraintName_5039Parser = parser;
- }
- return durationConstraintName_5039Parser;
- }
-
- /**
- * @generated
- */
- private ConstraintParser durationConstraintLabel_5131Parser;
-
- /**
- * @generated
- */
- private IParser getDurationConstraintLabel_5131Parser() {
- if (durationConstraintLabel_5131Parser == null) {
- durationConstraintLabel_5131Parser = new ConstraintParser();
- }
- return durationConstraintLabel_5131Parser;
- }
-
- /**
- * @generated
- */
- private IParser timeConstraintName_5040Parser;
-
- /**
- * @generated
- */
- private IParser getTimeConstraintName_5040Parser() {
- if (timeConstraintName_5040Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- timeConstraintName_5040Parser = parser;
- }
- return timeConstraintName_5040Parser;
- }
-
- /**
- * @generated
- */
- private ConstraintParser timeConstraintLabel_5132Parser;
-
- /**
- * @generated
- */
- private IParser getTimeConstraintLabel_5132Parser() {
- if (timeConstraintLabel_5132Parser == null) {
- timeConstraintLabel_5132Parser = new ConstraintParser();
- }
- return timeConstraintLabel_5132Parser;
- }
-
- /**
- * @generated
- */
- private IParser timeConstraintName_5041Parser;
-
- /**
- * @generated
- */
- private IParser getTimeConstraintName_5041Parser() {
- if (timeConstraintName_5041Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- timeConstraintName_5041Parser = parser;
- }
- return timeConstraintName_5041Parser;
- }
-
- /**
- * @generated
- */
- private ConstraintParser timeConstraintLabel_5133Parser;
-
- /**
- * @generated
- */
- private IParser getTimeConstraintLabel_5133Parser() {
- if (timeConstraintLabel_5133Parser == null) {
- timeConstraintLabel_5133Parser = new ConstraintParser();
- }
- return timeConstraintLabel_5133Parser;
- }
-
- /**
- * @generated
- */
- private IParser objectFlowName_6001Parser;
-
- /**
- * @generated
- */
- private IParser getObjectFlowName_6001Parser() {
- if (objectFlowName_6001Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- objectFlowName_6001Parser = parser;
- }
- return objectFlowName_6001Parser;
- }
-
- /**
- * @generated
- */
- private ActivityEdgeWeightParser objectFlowLabel_6002Parser;
-
- /**
- * @generated
- */
- private IParser getObjectFlowLabel_6002Parser() {
- if (objectFlowLabel_6002Parser == null) {
- objectFlowLabel_6002Parser = new ActivityEdgeWeightParser();
- }
- return objectFlowLabel_6002Parser;
- }
-
- /**
- * @generated
- */
- private ObjectFlowSelectionParser objectFlowLabel_6005Parser;
-
- /**
- * @generated
- */
- private IParser getObjectFlowLabel_6005Parser() {
- if (objectFlowLabel_6005Parser == null) {
- objectFlowLabel_6005Parser = new ObjectFlowSelectionParser();
- }
- return objectFlowLabel_6005Parser;
- }
-
- /**
- * @generated
- */
- private ObjectFlowTransformationParser objectFlowLabel_6006Parser;
-
- /**
- * @generated
- */
- private IParser getObjectFlowLabel_6006Parser() {
- if (objectFlowLabel_6006Parser == null) {
- objectFlowLabel_6006Parser = new ObjectFlowTransformationParser();
- }
- return objectFlowLabel_6006Parser;
- }
-
- /**
- * @generated
- */
- private DecisionInputFlowParser objectFlowLabel_6007Parser;
-
- /**
- * @generated
- */
- private IParser getObjectFlowLabel_6007Parser() {
- if (objectFlowLabel_6007Parser == null) {
- objectFlowLabel_6007Parser = new DecisionInputFlowParser();
- }
- return objectFlowLabel_6007Parser;
- }
-
- /**
- * @generated
- */
- private EdgeGuardParser objectFlowLabel_6008Parser;
-
- /**
- * @generated
- */
- private IParser getObjectFlowLabel_6008Parser() {
- if (objectFlowLabel_6008Parser == null) {
- objectFlowLabel_6008Parser = new EdgeGuardParser();
- }
- return objectFlowLabel_6008Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser objectFlowLabel_6010Parser;
-
- /**
- * @generated
- */
- private IParser getObjectFlowLabel_6010Parser() {
- if (objectFlowLabel_6010Parser == null) {
- objectFlowLabel_6010Parser = new AppliedStereotypeParser();
- }
- return objectFlowLabel_6010Parser;
- }
-
- /**
- * @generated
- */
- private IParser controlFlowName_6003Parser;
-
- /**
- * @generated
- */
- private IParser getControlFlowName_6003Parser() {
- if (controlFlowName_6003Parser == null) {
- EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
- MessageFormatParser parser = new MessageFormatParser(features);
- controlFlowName_6003Parser = parser;
- }
- return controlFlowName_6003Parser;
- }
-
- /**
- * @generated
- */
- private ActivityEdgeWeightParser controlFlowLabel_6004Parser;
-
- /**
- * @generated
- */
- private IParser getControlFlowLabel_6004Parser() {
- if (controlFlowLabel_6004Parser == null) {
- controlFlowLabel_6004Parser = new ActivityEdgeWeightParser();
- }
- return controlFlowLabel_6004Parser;
- }
-
- /**
- * @generated
- */
- private EdgeGuardParser controlFlowLabel_6009Parser;
-
- /**
- * @generated
- */
- private IParser getControlFlowLabel_6009Parser() {
- if (controlFlowLabel_6009Parser == null) {
- controlFlowLabel_6009Parser = new EdgeGuardParser();
- }
- return controlFlowLabel_6009Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser controlFlowLabel_6011Parser;
-
- /**
- * @generated
- */
- private IParser getControlFlowLabel_6011Parser() {
- if (controlFlowLabel_6011Parser == null) {
- controlFlowLabel_6011Parser = new AppliedStereotypeParser();
- }
- return controlFlowLabel_6011Parser;
- }
-
- /**
- * @generated
- */
- private ExceptionHandlerTypeParser exceptionHandlerLabel_6012Parser;
-
- /**
- * @generated
- */
- private IParser getExceptionHandlerLabel_6012Parser() {
- if (exceptionHandlerLabel_6012Parser == null) {
- exceptionHandlerLabel_6012Parser = new ExceptionHandlerTypeParser();
- }
- return exceptionHandlerLabel_6012Parser;
- }
-
- /**
- * @generated
- */
- protected IParser getParser(int visualID) {
- switch (visualID) {
- case ActivityNameEditPart.VISUAL_ID:
- return getActivityName_5001Parser();
- case ActivityIsSingleExecutionEditPart.VISUAL_ID:
- return getActivityIsSingleExecution_5002Parser();
- case ParameterEditPart.VISUAL_ID:
- return getParameter_3001Parser();
- case ConstraintInActivityAsPrecondEditPart.VISUAL_ID:
- return getConstraint_3002Parser();
- case ConstraintInActivityAsPostcondEditPart.VISUAL_ID:
- return getConstraint_3003Parser();
- case InitialNodeAppliedStereotypeEditPart.VISUAL_ID:
- return getInitialNodeLabel_5080Parser();
- case ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID:
- return getActivityFinalNodeLabel_5081Parser();
- case FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID:
- return getFlowFinalNodeLabel_5082Parser();
- case OpaqueActionNameEditPart.VISUAL_ID:
- return getOpaqueActionName_5003Parser();
- case ValuePinInOActLabelEditPart.VISUAL_ID:
- return getValuePinLabel_5011Parser();
- case ValuePinInOActValueEditPart.VISUAL_ID:
- return getValuePinLabel_5024Parser();
- case ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID:
- return getValuePinLabel_5083Parser();
- case ActionInputPinInOActLabelEditPart.VISUAL_ID:
- return getActionInputPinLabel_5012Parser();
- case ActionInputPinInOActValueEditPart.VISUAL_ID:
- return getActionInputPinLabel_5025Parser();
- case ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID:
- return getActionInputPinLabel_5084Parser();
- case InputPinInOActLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5009Parser();
- case InputPinInOActAppliedStereotypeEditPart.VISUAL_ID:
- return getInputPinLabel_5085Parser();
- case OutputPinInOActLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5010Parser();
- case OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID:
- return getOutputPinLabel_5086Parser();
- case CallBehaviorActionNameEditPart.VISUAL_ID:
- return getCallBehaviorActionLabel_5004Parser();
- case ValuePinInCBActLabelEditPart.VISUAL_ID:
- return getValuePinLabel_5013Parser();
- case ValuePinInCBActValueEditPart.VISUAL_ID:
- return getValuePinLabel_5026Parser();
- case ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID:
- return getValuePinLabel_5087Parser();
- case ActionInputPinInCBActLabelEditPart.VISUAL_ID:
- return getActionInputPinLabel_5014Parser();
- case ActionInputPinInCBActValueEditPart.VISUAL_ID:
- return getActionInputPinLabel_5027Parser();
- case ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID:
- return getActionInputPinLabel_5088Parser();
- case InputPinInCBActLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5015Parser();
- case InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID:
- return getInputPinLabel_5089Parser();
- case OutputPinInCBActLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5016Parser();
- case OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID:
- return getOutputPinLabel_5090Parser();
- case CallOperationActionNameEditPart.VISUAL_ID:
- return getCallOperationActionLabel_5006Parser();
- case ActionInputPinInCOActLabelEditPart.VISUAL_ID:
- return getActionInputPinLabel_5017Parser();
- case ActionInputPinInCOActValueEditPart.VISUAL_ID:
- return getActionInputPinLabel_5028Parser();
- case ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID:
- return getActionInputPinLabel_5091Parser();
- case ValuePinInCOActLabelEditPart.VISUAL_ID:
- return getValuePinLabel_5018Parser();
- case ValuePinInCOActValueEditPart.VISUAL_ID:
- return getValuePinLabel_5029Parser();
- case ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID:
- return getValuePinLabel_5092Parser();
- case InputPinInCOActLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5019Parser();
- case InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID:
- return getInputPinLabel_5093Parser();
- case OutputPinInCOActLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5020Parser();
- case OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID:
- return getOutputPinLabel_5094Parser();
- case ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID:
- return getValuePinLabel_5021Parser();
- case ValuePinInCOActAsTargetValueEditPart.VISUAL_ID:
- return getValuePinLabel_5030Parser();
- case ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return getValuePinLabel_5095Parser();
- case ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID:
- return getActionInputPinLabel_5022Parser();
- case ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID:
- return getActionInputPinLabel_5031Parser();
- case ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return getActionInputPinLabel_5096Parser();
- case InputPinInCOActAsTargetLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5023Parser();
- case InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return getInputPinLabel_5097Parser();
- case DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
- return getDurationConstraintName_5038Parser();
- case DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
- return getDurationConstraintLabel_5130Parser();
- case DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
- return getDurationConstraintName_5039Parser();
- case DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
- return getDurationConstraintLabel_5131Parser();
- case TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
- return getTimeConstraintName_5040Parser();
- case TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
- return getTimeConstraintLabel_5132Parser();
- case TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
- return getTimeConstraintName_5041Parser();
- case TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
- return getTimeConstraintLabel_5133Parser();
- case IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
- return getIntervalConstraintName_5036Parser();
- case IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
- return getIntervalConstraintLabel_5134Parser();
- case IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
- return getIntervalConstraintName_5037Parser();
- case IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
- return getIntervalConstraintLabel_5135Parser();
- case ConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
- return getConstraintName_5007Parser();
- case ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
- return getConstraintLabel_5136Parser();
- case ConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
- return getConstraintName_5008Parser();
- case ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
- return getConstraintLabel_5137Parser();
- case DecisionInputEditPart.VISUAL_ID:
- return getDecisionNodeLabel_5043Parser();
- case DecisionNodeAppliedStereotypeEditPart.VISUAL_ID:
- return getDecisionNodeLabel_5098Parser();
- case MergeNodeAppliedStereotypeEditPart.VISUAL_ID:
- return getMergeNodeLabel_5099Parser();
- case ForkNodeAppliedStereotypeEditPart.VISUAL_ID:
- return getForkNodeLabel_5100Parser();
- case JoinSpecEditPart.VISUAL_ID:
- return getJoinNodeLabel_5042Parser();
- case JoinNodeAppliedStereotypeEditPart.VISUAL_ID:
- return getJoinNodeLabel_5101Parser();
- case DataStoreNodeLabelEditPart.VISUAL_ID:
- return getDataStoreNodeLabel_5127Parser();
- case DataStoreSelectionEditPart.VISUAL_ID:
- return getDataStoreNodeLabel_5128Parser();
- case SendObjectActionNameEditPart.VISUAL_ID:
- return getSendObjectActionName_5059Parser();
- case ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID:
- return getValuePinLabel_5049Parser();
- case ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID:
- return getValuePinLabel_5050Parser();
- case ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID:
- return getValuePinLabel_5102Parser();
- case ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID:
- return getActionInputPinLabel_5051Parser();
- case ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID:
- return getActionInputPinLabel_5052Parser();
- case ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID:
- return getActionInputPinLabel_5103Parser();
- case InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5053Parser();
- case InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID:
- return getInputPinLabel_5104Parser();
- case ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID:
- return getValuePinLabel_5054Parser();
- case ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID:
- return getValuePinLabel_5055Parser();
- case ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return getValuePinLabel_5105Parser();
- case ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID:
- return getActionInputPinLabel_5056Parser();
- case ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID:
- return getActionInputPinLabel_5057Parser();
- case ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return getActionInputPinLabel_5106Parser();
- case InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5058Parser();
- case InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return getInputPinLabel_5107Parser();
- case SendSignalActionNameEditPart.VISUAL_ID:
- return getSendSignalActionName_5060Parser();
- case ActionInputPinInSendSigActLabelEditPart.VISUAL_ID:
- return getActionInputPinLabel_5061Parser();
- case ActionInputPinInSendSigActValueEditPart.VISUAL_ID:
- return getActionInputPinLabel_5062Parser();
- case ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID:
- return getActionInputPinLabel_5108Parser();
- case ValuePinInSendSigActLabelEditPart.VISUAL_ID:
- return getValuePinLabel_5063Parser();
- case ValuePinInSendSigActValueEditPart.VISUAL_ID:
- return getValuePinLabel_5064Parser();
- case ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID:
- return getValuePinLabel_5109Parser();
- case InputPinInSendSigActLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5065Parser();
- case InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID:
- return getInputPinLabel_5110Parser();
- case ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID:
- return getValuePinLabel_5072Parser();
- case ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID:
- return getValuePinLabel_5073Parser();
- case ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return getValuePinLabel_5111Parser();
- case ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID:
- return getActionInputPinLabel_5074Parser();
- case ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID:
- return getActionInputPinLabel_5075Parser();
- case ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return getActionInputPinLabel_5112Parser();
- case InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5076Parser();
- case InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
- return getInputPinLabel_5113Parser();
- case ParameterNodeNameEditPart.VISUAL_ID:
- return getActivityParameterNodeLabel_5071Parser();
- case AcceptEventActionLabelEditPart.VISUAL_ID:
- return getAcceptEventActionLabel_5078Parser();
- case AcceptTimeEventActionLabelEditPart.VISUAL_ID:
- return getAcceptEventActionLabel_5079Parser();
- case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID:
- return getAcceptEventActionLabel_5115Parser();
- case OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5077Parser();
- case OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID:
- return getOutputPinLabel_5114Parser();
- case ValueSpecificationActionNameEditPart.VISUAL_ID:
- return getValueSpecificationActionName_5126Parser();
- case OutputPinInValSpecActLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5124Parser();
- case OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID:
- return getOutputPinLabel_5125Parser();
- case ConditionalNodeKeywordEditPart.VISUAL_ID:
- return getConditionalNodeLabel_5119Parser();
- case ExpansionRegionKeywordEditPart.VISUAL_ID:
- return getExpansionRegionLabel_5120Parser();
- case LoopNodeKeywordEditPart.VISUAL_ID:
- return getLoopNodeLabel_5121Parser();
- case OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5184Parser();
- case OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID:
- return getOutputPinLabel_5185Parser();
- case OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5186Parser();
- case OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID:
- return getOutputPinLabel_5183Parser();
- case OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5187Parser();
- case OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID:
- return getOutputPinLabel_5188Parser();
- case SequenceNodeKeywordEditPart.VISUAL_ID:
- return getSequenceNodeLabel_5123Parser();
- case StructuredActivityNodeKeywordEditPart.VISUAL_ID:
- return getStructuredActivityNodeLabel_5117Parser();
- case InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5178Parser();
- case InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID:
- return getInputPinLabel_5179Parser();
- case ActivityPartitionNameEditPart.VISUAL_ID:
- return getActivityPartitionName_5118Parser();
- case CommentBodyLabelEditPart.VISUAL_ID:
- return getCommentBody_5138Parser();
- case ReadSelfActionNameEditPart.VISUAL_ID:
- return getReadSelfActionName_5139Parser();
- case OutputPinInReadSelfActionLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5144Parser();
- case OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID:
- return getOutputPinLabel_5145Parser();
- case ActivityNameEditPartCN.VISUAL_ID:
- return getActivityName_5142Parser();
- case ActivityIsSingleExecutionCNEditPart.VISUAL_ID:
- return getActivityIsSingleExecution_5143Parser();
- case CreateObjectActionNameEditPart.VISUAL_ID:
- return getCreateObjectActionName_5148Parser();
- case OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5146Parser();
- case OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5147Parser();
- case ShapeNamedElementNameEditPart.VISUAL_ID:
- return getNamedElementName_5129Parser();
- case ReadStructuralFeatureActionNameEditPart.VISUAL_ID:
- return getReadStructuralFeatureActionName_5153Parser();
- case InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5149Parser();
- case InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5150Parser();
- case OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5151Parser();
- case InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5152Parser();
- case AddStructuralFeatureValueActionNameEditPart.VISUAL_ID:
- return getAddStructuralFeatureValueActionName_5160Parser();
- case InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5154Parser();
- case InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5155Parser();
- case InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID:
- return getInputPinLabel_5156Parser();
- case InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID:
- return getInputPinLabel_5157Parser();
- case OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID:
- return getOutputPinLabel_5158Parser();
- case OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID:
- return getOutputPinLabel_5159Parser();
- case DestroyObjectActionNameEditPart.VISUAL_ID:
- return getDestroyObjectActionName_5163Parser();
- case InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5161Parser();
- case InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5162Parser();
- case ReadVariableActionNameEditPart.VISUAL_ID:
- return getReadVariableActionName_5166Parser();
- case OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5164Parser();
- case OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return getOutputPinLabel_5165Parser();
- case AddVariableValueActionNameEditPart.VISUAL_ID:
- return getAddVariableValueActionName_5171Parser();
- case InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5167Parser();
- case InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5168Parser();
- case InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5169Parser();
- case InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5170Parser();
- case BroadcastSignalActionNameEditPart.VISUAL_ID:
- return getBroadcastSignalActionName_5175Parser();
- case InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5172Parser();
- case InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5173Parser();
- case InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
- return getInputPinLabel_5174Parser();
- case CentralBufferNodeLabelEditPart.VISUAL_ID:
- return getCentralBufferNodeLabel_5176Parser();
- case CentralBufferNodeSelectionEditPart.VISUAL_ID:
- return getCentralBufferNodeLabel_5177Parser();
- case ConstraintNameEditPartCN.VISUAL_ID:
- return getConstraintName_5189Parser();
- case ConstraintBodyEditPartCN.VISUAL_ID:
- return getConstraintSpecification_5190Parser();
- case ObjectFlowNameEditPart.VISUAL_ID:
- return getObjectFlowName_6001Parser();
- case ObjectFlowWeightEditPart.VISUAL_ID:
- return getObjectFlowLabel_6002Parser();
- case ObjectFlowSelectionEditPart.VISUAL_ID:
- return getObjectFlowLabel_6005Parser();
- case ObjectFlowTransformationEditPart.VISUAL_ID:
- return getObjectFlowLabel_6006Parser();
- case DecisionInputFlowEditPart.VISUAL_ID:
- return getObjectFlowLabel_6007Parser();
- case ObjectFlowGuardEditPart.VISUAL_ID:
- return getObjectFlowLabel_6008Parser();
- case ObjectFlowAppliedStereotypeEditPart.VISUAL_ID:
- return getObjectFlowLabel_6010Parser();
- case ControlFlowNameEditPart.VISUAL_ID:
- return getControlFlowName_6003Parser();
- case ControlFlowWeightEditPart.VISUAL_ID:
- return getControlFlowLabel_6004Parser();
- case ControlFlowGuardEditPart.VISUAL_ID:
- return getControlFlowLabel_6009Parser();
- case ControlFlowAppliedStereotypeEditPart.VISUAL_ID:
- return getControlFlowLabel_6011Parser();
- case ExceptionHandlerTypeEditPart.VISUAL_ID:
- return getExceptionHandlerLabel_6012Parser();
- }
- return null;
- }
-
- /**
- * Utility method that consults ParserService
- *
- * @generated
- */
- public static IParser getParser(IElementType type, EObject object, String parserHint) {
- return ParserService.getInstance().getParser(new HintAdapter(type, object, parserHint));
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser(IAdaptable hint) {
- String vid = (String) hint.getAdapter(String.class);
- if (vid != null) {
- return getParser(UMLVisualIDRegistry.getVisualID(vid));
- }
- View view = (View) hint.getAdapter(View.class);
- if (view != null) {
- return getParser(UMLVisualIDRegistry.getVisualID(view));
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean provides(IOperation operation) {
- if (operation instanceof GetParserOperation) {
- IAdaptable hint = ((GetParserOperation) operation).getHint();
- if (UMLElementTypes.getElement(hint) == null) {
- return false;
- }
- return getParser(hint) != null;
- }
- return false;
- }
-
- /**
- * @generated
- */
- private static class HintAdapter extends ParserHintAdapter {
-
- /**
- * @generated
- */
- private final IElementType elementType;
-
- /**
- * @generated
- */
- public HintAdapter(IElementType type, EObject object, String parserHint) {
- super(object, parserHint);
- assert type != null;
- elementType = type;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getAdapter(Class adapter) {
- if (IElementType.class.equals(adapter)) {
- return elementType;
- }
- return super.getAdapter(adapter);
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.providers;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.*;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.AcceptEventActionParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.AcceptTimeEventActionParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivityEdgeWeightParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivityParameterNodeParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ActivitySingleExecutionParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.CallBehaviorActionParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.CallOperationActionParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.DecisionInputFlowParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.EdgeGuardParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ExceptionHandlerTypeParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.InputDecisionParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.JoinSpecParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectFlowSelectionParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectFlowTransformationParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectNodeParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ObjectNodeSelectionParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.ParameterParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PinParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PinValueParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PostConditionConstraintLabelParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.PreConditionConstraintLabelParser;
+import org.eclipse.papyrus.uml.diagram.activity.parser.custom.StructuredActivityNodeKeywordParser;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.common.parser.CommentParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class UMLParserProvider extends AbstractProvider implements IParserProvider {
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser activityFinalNodeFloatingName_6033Parser;
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser getActivityFinalNodeFloatingName_6033Parser() {
+ if (activityFinalNodeFloatingName_6033Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ activityFinalNodeFloatingName_6033Parser = parser;
+ }
+ return activityFinalNodeFloatingName_6033Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser initialNodeFloatingName_6034Parser;
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser getInitialNodeFloatingName_6034Parser() {
+ if (initialNodeFloatingName_6034Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ initialNodeFloatingName_6034Parser = parser;
+ }
+ return initialNodeFloatingName_6034Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser flowFinalNodeFloatingName_6035Parser;
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser getFlowFinalNodeFloatingName_6034Parser() {
+ if (flowFinalNodeFloatingName_6035Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ flowFinalNodeFloatingName_6035Parser = parser;
+ }
+ return flowFinalNodeFloatingName_6035Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser decisionNodeFloatingName_6036Parser;
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser getDecisionNodeFloatingName_6036Parser() {
+ if (decisionNodeFloatingName_6036Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ decisionNodeFloatingName_6036Parser = parser;
+ }
+ return decisionNodeFloatingName_6036Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser mergeNodeFloatingName_6037Parser;
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser getMergeNodeFloatingName_6037Parser() {
+ if (mergeNodeFloatingName_6037Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ mergeNodeFloatingName_6037Parser = parser;
+ }
+ return mergeNodeFloatingName_6037Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser forkNodeFloatingName_6038Parser;
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser getForkNodeFloatingName_6038Parser() {
+ if (forkNodeFloatingName_6038Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ forkNodeFloatingName_6038Parser = parser;
+ }
+ return forkNodeFloatingName_6038Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser joinNodeFloatingName_6039Parser;
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser geJoinNodeFloatingName_6039Parser() {
+ if (joinNodeFloatingName_6039Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ joinNodeFloatingName_6039Parser = parser;
+ }
+ return joinNodeFloatingName_6039Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser sendSignalActionFloatingName_6032Parser;
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser getSendSignalActionFloatingName_6032Parser() {
+ if (sendSignalActionFloatingName_6032Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ sendSignalActionFloatingName_6032Parser = parser;
+ }
+ return sendSignalActionFloatingName_6032Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser dataStoreNodeFloatingName_6031Parser;
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser getDataStoreNodeFloatingName_6031Parser() {
+ if (dataStoreNodeFloatingName_6031Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ dataStoreNodeFloatingName_6031Parser = parser;
+ }
+ return dataStoreNodeFloatingName_6031Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser centralBufferNodeFloatingName_6030Parser;
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser getCentralBufferNodeFloatingName_6030Parser() {
+ if (centralBufferNodeFloatingName_6030Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ centralBufferNodeFloatingName_6030Parser = parser;
+ }
+ return centralBufferNodeFloatingName_6030Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser addStructuralFeatureValueActionFloatingName_6019Parser;
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser getAddStructuralFeatureValueActionFloatingName_6019Parser() {
+ if (addStructuralFeatureValueActionFloatingName_6019Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ addStructuralFeatureValueActionFloatingName_6019Parser = parser;
+ }
+ return addStructuralFeatureValueActionFloatingName_6019Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser callOperationActionFloatingName_6020Parser;
+
+ /**
+ * @generated
+ * not generated but change include on gmfgen, can be override at the generation
+ */
+ private IParser getCallOperationActionFloatingName_6020Parser() {
+ if (callOperationActionFloatingName_6020Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ callOperationActionFloatingName_6020Parser = parser;
+ }
+ return callOperationActionFloatingName_6020Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser createObjectActionFloatingName_6024Parser;
+
+ /**
+ * @generated
+ * not generated but change include on gmfgen, can be override at the generation
+ */
+ private IParser getCreateObjectActionFloatingName_6024Parser() {
+ if (createObjectActionFloatingName_6024Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ createObjectActionFloatingName_6024Parser = parser;
+ }
+ return createObjectActionFloatingName_6024Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser destroyObjectActionFloatingName_6022Parser;
+
+ /**
+ * @generated
+ * not generated but change include on gmfgen, can be override at the generation
+ */
+ private IParser getDestroyObjectActionFloatingName_6022Parser() {
+ if (destroyObjectActionFloatingName_6022Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ destroyObjectActionFloatingName_6022Parser = parser;
+ }
+ return destroyObjectActionFloatingName_6022Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser opaqueActionFloatingName_6028Parser;
+
+ /**
+ * @generated
+ * not generated but change include on gmfgen, can be override at the generation
+ */
+ private IParser getOpaqueActionFloatingName_6028Parser() {
+ if (opaqueActionFloatingName_6028Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ opaqueActionFloatingName_6028Parser = parser;
+ }
+ return opaqueActionFloatingName_6028Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser readSelfActionFloatingName_6025Parser;
+
+ /**
+ * @generated
+ * not generated but change include on gmfgen, can be override at the generation
+ */
+ private IParser getReadSelfActionFloatingName_6025Parser() {
+ if (readSelfActionFloatingName_6025Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ readSelfActionFloatingName_6025Parser = parser;
+ }
+ return readSelfActionFloatingName_6025Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser readStructuralFeatureActionFloatingName_6023Parser;
+
+ /**
+ * @generated
+ * not generated but change include on gmfgen, can be override at the generation
+ */
+ private IParser getReadStructuralFeatureActionFloatingName_6023Parser() {
+ if (readStructuralFeatureActionFloatingName_6023Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ readStructuralFeatureActionFloatingName_6023Parser = parser;
+ }
+ return readStructuralFeatureActionFloatingName_6023Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser readVariableActionFloatingName_6021Parser;
+
+ /**
+ * @generated
+ * not generated but change include on gmfgen, can be override at the generation
+ */
+ private IParser getReadVariableActionFloatingName_6021Parser() {
+ if (readVariableActionFloatingName_6021Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ readVariableActionFloatingName_6021Parser = parser;
+ }
+ return readVariableActionFloatingName_6021Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser sendObjectActionFloatingName_6027Parser;
+
+ /**
+ * @generated
+ * not generated but change include on gmfgen, can be override at the generation
+ */
+ private IParser getSendObjectActionFloatingName_6027Parser() {
+ if (sendObjectActionFloatingName_6027Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ sendObjectActionFloatingName_6027Parser = parser;
+ }
+ return sendObjectActionFloatingName_6027Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser valueSpecificationActionFloatingName_6026Parser;
+
+ /**
+ * @generated
+ * not generated but change include on gmfgen, can be override at the generation
+ */
+ private IParser getValueSpecificationActionFloatingName_6026Parser() {
+ if (valueSpecificationActionFloatingName_6026Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ valueSpecificationActionFloatingName_6026Parser = parser;
+ }
+ return valueSpecificationActionFloatingName_6026Parser;
+ }
+
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser callBehaviorActionFloatingName_8520Parser;
+
+ /**
+ * @generated
+ * not generated but change include on gmfgen, can be override at the generation
+ */
+ private IParser getCallBehaviorActionFloatingName_6029Parser() {
+ if (callBehaviorActionFloatingName_8520Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ callBehaviorActionFloatingName_8520Parser = parser;
+ }
+ return callBehaviorActionFloatingName_8520Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser activityName_5001Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActivityName_5001Parser() {
+ if (activityName_5001Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ activityName_5001Parser = parser;
+ }
+ return activityName_5001Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser addVariableValueActionFoatingName_6018Parser;
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser getAddVariableValueActionFloatingName_6018Parser() {
+ if (addVariableValueActionFoatingName_6018Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ addVariableValueActionFoatingName_6018Parser = parser;
+ }
+ return addVariableValueActionFoatingName_6018Parser;
+ }
+
+ /**
+ * @generated
+ * not generated but changes include on gmfgen, can be override at the generation
+ */
+ private IParser broadcastSignalActionName_6017Parser;
+
+ /**
+ * @generated
+ * not generated but change include on gmfgen, can be override at the generation
+ */
+ private IParser getBroadcastSignalActionFloatingName_6017Parser() {
+ if (broadcastSignalActionName_6017Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ broadcastSignalActionName_6017Parser = parser;
+ }
+ return broadcastSignalActionName_6017Parser;
+ }
+
+
+ /**
+ * @generated
+ */
+ private ActivitySingleExecutionParser activityIsSingleExecution_5002Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActivityIsSingleExecution_5002Parser() {
+ if (activityIsSingleExecution_5002Parser == null) {
+ activityIsSingleExecution_5002Parser = new ActivitySingleExecutionParser();
+ }
+ return activityIsSingleExecution_5002Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ParameterParser parameter_3001Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getParameter_3001Parser() {
+ if (parameter_3001Parser == null) {
+ parameter_3001Parser = new ParameterParser();
+ }
+ return parameter_3001Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PreConditionConstraintLabelParser constraint_3002Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getConstraint_3002Parser() {
+ if (constraint_3002Parser == null) {
+ constraint_3002Parser = new PreConditionConstraintLabelParser();
+ }
+ return constraint_3002Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PostConditionConstraintLabelParser constraint_3003Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getConstraint_3003Parser() {
+ if (constraint_3003Parser == null) {
+ constraint_3003Parser = new PostConditionConstraintLabelParser();
+ }
+ return constraint_3003Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser initialNodeLabel_5080Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInitialNodeLabel_5080Parser() {
+ if (initialNodeLabel_5080Parser == null) {
+ initialNodeLabel_5080Parser = new AppliedStereotypeParser();
+ }
+ return initialNodeLabel_5080Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser activityFinalNodeLabel_5081Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActivityFinalNodeLabel_5081Parser() {
+ if (activityFinalNodeLabel_5081Parser == null) {
+ activityFinalNodeLabel_5081Parser = new AppliedStereotypeParser();
+ }
+ return activityFinalNodeLabel_5081Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser flowFinalNodeLabel_5082Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getFlowFinalNodeLabel_5082Parser() {
+ if (flowFinalNodeLabel_5082Parser == null) {
+ flowFinalNodeLabel_5082Parser = new AppliedStereotypeParser();
+ }
+ return flowFinalNodeLabel_5082Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser opaqueActionName_5003Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOpaqueActionName_5003Parser() {
+ if (opaqueActionName_5003Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ opaqueActionName_5003Parser = parser;
+ }
+ return opaqueActionName_5003Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser valuePinLabel_5011Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5011Parser() {
+ if (valuePinLabel_5011Parser == null) {
+ valuePinLabel_5011Parser = new PinParser();
+ }
+ return valuePinLabel_5011Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser valuePinLabel_5024Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5024Parser() {
+ if (valuePinLabel_5024Parser == null) {
+ valuePinLabel_5024Parser = new PinValueParser();
+ }
+ return valuePinLabel_5024Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser valuePinLabel_5083Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5083Parser() {
+ if (valuePinLabel_5083Parser == null) {
+ valuePinLabel_5083Parser = new AppliedStereotypeParser();
+ }
+ return valuePinLabel_5083Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser actionInputPinLabel_5012Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5012Parser() {
+ if (actionInputPinLabel_5012Parser == null) {
+ actionInputPinLabel_5012Parser = new PinParser();
+ }
+ return actionInputPinLabel_5012Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser actionInputPinLabel_5025Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5025Parser() {
+ if (actionInputPinLabel_5025Parser == null) {
+ actionInputPinLabel_5025Parser = new PinValueParser();
+ }
+ return actionInputPinLabel_5025Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser actionInputPinLabel_5084Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5084Parser() {
+ if (actionInputPinLabel_5084Parser == null) {
+ actionInputPinLabel_5084Parser = new AppliedStereotypeParser();
+ }
+ return actionInputPinLabel_5084Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5009Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5009Parser() {
+ if (inputPinLabel_5009Parser == null) {
+ inputPinLabel_5009Parser = new PinParser();
+ }
+ return inputPinLabel_5009Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5085Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5085Parser() {
+ if (inputPinLabel_5085Parser == null) {
+ inputPinLabel_5085Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5085Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser outputPinLabel_5010Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5010Parser() {
+ if (outputPinLabel_5010Parser == null) {
+ outputPinLabel_5010Parser = new PinParser();
+ }
+ return outputPinLabel_5010Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser outputPinLabel_5086Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5086Parser() {
+ if (outputPinLabel_5086Parser == null) {
+ outputPinLabel_5086Parser = new AppliedStereotypeParser();
+ }
+ return outputPinLabel_5086Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private CallBehaviorActionParser callBehaviorActionLabel_5004Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getCallBehaviorActionLabel_5004Parser() {
+ if (callBehaviorActionLabel_5004Parser == null) {
+ callBehaviorActionLabel_5004Parser = new CallBehaviorActionParser();
+ }
+ return callBehaviorActionLabel_5004Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser valuePinLabel_5013Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5013Parser() {
+ if (valuePinLabel_5013Parser == null) {
+ valuePinLabel_5013Parser = new PinParser();
+ }
+ return valuePinLabel_5013Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser valuePinLabel_5026Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5026Parser() {
+ if (valuePinLabel_5026Parser == null) {
+ valuePinLabel_5026Parser = new PinValueParser();
+ }
+ return valuePinLabel_5026Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser valuePinLabel_5087Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5087Parser() {
+ if (valuePinLabel_5087Parser == null) {
+ valuePinLabel_5087Parser = new AppliedStereotypeParser();
+ }
+ return valuePinLabel_5087Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser actionInputPinLabel_5014Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5014Parser() {
+ if (actionInputPinLabel_5014Parser == null) {
+ actionInputPinLabel_5014Parser = new PinParser();
+ }
+ return actionInputPinLabel_5014Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser actionInputPinLabel_5027Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5027Parser() {
+ if (actionInputPinLabel_5027Parser == null) {
+ actionInputPinLabel_5027Parser = new PinValueParser();
+ }
+ return actionInputPinLabel_5027Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser actionInputPinLabel_5088Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5088Parser() {
+ if (actionInputPinLabel_5088Parser == null) {
+ actionInputPinLabel_5088Parser = new AppliedStereotypeParser();
+ }
+ return actionInputPinLabel_5088Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5015Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5015Parser() {
+ if (inputPinLabel_5015Parser == null) {
+ inputPinLabel_5015Parser = new PinParser();
+ }
+ return inputPinLabel_5015Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5089Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5089Parser() {
+ if (inputPinLabel_5089Parser == null) {
+ inputPinLabel_5089Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5089Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser outputPinLabel_5016Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5016Parser() {
+ if (outputPinLabel_5016Parser == null) {
+ outputPinLabel_5016Parser = new PinParser();
+ }
+ return outputPinLabel_5016Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser outputPinLabel_5090Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5090Parser() {
+ if (outputPinLabel_5090Parser == null) {
+ outputPinLabel_5090Parser = new AppliedStereotypeParser();
+ }
+ return outputPinLabel_5090Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private CallOperationActionParser callOperationActionLabel_5006Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getCallOperationActionLabel_5006Parser() {
+ if (callOperationActionLabel_5006Parser == null) {
+ callOperationActionLabel_5006Parser = new CallOperationActionParser();
+ }
+ return callOperationActionLabel_5006Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser actionInputPinLabel_5017Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5017Parser() {
+ if (actionInputPinLabel_5017Parser == null) {
+ actionInputPinLabel_5017Parser = new PinParser();
+ }
+ return actionInputPinLabel_5017Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser actionInputPinLabel_5028Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5028Parser() {
+ if (actionInputPinLabel_5028Parser == null) {
+ actionInputPinLabel_5028Parser = new PinValueParser();
+ }
+ return actionInputPinLabel_5028Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser actionInputPinLabel_5091Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5091Parser() {
+ if (actionInputPinLabel_5091Parser == null) {
+ actionInputPinLabel_5091Parser = new AppliedStereotypeParser();
+ }
+ return actionInputPinLabel_5091Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser valuePinLabel_5018Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5018Parser() {
+ if (valuePinLabel_5018Parser == null) {
+ valuePinLabel_5018Parser = new PinParser();
+ }
+ return valuePinLabel_5018Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser valuePinLabel_5029Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5029Parser() {
+ if (valuePinLabel_5029Parser == null) {
+ valuePinLabel_5029Parser = new PinValueParser();
+ }
+ return valuePinLabel_5029Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser valuePinLabel_5092Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5092Parser() {
+ if (valuePinLabel_5092Parser == null) {
+ valuePinLabel_5092Parser = new AppliedStereotypeParser();
+ }
+ return valuePinLabel_5092Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5019Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5019Parser() {
+ if (inputPinLabel_5019Parser == null) {
+ inputPinLabel_5019Parser = new PinParser();
+ }
+ return inputPinLabel_5019Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5093Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5093Parser() {
+ if (inputPinLabel_5093Parser == null) {
+ inputPinLabel_5093Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5093Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser outputPinLabel_5020Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5020Parser() {
+ if (outputPinLabel_5020Parser == null) {
+ outputPinLabel_5020Parser = new PinParser();
+ }
+ return outputPinLabel_5020Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser outputPinLabel_5094Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5094Parser() {
+ if (outputPinLabel_5094Parser == null) {
+ outputPinLabel_5094Parser = new AppliedStereotypeParser();
+ }
+ return outputPinLabel_5094Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser valuePinLabel_5021Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5021Parser() {
+ if (valuePinLabel_5021Parser == null) {
+ valuePinLabel_5021Parser = new PinParser();
+ }
+ return valuePinLabel_5021Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser valuePinLabel_5030Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5030Parser() {
+ if (valuePinLabel_5030Parser == null) {
+ valuePinLabel_5030Parser = new PinValueParser();
+ }
+ return valuePinLabel_5030Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser valuePinLabel_5095Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5095Parser() {
+ if (valuePinLabel_5095Parser == null) {
+ valuePinLabel_5095Parser = new AppliedStereotypeParser();
+ }
+ return valuePinLabel_5095Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser actionInputPinLabel_5022Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5022Parser() {
+ if (actionInputPinLabel_5022Parser == null) {
+ actionInputPinLabel_5022Parser = new PinParser();
+ }
+ return actionInputPinLabel_5022Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser actionInputPinLabel_5031Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5031Parser() {
+ if (actionInputPinLabel_5031Parser == null) {
+ actionInputPinLabel_5031Parser = new PinValueParser();
+ }
+ return actionInputPinLabel_5031Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser actionInputPinLabel_5096Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5096Parser() {
+ if (actionInputPinLabel_5096Parser == null) {
+ actionInputPinLabel_5096Parser = new AppliedStereotypeParser();
+ }
+ return actionInputPinLabel_5096Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5023Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5023Parser() {
+ if (inputPinLabel_5023Parser == null) {
+ inputPinLabel_5023Parser = new PinParser();
+ }
+ return inputPinLabel_5023Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5097Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5097Parser() {
+ if (inputPinLabel_5097Parser == null) {
+ inputPinLabel_5097Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5097Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser constraintName_5007Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getConstraintName_5007Parser() {
+ if (constraintName_5007Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ constraintName_5007Parser = parser;
+ }
+ return constraintName_5007Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ConstraintParser constraintLabel_5136Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getConstraintLabel_5136Parser() {
+ if (constraintLabel_5136Parser == null) {
+ constraintLabel_5136Parser = new ConstraintParser();
+ }
+ return constraintLabel_5136Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser constraintName_5008Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getConstraintName_5008Parser() {
+ if (constraintName_5008Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ constraintName_5008Parser = parser;
+ }
+ return constraintName_5008Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ConstraintParser constraintLabel_5137Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getConstraintLabel_5137Parser() {
+ if (constraintLabel_5137Parser == null) {
+ constraintLabel_5137Parser = new ConstraintParser();
+ }
+ return constraintLabel_5137Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private InputDecisionParser decisionNodeLabel_5043Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDecisionNodeLabel_5043Parser() {
+ if (decisionNodeLabel_5043Parser == null) {
+ decisionNodeLabel_5043Parser = new InputDecisionParser();
+ }
+ return decisionNodeLabel_5043Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser decisionNodeLabel_5098Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDecisionNodeLabel_5098Parser() {
+ if (decisionNodeLabel_5098Parser == null) {
+ decisionNodeLabel_5098Parser = new AppliedStereotypeParser();
+ }
+ return decisionNodeLabel_5098Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser mergeNodeLabel_5099Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getMergeNodeLabel_5099Parser() {
+ if (mergeNodeLabel_5099Parser == null) {
+ mergeNodeLabel_5099Parser = new AppliedStereotypeParser();
+ }
+ return mergeNodeLabel_5099Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser forkNodeLabel_5100Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getForkNodeLabel_5100Parser() {
+ if (forkNodeLabel_5100Parser == null) {
+ forkNodeLabel_5100Parser = new AppliedStereotypeParser();
+ }
+ return forkNodeLabel_5100Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private JoinSpecParser joinNodeLabel_5042Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getJoinNodeLabel_5042Parser() {
+ if (joinNodeLabel_5042Parser == null) {
+ joinNodeLabel_5042Parser = new JoinSpecParser();
+ }
+ return joinNodeLabel_5042Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser joinNodeLabel_5101Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getJoinNodeLabel_5101Parser() {
+ if (joinNodeLabel_5101Parser == null) {
+ joinNodeLabel_5101Parser = new AppliedStereotypeParser();
+ }
+ return joinNodeLabel_5101Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser sendObjectActionName_5059Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getSendObjectActionName_5059Parser() {
+ if (sendObjectActionName_5059Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ sendObjectActionName_5059Parser = parser;
+ }
+ return sendObjectActionName_5059Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser valuePinLabel_5049Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5049Parser() {
+ if (valuePinLabel_5049Parser == null) {
+ valuePinLabel_5049Parser = new PinParser();
+ }
+ return valuePinLabel_5049Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser valuePinLabel_5050Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5050Parser() {
+ if (valuePinLabel_5050Parser == null) {
+ valuePinLabel_5050Parser = new PinValueParser();
+ }
+ return valuePinLabel_5050Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser valuePinLabel_5102Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5102Parser() {
+ if (valuePinLabel_5102Parser == null) {
+ valuePinLabel_5102Parser = new AppliedStereotypeParser();
+ }
+ return valuePinLabel_5102Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser actionInputPinLabel_5051Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5051Parser() {
+ if (actionInputPinLabel_5051Parser == null) {
+ actionInputPinLabel_5051Parser = new PinParser();
+ }
+ return actionInputPinLabel_5051Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser actionInputPinLabel_5052Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5052Parser() {
+ if (actionInputPinLabel_5052Parser == null) {
+ actionInputPinLabel_5052Parser = new PinValueParser();
+ }
+ return actionInputPinLabel_5052Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser actionInputPinLabel_5103Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5103Parser() {
+ if (actionInputPinLabel_5103Parser == null) {
+ actionInputPinLabel_5103Parser = new AppliedStereotypeParser();
+ }
+ return actionInputPinLabel_5103Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5053Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5053Parser() {
+ if (inputPinLabel_5053Parser == null) {
+ inputPinLabel_5053Parser = new PinParser();
+ }
+ return inputPinLabel_5053Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5104Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5104Parser() {
+ if (inputPinLabel_5104Parser == null) {
+ inputPinLabel_5104Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5104Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser valuePinLabel_5054Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5054Parser() {
+ if (valuePinLabel_5054Parser == null) {
+ valuePinLabel_5054Parser = new PinParser();
+ }
+ return valuePinLabel_5054Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser valuePinLabel_5055Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5055Parser() {
+ if (valuePinLabel_5055Parser == null) {
+ valuePinLabel_5055Parser = new PinValueParser();
+ }
+ return valuePinLabel_5055Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser valuePinLabel_5105Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5105Parser() {
+ if (valuePinLabel_5105Parser == null) {
+ valuePinLabel_5105Parser = new AppliedStereotypeParser();
+ }
+ return valuePinLabel_5105Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser actionInputPinLabel_5056Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5056Parser() {
+ if (actionInputPinLabel_5056Parser == null) {
+ actionInputPinLabel_5056Parser = new PinParser();
+ }
+ return actionInputPinLabel_5056Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser actionInputPinLabel_5057Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5057Parser() {
+ if (actionInputPinLabel_5057Parser == null) {
+ actionInputPinLabel_5057Parser = new PinValueParser();
+ }
+ return actionInputPinLabel_5057Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser actionInputPinLabel_5106Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5106Parser() {
+ if (actionInputPinLabel_5106Parser == null) {
+ actionInputPinLabel_5106Parser = new AppliedStereotypeParser();
+ }
+ return actionInputPinLabel_5106Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5058Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5058Parser() {
+ if (inputPinLabel_5058Parser == null) {
+ inputPinLabel_5058Parser = new PinParser();
+ }
+ return inputPinLabel_5058Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5107Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5107Parser() {
+ if (inputPinLabel_5107Parser == null) {
+ inputPinLabel_5107Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5107Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser sendSignalActionName_5060Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getSendSignalActionName_5060Parser() {
+ if (sendSignalActionName_5060Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ sendSignalActionName_5060Parser = parser;
+ }
+ return sendSignalActionName_5060Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser actionInputPinLabel_5061Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5061Parser() {
+ if (actionInputPinLabel_5061Parser == null) {
+ actionInputPinLabel_5061Parser = new PinParser();
+ }
+ return actionInputPinLabel_5061Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser actionInputPinLabel_5062Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5062Parser() {
+ if (actionInputPinLabel_5062Parser == null) {
+ actionInputPinLabel_5062Parser = new PinValueParser();
+ }
+ return actionInputPinLabel_5062Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser actionInputPinLabel_5108Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5108Parser() {
+ if (actionInputPinLabel_5108Parser == null) {
+ actionInputPinLabel_5108Parser = new AppliedStereotypeParser();
+ }
+ return actionInputPinLabel_5108Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser valuePinLabel_5063Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5063Parser() {
+ if (valuePinLabel_5063Parser == null) {
+ valuePinLabel_5063Parser = new PinParser();
+ }
+ return valuePinLabel_5063Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser valuePinLabel_5064Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5064Parser() {
+ if (valuePinLabel_5064Parser == null) {
+ valuePinLabel_5064Parser = new PinValueParser();
+ }
+ return valuePinLabel_5064Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser valuePinLabel_5109Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5109Parser() {
+ if (valuePinLabel_5109Parser == null) {
+ valuePinLabel_5109Parser = new AppliedStereotypeParser();
+ }
+ return valuePinLabel_5109Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5065Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5065Parser() {
+ if (inputPinLabel_5065Parser == null) {
+ inputPinLabel_5065Parser = new PinParser();
+ }
+ return inputPinLabel_5065Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5110Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5110Parser() {
+ if (inputPinLabel_5110Parser == null) {
+ inputPinLabel_5110Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5110Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser valuePinLabel_5072Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5072Parser() {
+ if (valuePinLabel_5072Parser == null) {
+ valuePinLabel_5072Parser = new PinParser();
+ }
+ return valuePinLabel_5072Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser valuePinLabel_5073Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5073Parser() {
+ if (valuePinLabel_5073Parser == null) {
+ valuePinLabel_5073Parser = new PinValueParser();
+ }
+ return valuePinLabel_5073Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser valuePinLabel_5111Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValuePinLabel_5111Parser() {
+ if (valuePinLabel_5111Parser == null) {
+ valuePinLabel_5111Parser = new AppliedStereotypeParser();
+ }
+ return valuePinLabel_5111Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser actionInputPinLabel_5074Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5074Parser() {
+ if (actionInputPinLabel_5074Parser == null) {
+ actionInputPinLabel_5074Parser = new PinParser();
+ }
+ return actionInputPinLabel_5074Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser actionInputPinLabel_5075Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5075Parser() {
+ if (actionInputPinLabel_5075Parser == null) {
+ actionInputPinLabel_5075Parser = new PinValueParser();
+ }
+ return actionInputPinLabel_5075Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser actionInputPinLabel_5112Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActionInputPinLabel_5112Parser() {
+ if (actionInputPinLabel_5112Parser == null) {
+ actionInputPinLabel_5112Parser = new AppliedStereotypeParser();
+ }
+ return actionInputPinLabel_5112Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5076Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5076Parser() {
+ if (inputPinLabel_5076Parser == null) {
+ inputPinLabel_5076Parser = new PinParser();
+ }
+ return inputPinLabel_5076Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5113Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5113Parser() {
+ if (inputPinLabel_5113Parser == null) {
+ inputPinLabel_5113Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5113Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ActivityParameterNodeParser activityParameterNodeLabel_5071Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActivityParameterNodeLabel_5071Parser() {
+ if (activityParameterNodeLabel_5071Parser == null) {
+ activityParameterNodeLabel_5071Parser = new ActivityParameterNodeParser();
+ }
+ return activityParameterNodeLabel_5071Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AcceptEventActionParser acceptEventActionLabel_5078Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getAcceptEventActionLabel_5078Parser() {
+ if (acceptEventActionLabel_5078Parser == null) {
+ acceptEventActionLabel_5078Parser = new AcceptEventActionParser();
+ }
+ return acceptEventActionLabel_5078Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AcceptTimeEventActionParser acceptEventActionLabel_5079Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getAcceptEventActionLabel_5079Parser() {
+ if (acceptEventActionLabel_5079Parser == null) {
+ acceptEventActionLabel_5079Parser = new AcceptTimeEventActionParser();
+ }
+ return acceptEventActionLabel_5079Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser acceptEventActionLabel_5115Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getAcceptEventActionLabel_5115Parser() {
+ if (acceptEventActionLabel_5115Parser == null) {
+ acceptEventActionLabel_5115Parser = new AppliedStereotypeParser();
+ }
+ return acceptEventActionLabel_5115Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser outputPinLabel_5077Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5077Parser() {
+ if (outputPinLabel_5077Parser == null) {
+ outputPinLabel_5077Parser = new PinParser();
+ }
+ return outputPinLabel_5077Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser outputPinLabel_5114Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5114Parser() {
+ if (outputPinLabel_5114Parser == null) {
+ outputPinLabel_5114Parser = new AppliedStereotypeParser();
+ }
+ return outputPinLabel_5114Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private StructuredActivityNodeKeywordParser structuredActivityNodeLabel_5117Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getStructuredActivityNodeLabel_5117Parser() {
+ if (structuredActivityNodeLabel_5117Parser == null) {
+ structuredActivityNodeLabel_5117Parser = new StructuredActivityNodeKeywordParser();
+ }
+ return structuredActivityNodeLabel_5117Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5178Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5178Parser() {
+ if (inputPinLabel_5178Parser == null) {
+ inputPinLabel_5178Parser = new PinParser();
+ }
+ return inputPinLabel_5178Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5179Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5179Parser() {
+ if (inputPinLabel_5179Parser == null) {
+ inputPinLabel_5179Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5179Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser activityPartitionName_5118Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActivityPartitionName_5118Parser() {
+ if (activityPartitionName_5118Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ activityPartitionName_5118Parser = parser;
+ }
+ return activityPartitionName_5118Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ActivitySingleExecutionParser namedElementName_5129Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getNamedElementName_5129Parser() {
+ if (namedElementName_5129Parser == null) {
+ namedElementName_5129Parser = new ActivitySingleExecutionParser();
+ }
+ return namedElementName_5129Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser createObjectActionName_5148Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getCreateObjectActionName_5148Parser() {
+ if (createObjectActionName_5148Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ createObjectActionName_5148Parser = parser;
+ }
+ return createObjectActionName_5148Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser outputPinLabel_5146Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5146Parser() {
+ if (outputPinLabel_5146Parser == null) {
+ outputPinLabel_5146Parser = new PinParser();
+ }
+ return outputPinLabel_5146Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser outputPinLabel_5147Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5147Parser() {
+ if (outputPinLabel_5147Parser == null) {
+ outputPinLabel_5147Parser = new AppliedStereotypeParser();
+ }
+ return outputPinLabel_5147Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser readStructuralFeatureActionName_5153Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getReadStructuralFeatureActionName_5153Parser() {
+ if (readStructuralFeatureActionName_5153Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ readStructuralFeatureActionName_5153Parser = parser;
+ }
+ return readStructuralFeatureActionName_5153Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5149Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5149Parser() {
+ if (inputPinLabel_5149Parser == null) {
+ inputPinLabel_5149Parser = new PinParser();
+ }
+ return inputPinLabel_5149Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5150Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5150Parser() {
+ if (inputPinLabel_5150Parser == null) {
+ inputPinLabel_5150Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5150Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser outputPinLabel_5151Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5151Parser() {
+ if (outputPinLabel_5151Parser == null) {
+ outputPinLabel_5151Parser = new PinParser();
+ }
+ return outputPinLabel_5151Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser outputPinLabel_5152Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5152Parser() {
+ if (outputPinLabel_5152Parser == null) {
+ outputPinLabel_5152Parser = new AppliedStereotypeParser();
+ }
+ return outputPinLabel_5152Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser addStructuralFeatureValueActionName_5160Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getAddStructuralFeatureValueActionName_5160Parser() {
+ if (addStructuralFeatureValueActionName_5160Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ addStructuralFeatureValueActionName_5160Parser = parser;
+ }
+ return addStructuralFeatureValueActionName_5160Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5154Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5154Parser() {
+ if (inputPinLabel_5154Parser == null) {
+ inputPinLabel_5154Parser = new PinParser();
+ }
+ return inputPinLabel_5154Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5155Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5155Parser() {
+ if (inputPinLabel_5155Parser == null) {
+ inputPinLabel_5155Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5155Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5156Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5156Parser() {
+ if (inputPinLabel_5156Parser == null) {
+ inputPinLabel_5156Parser = new PinParser();
+ }
+ return inputPinLabel_5156Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5157Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5157Parser() {
+ if (inputPinLabel_5157Parser == null) {
+ inputPinLabel_5157Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5157Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser outputPinLabel_5158Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5158Parser() {
+ if (outputPinLabel_5158Parser == null) {
+ outputPinLabel_5158Parser = new PinParser();
+ }
+ return outputPinLabel_5158Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser outputPinLabel_5159Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5159Parser() {
+ if (outputPinLabel_5159Parser == null) {
+ outputPinLabel_5159Parser = new AppliedStereotypeParser();
+ }
+ return outputPinLabel_5159Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser destroyObjectActionName_5163Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDestroyObjectActionName_5163Parser() {
+ if (destroyObjectActionName_5163Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ destroyObjectActionName_5163Parser = parser;
+ }
+ return destroyObjectActionName_5163Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5161Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5161Parser() {
+ if (inputPinLabel_5161Parser == null) {
+ inputPinLabel_5161Parser = new PinParser();
+ }
+ return inputPinLabel_5161Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5162Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5162Parser() {
+ if (inputPinLabel_5162Parser == null) {
+ inputPinLabel_5162Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5162Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser readVariableActionName_5166Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getReadVariableActionName_5166Parser() {
+ if (readVariableActionName_5166Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ readVariableActionName_5166Parser = parser;
+ }
+ return readVariableActionName_5166Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser outputPinLabel_5164Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5164Parser() {
+ if (outputPinLabel_5164Parser == null) {
+ outputPinLabel_5164Parser = new PinParser();
+ }
+ return outputPinLabel_5164Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser outputPinLabel_5165Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5165Parser() {
+ if (outputPinLabel_5165Parser == null) {
+ outputPinLabel_5165Parser = new AppliedStereotypeParser();
+ }
+ return outputPinLabel_5165Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser addVariableValueActionName_5171Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getAddVariableValueActionName_5171Parser() {
+ if (addVariableValueActionName_5171Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ addVariableValueActionName_5171Parser = parser;
+ }
+ return addVariableValueActionName_5171Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5167Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5167Parser() {
+ if (inputPinLabel_5167Parser == null) {
+ inputPinLabel_5167Parser = new PinParser();
+ }
+ return inputPinLabel_5167Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5168Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5168Parser() {
+ if (inputPinLabel_5168Parser == null) {
+ inputPinLabel_5168Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5168Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5169Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5169Parser() {
+ if (inputPinLabel_5169Parser == null) {
+ inputPinLabel_5169Parser = new PinParser();
+ }
+ return inputPinLabel_5169Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5170Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5170Parser() {
+ if (inputPinLabel_5170Parser == null) {
+ inputPinLabel_5170Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5170Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser broadcastSignalActionName_5175Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getBroadcastSignalActionName_5175Parser() {
+ if (broadcastSignalActionName_5175Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ broadcastSignalActionName_5175Parser = parser;
+ }
+ return broadcastSignalActionName_5175Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser inputPinLabel_5172Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5172Parser() {
+ if (inputPinLabel_5172Parser == null) {
+ inputPinLabel_5172Parser = new PinParser();
+ }
+ return inputPinLabel_5172Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinValueParser inputPinLabel_5173Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5173Parser() {
+ if (inputPinLabel_5173Parser == null) {
+ inputPinLabel_5173Parser = new PinValueParser();
+ }
+ return inputPinLabel_5173Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser inputPinLabel_5174Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInputPinLabel_5174Parser() {
+ if (inputPinLabel_5174Parser == null) {
+ inputPinLabel_5174Parser = new AppliedStereotypeParser();
+ }
+ return inputPinLabel_5174Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ObjectNodeParser centralBufferNodeLabel_5176Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getCentralBufferNodeLabel_5176Parser() {
+ if (centralBufferNodeLabel_5176Parser == null) {
+ centralBufferNodeLabel_5176Parser = new ObjectNodeParser();
+ }
+ return centralBufferNodeLabel_5176Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ObjectNodeSelectionParser centralBufferNodeLabel_5177Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getCentralBufferNodeLabel_5177Parser() {
+ if (centralBufferNodeLabel_5177Parser == null) {
+ centralBufferNodeLabel_5177Parser = new ObjectNodeSelectionParser();
+ }
+ return centralBufferNodeLabel_5177Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser constraintName_5189Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getConstraintName_5189Parser() {
+ if (constraintName_5189Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ constraintName_5189Parser = parser;
+ }
+ return constraintName_5189Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ConstraintParser constraintSpecification_5190Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getConstraintSpecification_5190Parser() {
+ if (constraintSpecification_5190Parser == null) {
+ constraintSpecification_5190Parser = new ConstraintParser();
+ }
+ return constraintSpecification_5190Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private CommentParser commentBody_5138Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getCommentBody_5138Parser() {
+ if (commentBody_5138Parser == null) {
+ commentBody_5138Parser = new CommentParser();
+ }
+ return commentBody_5138Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser readSelfActionName_5139Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getReadSelfActionName_5139Parser() {
+ if (readSelfActionName_5139Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ readSelfActionName_5139Parser = parser;
+ }
+ return readSelfActionName_5139Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser outputPinLabel_5144Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5144Parser() {
+ if (outputPinLabel_5144Parser == null) {
+ outputPinLabel_5144Parser = new PinParser();
+ }
+ return outputPinLabel_5144Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser outputPinLabel_5145Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5145Parser() {
+ if (outputPinLabel_5145Parser == null) {
+ outputPinLabel_5145Parser = new AppliedStereotypeParser();
+ }
+ return outputPinLabel_5145Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser activityName_5142Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActivityName_5142Parser() {
+ if (activityName_5142Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ activityName_5142Parser = parser;
+ }
+ return activityName_5142Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ActivitySingleExecutionParser activityIsSingleExecution_5143Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActivityIsSingleExecution_5143Parser() {
+ if (activityIsSingleExecution_5143Parser == null) {
+ activityIsSingleExecution_5143Parser = new ActivitySingleExecutionParser();
+ }
+ return activityIsSingleExecution_5143Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser valueSpecificationActionName_5126Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getValueSpecificationActionName_5126Parser() {
+ if (valueSpecificationActionName_5126Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ valueSpecificationActionName_5126Parser = parser;
+ }
+ return valueSpecificationActionName_5126Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser outputPinLabel_5124Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5124Parser() {
+ if (outputPinLabel_5124Parser == null) {
+ outputPinLabel_5124Parser = new PinParser();
+ }
+ return outputPinLabel_5124Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser outputPinLabel_5125Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5125Parser() {
+ if (outputPinLabel_5125Parser == null) {
+ outputPinLabel_5125Parser = new AppliedStereotypeParser();
+ }
+ return outputPinLabel_5125Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ObjectNodeParser dataStoreNodeLabel_5127Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDataStoreNodeLabel_5127Parser() {
+ if (dataStoreNodeLabel_5127Parser == null) {
+ dataStoreNodeLabel_5127Parser = new ObjectNodeParser();
+ }
+ return dataStoreNodeLabel_5127Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ObjectNodeSelectionParser dataStoreNodeLabel_5128Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDataStoreNodeLabel_5128Parser() {
+ if (dataStoreNodeLabel_5128Parser == null) {
+ dataStoreNodeLabel_5128Parser = new ObjectNodeSelectionParser();
+ }
+ return dataStoreNodeLabel_5128Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private StructuredActivityNodeKeywordParser conditionalNodeLabel_5119Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getConditionalNodeLabel_5119Parser() {
+ if (conditionalNodeLabel_5119Parser == null) {
+ conditionalNodeLabel_5119Parser = new StructuredActivityNodeKeywordParser();
+ }
+ return conditionalNodeLabel_5119Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private StructuredActivityNodeKeywordParser expansionRegionLabel_5120Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getExpansionRegionLabel_5120Parser() {
+ if (expansionRegionLabel_5120Parser == null) {
+ expansionRegionLabel_5120Parser = new StructuredActivityNodeKeywordParser();
+ }
+ return expansionRegionLabel_5120Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private StructuredActivityNodeKeywordParser loopNodeLabel_5121Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getLoopNodeLabel_5121Parser() {
+ if (loopNodeLabel_5121Parser == null) {
+ loopNodeLabel_5121Parser = new StructuredActivityNodeKeywordParser();
+ }
+ return loopNodeLabel_5121Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser outputPinLabel_5184Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5184Parser() {
+ if (outputPinLabel_5184Parser == null) {
+ outputPinLabel_5184Parser = new PinParser();
+ }
+ return outputPinLabel_5184Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser outputPinLabel_5185Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5185Parser() {
+ if (outputPinLabel_5185Parser == null) {
+ outputPinLabel_5185Parser = new AppliedStereotypeParser();
+ }
+ return outputPinLabel_5185Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser outputPinLabel_5186Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5186Parser() {
+ if (outputPinLabel_5186Parser == null) {
+ outputPinLabel_5186Parser = new PinParser();
+ }
+ return outputPinLabel_5186Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser outputPinLabel_5183Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5183Parser() {
+ if (outputPinLabel_5183Parser == null) {
+ outputPinLabel_5183Parser = new AppliedStereotypeParser();
+ }
+ return outputPinLabel_5183Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private PinParser outputPinLabel_5187Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5187Parser() {
+ if (outputPinLabel_5187Parser == null) {
+ outputPinLabel_5187Parser = new PinParser();
+ }
+ return outputPinLabel_5187Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser outputPinLabel_5188Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getOutputPinLabel_5188Parser() {
+ if (outputPinLabel_5188Parser == null) {
+ outputPinLabel_5188Parser = new AppliedStereotypeParser();
+ }
+ return outputPinLabel_5188Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private StructuredActivityNodeKeywordParser sequenceNodeLabel_5123Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getSequenceNodeLabel_5123Parser() {
+ if (sequenceNodeLabel_5123Parser == null) {
+ sequenceNodeLabel_5123Parser = new StructuredActivityNodeKeywordParser();
+ }
+ return sequenceNodeLabel_5123Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser intervalConstraintName_5036Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getIntervalConstraintName_5036Parser() {
+ if (intervalConstraintName_5036Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ intervalConstraintName_5036Parser = parser;
+ }
+ return intervalConstraintName_5036Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ConstraintParser intervalConstraintLabel_5134Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getIntervalConstraintLabel_5134Parser() {
+ if (intervalConstraintLabel_5134Parser == null) {
+ intervalConstraintLabel_5134Parser = new ConstraintParser();
+ }
+ return intervalConstraintLabel_5134Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser intervalConstraintName_5037Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getIntervalConstraintName_5037Parser() {
+ if (intervalConstraintName_5037Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ intervalConstraintName_5037Parser = parser;
+ }
+ return intervalConstraintName_5037Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ConstraintParser intervalConstraintLabel_5135Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getIntervalConstraintLabel_5135Parser() {
+ if (intervalConstraintLabel_5135Parser == null) {
+ intervalConstraintLabel_5135Parser = new ConstraintParser();
+ }
+ return intervalConstraintLabel_5135Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser durationConstraintName_5038Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDurationConstraintName_5038Parser() {
+ if (durationConstraintName_5038Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ durationConstraintName_5038Parser = parser;
+ }
+ return durationConstraintName_5038Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ConstraintParser durationConstraintLabel_5130Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDurationConstraintLabel_5130Parser() {
+ if (durationConstraintLabel_5130Parser == null) {
+ durationConstraintLabel_5130Parser = new ConstraintParser();
+ }
+ return durationConstraintLabel_5130Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser durationConstraintName_5039Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDurationConstraintName_5039Parser() {
+ if (durationConstraintName_5039Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ durationConstraintName_5039Parser = parser;
+ }
+ return durationConstraintName_5039Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ConstraintParser durationConstraintLabel_5131Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDurationConstraintLabel_5131Parser() {
+ if (durationConstraintLabel_5131Parser == null) {
+ durationConstraintLabel_5131Parser = new ConstraintParser();
+ }
+ return durationConstraintLabel_5131Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser timeConstraintName_5040Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getTimeConstraintName_5040Parser() {
+ if (timeConstraintName_5040Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ timeConstraintName_5040Parser = parser;
+ }
+ return timeConstraintName_5040Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ConstraintParser timeConstraintLabel_5132Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getTimeConstraintLabel_5132Parser() {
+ if (timeConstraintLabel_5132Parser == null) {
+ timeConstraintLabel_5132Parser = new ConstraintParser();
+ }
+ return timeConstraintLabel_5132Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser timeConstraintName_5041Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getTimeConstraintName_5041Parser() {
+ if (timeConstraintName_5041Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ timeConstraintName_5041Parser = parser;
+ }
+ return timeConstraintName_5041Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ConstraintParser timeConstraintLabel_5133Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getTimeConstraintLabel_5133Parser() {
+ if (timeConstraintLabel_5133Parser == null) {
+ timeConstraintLabel_5133Parser = new ConstraintParser();
+ }
+ return timeConstraintLabel_5133Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser objectFlowName_6001Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getObjectFlowName_6001Parser() {
+ if (objectFlowName_6001Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ objectFlowName_6001Parser = parser;
+ }
+ return objectFlowName_6001Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ActivityEdgeWeightParser objectFlowLabel_6002Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getObjectFlowLabel_6002Parser() {
+ if (objectFlowLabel_6002Parser == null) {
+ objectFlowLabel_6002Parser = new ActivityEdgeWeightParser();
+ }
+ return objectFlowLabel_6002Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ObjectFlowSelectionParser objectFlowLabel_6005Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getObjectFlowLabel_6005Parser() {
+ if (objectFlowLabel_6005Parser == null) {
+ objectFlowLabel_6005Parser = new ObjectFlowSelectionParser();
+ }
+ return objectFlowLabel_6005Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ObjectFlowTransformationParser objectFlowLabel_6006Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getObjectFlowLabel_6006Parser() {
+ if (objectFlowLabel_6006Parser == null) {
+ objectFlowLabel_6006Parser = new ObjectFlowTransformationParser();
+ }
+ return objectFlowLabel_6006Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private DecisionInputFlowParser objectFlowLabel_6007Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getObjectFlowLabel_6007Parser() {
+ if (objectFlowLabel_6007Parser == null) {
+ objectFlowLabel_6007Parser = new DecisionInputFlowParser();
+ }
+ return objectFlowLabel_6007Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private EdgeGuardParser objectFlowLabel_6008Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getObjectFlowLabel_6008Parser() {
+ if (objectFlowLabel_6008Parser == null) {
+ objectFlowLabel_6008Parser = new EdgeGuardParser();
+ }
+ return objectFlowLabel_6008Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser objectFlowLabel_6010Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getObjectFlowLabel_6010Parser() {
+ if (objectFlowLabel_6010Parser == null) {
+ objectFlowLabel_6010Parser = new AppliedStereotypeParser();
+ }
+ return objectFlowLabel_6010Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser controlFlowName_6003Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getControlFlowName_6003Parser() {
+ if (controlFlowName_6003Parser == null) {
+ EAttribute[] features = new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ controlFlowName_6003Parser = parser;
+ }
+ return controlFlowName_6003Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ActivityEdgeWeightParser controlFlowLabel_6004Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getControlFlowLabel_6004Parser() {
+ if (controlFlowLabel_6004Parser == null) {
+ controlFlowLabel_6004Parser = new ActivityEdgeWeightParser();
+ }
+ return controlFlowLabel_6004Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private EdgeGuardParser controlFlowLabel_6009Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getControlFlowLabel_6009Parser() {
+ if (controlFlowLabel_6009Parser == null) {
+ controlFlowLabel_6009Parser = new EdgeGuardParser();
+ }
+ return controlFlowLabel_6009Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser controlFlowLabel_6011Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getControlFlowLabel_6011Parser() {
+ if (controlFlowLabel_6011Parser == null) {
+ controlFlowLabel_6011Parser = new AppliedStereotypeParser();
+ }
+ return controlFlowLabel_6011Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ExceptionHandlerTypeParser exceptionHandlerLabel_6012Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getExceptionHandlerLabel_6012Parser() {
+ if (exceptionHandlerLabel_6012Parser == null) {
+ exceptionHandlerLabel_6012Parser = new ExceptionHandlerTypeParser();
+ }
+ return exceptionHandlerLabel_6012Parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected IParser getParser(int visualID) {
+ switch (visualID) {
+ case ActivityNameEditPart.VISUAL_ID:
+ return getActivityName_5001Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case BroadcastSignalActionFloatingNameEditPart.VISUAL_ID:
+ return getBroadcastSignalActionFloatingName_6017Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case CentralBufferNodeFloatingNameEditPart.VISUAL_ID:
+ return getCentralBufferNodeFloatingName_6030Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case DataStoreNodeFloatingNameEditPart.VISUAL_ID:
+ return getDataStoreNodeFloatingName_6031Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case AddVariableValueActionFloatingNameEditPart.VISUAL_ID:
+ return getAddVariableValueActionFloatingName_6018Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case CallBehaviorActionFloatingNameEditPart.VISUAL_ID:
+ return getCallBehaviorActionFloatingName_6029Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case AddStructuralFeatureValueActionFloatingNameEditPart.VISUAL_ID:
+ return getAddStructuralFeatureValueActionFloatingName_6019Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case CallOperationActionFloatingNameEditPart.VISUAL_ID:
+ return getCallOperationActionFloatingName_6020Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case CreateObjectActionFloatingNameEditPart.VISUAL_ID:
+ return getCreateObjectActionFloatingName_6024Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case DestroyObjectActionFloatingNameEditPart.VISUAL_ID:
+ return getDestroyObjectActionFloatingName_6022Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case OpaqueActionFloatingNameEditPart.VISUAL_ID:
+ return getOpaqueActionFloatingName_6028Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case ReadSelfActionFloatingNameEditPart.VISUAL_ID:
+ return getReadSelfActionFloatingName_6025Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case ReadStructuralFeatureActionFloatingNameEditPart.VISUAL_ID:
+ return getReadStructuralFeatureActionFloatingName_6023Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case ReadVariableActionFloatingNameEditPart.VISUAL_ID:
+ return getReadVariableActionFloatingName_6021Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case SendObjectActionFloatingNameEditPart.VISUAL_ID:
+ return getSendObjectActionFloatingName_6027Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case SendSignalActionFloatingNameEditPart.VISUAL_ID:
+ return getSendSignalActionFloatingName_6032Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case ValueSpecificationActionFloatingNameEditPart.VISUAL_ID:
+ return getValueSpecificationActionFloatingName_6026Parser();
+
+ // //
+
+ // not generated but change include on gmfgen, can be override at the generation
+ case ActivityFinalNodeFloatingNameEditPart.VISUAL_ID:
+ return getActivityFinalNodeFloatingName_6033Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case InitialNodeFloatingNameEditPart.VISUAL_ID:
+ return getInitialNodeFloatingName_6034Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case FlowFinalNodeFloatingNameEditPart.VISUAL_ID:
+ return getFlowFinalNodeFloatingName_6034Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case DecisionNodeFloatingNameEditPart.VISUAL_ID:
+ return getDecisionNodeFloatingName_6036Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case MergeNodeFloatingNameEditPart.VISUAL_ID:
+ return getMergeNodeFloatingName_6037Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case ForkNodeFloatingNameEditPart.VISUAL_ID:
+ return getForkNodeFloatingName_6038Parser();
+ // not generated but change include on gmfgen, can be override at the generation
+ case JoinNodeFloatingNameEditPart.VISUAL_ID:
+ return geJoinNodeFloatingName_6039Parser();
+ case ActivityIsSingleExecutionEditPart.VISUAL_ID:
+ return getActivityIsSingleExecution_5002Parser();
+ case ParameterEditPart.VISUAL_ID:
+ return getParameter_3001Parser();
+ case ConstraintInActivityAsPrecondEditPart.VISUAL_ID:
+ return getConstraint_3002Parser();
+ case ConstraintInActivityAsPostcondEditPart.VISUAL_ID:
+ return getConstraint_3003Parser();
+ case InitialNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return getInitialNodeLabel_5080Parser();
+ case ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return getActivityFinalNodeLabel_5081Parser();
+ case FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return getFlowFinalNodeLabel_5082Parser();
+ case OpaqueActionNameEditPart.VISUAL_ID:
+ return getOpaqueActionName_5003Parser();
+ case ValuePinInOActLabelEditPart.VISUAL_ID:
+ return getValuePinLabel_5011Parser();
+ case ValuePinInOActValueEditPart.VISUAL_ID:
+ return getValuePinLabel_5024Parser();
+ case ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID:
+ return getValuePinLabel_5083Parser();
+ case ActionInputPinInOActLabelEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5012Parser();
+ case ActionInputPinInOActValueEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5025Parser();
+ case ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5084Parser();
+ case InputPinInOActLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5009Parser();
+ case InputPinInOActAppliedStereotypeEditPart.VISUAL_ID:
+ return getInputPinLabel_5085Parser();
+ case OutputPinInOActLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5010Parser();
+ case OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID:
+ return getOutputPinLabel_5086Parser();
+ case CallBehaviorActionNameEditPart.VISUAL_ID:
+ return getCallBehaviorActionLabel_5004Parser();
+ case ValuePinInCBActLabelEditPart.VISUAL_ID:
+ return getValuePinLabel_5013Parser();
+ case ValuePinInCBActValueEditPart.VISUAL_ID:
+ return getValuePinLabel_5026Parser();
+ case ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID:
+ return getValuePinLabel_5087Parser();
+ case ActionInputPinInCBActLabelEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5014Parser();
+ case ActionInputPinInCBActValueEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5027Parser();
+ case ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5088Parser();
+ case InputPinInCBActLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5015Parser();
+ case InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID:
+ return getInputPinLabel_5089Parser();
+ case OutputPinInCBActLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5016Parser();
+ case OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID:
+ return getOutputPinLabel_5090Parser();
+ case CallOperationActionNameEditPart.VISUAL_ID:
+ return getCallOperationActionLabel_5006Parser();
+ case ActionInputPinInCOActLabelEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5017Parser();
+ case ActionInputPinInCOActValueEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5028Parser();
+ case ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5091Parser();
+ case ValuePinInCOActLabelEditPart.VISUAL_ID:
+ return getValuePinLabel_5018Parser();
+ case ValuePinInCOActValueEditPart.VISUAL_ID:
+ return getValuePinLabel_5029Parser();
+ case ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID:
+ return getValuePinLabel_5092Parser();
+ case InputPinInCOActLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5019Parser();
+ case InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID:
+ return getInputPinLabel_5093Parser();
+ case OutputPinInCOActLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5020Parser();
+ case OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID:
+ return getOutputPinLabel_5094Parser();
+ case ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID:
+ return getValuePinLabel_5021Parser();
+ case ValuePinInCOActAsTargetValueEditPart.VISUAL_ID:
+ return getValuePinLabel_5030Parser();
+ case ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return getValuePinLabel_5095Parser();
+ case ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5022Parser();
+ case ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5031Parser();
+ case ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5096Parser();
+ case InputPinInCOActAsTargetLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5023Parser();
+ case InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return getInputPinLabel_5097Parser();
+ case DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
+ return getDurationConstraintName_5038Parser();
+ case DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
+ return getDurationConstraintLabel_5130Parser();
+ case DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
+ return getDurationConstraintName_5039Parser();
+ case DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
+ return getDurationConstraintLabel_5131Parser();
+ case TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
+ return getTimeConstraintName_5040Parser();
+ case TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
+ return getTimeConstraintLabel_5132Parser();
+ case TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
+ return getTimeConstraintName_5041Parser();
+ case TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
+ return getTimeConstraintLabel_5133Parser();
+ case IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
+ return getIntervalConstraintName_5036Parser();
+ case IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
+ return getIntervalConstraintLabel_5134Parser();
+ case IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
+ return getIntervalConstraintName_5037Parser();
+ case IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
+ return getIntervalConstraintLabel_5135Parser();
+ case ConstraintAsLocalPrecondNameEditPart.VISUAL_ID:
+ return getConstraintName_5007Parser();
+ case ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID:
+ return getConstraintLabel_5136Parser();
+ case ConstraintAsLocalPostcondNameEditPart.VISUAL_ID:
+ return getConstraintName_5008Parser();
+ case ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID:
+ return getConstraintLabel_5137Parser();
+ case DecisionInputEditPart.VISUAL_ID:
+ return getDecisionNodeLabel_5043Parser();
+ case DecisionNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return getDecisionNodeLabel_5098Parser();
+ case MergeNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return getMergeNodeLabel_5099Parser();
+ case ForkNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return getForkNodeLabel_5100Parser();
+ case JoinSpecEditPart.VISUAL_ID:
+ return getJoinNodeLabel_5042Parser();
+ case JoinNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return getJoinNodeLabel_5101Parser();
+ case DataStoreNodeLabelEditPart.VISUAL_ID:
+ return getDataStoreNodeLabel_5127Parser();
+ case DataStoreSelectionEditPart.VISUAL_ID:
+ return getDataStoreNodeLabel_5128Parser();
+ case SendObjectActionNameEditPart.VISUAL_ID:
+ return getSendObjectActionName_5059Parser();
+ case ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID:
+ return getValuePinLabel_5049Parser();
+ case ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID:
+ return getValuePinLabel_5050Parser();
+ case ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID:
+ return getValuePinLabel_5102Parser();
+ case ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5051Parser();
+ case ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5052Parser();
+ case ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5103Parser();
+ case InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5053Parser();
+ case InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID:
+ return getInputPinLabel_5104Parser();
+ case ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID:
+ return getValuePinLabel_5054Parser();
+ case ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID:
+ return getValuePinLabel_5055Parser();
+ case ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return getValuePinLabel_5105Parser();
+ case ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5056Parser();
+ case ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5057Parser();
+ case ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5106Parser();
+ case InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5058Parser();
+ case InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return getInputPinLabel_5107Parser();
+ case SendSignalActionNameEditPart.VISUAL_ID:
+ return getSendSignalActionName_5060Parser();
+ case ActionInputPinInSendSigActLabelEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5061Parser();
+ case ActionInputPinInSendSigActValueEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5062Parser();
+ case ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5108Parser();
+ case ValuePinInSendSigActLabelEditPart.VISUAL_ID:
+ return getValuePinLabel_5063Parser();
+ case ValuePinInSendSigActValueEditPart.VISUAL_ID:
+ return getValuePinLabel_5064Parser();
+ case ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID:
+ return getValuePinLabel_5109Parser();
+ case InputPinInSendSigActLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5065Parser();
+ case InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID:
+ return getInputPinLabel_5110Parser();
+ case ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID:
+ return getValuePinLabel_5072Parser();
+ case ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID:
+ return getValuePinLabel_5073Parser();
+ case ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return getValuePinLabel_5111Parser();
+ case ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5074Parser();
+ case ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5075Parser();
+ case ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return getActionInputPinLabel_5112Parser();
+ case InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5076Parser();
+ case InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID:
+ return getInputPinLabel_5113Parser();
+ case ParameterNodeNameEditPart.VISUAL_ID:
+ return getActivityParameterNodeLabel_5071Parser();
+ case AcceptEventActionLabelEditPart.VISUAL_ID:
+ return getAcceptEventActionLabel_5078Parser();
+ case AcceptTimeEventActionLabelEditPart.VISUAL_ID:
+ return getAcceptEventActionLabel_5079Parser();
+ case AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID:
+ return getAcceptEventActionLabel_5115Parser();
+ case OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5077Parser();
+ case OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID:
+ return getOutputPinLabel_5114Parser();
+ case ValueSpecificationActionNameEditPart.VISUAL_ID:
+ return getValueSpecificationActionName_5126Parser();
+ case OutputPinInValSpecActLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5124Parser();
+ case OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID:
+ return getOutputPinLabel_5125Parser();
+ case ConditionalNodeKeywordEditPart.VISUAL_ID:
+ return getConditionalNodeLabel_5119Parser();
+ case ExpansionRegionKeywordEditPart.VISUAL_ID:
+ return getExpansionRegionLabel_5120Parser();
+ case LoopNodeKeywordEditPart.VISUAL_ID:
+ return getLoopNodeLabel_5121Parser();
+ case OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5184Parser();
+ case OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID:
+ return getOutputPinLabel_5185Parser();
+ case OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5186Parser();
+ case OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID:
+ return getOutputPinLabel_5183Parser();
+ case OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5187Parser();
+ case OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID:
+ return getOutputPinLabel_5188Parser();
+ case SequenceNodeKeywordEditPart.VISUAL_ID:
+ return getSequenceNodeLabel_5123Parser();
+ case StructuredActivityNodeKeywordEditPart.VISUAL_ID:
+ return getStructuredActivityNodeLabel_5117Parser();
+ case InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5178Parser();
+ case InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID:
+ return getInputPinLabel_5179Parser();
+ case ActivityPartitionNameEditPart.VISUAL_ID:
+ return getActivityPartitionName_5118Parser();
+ case CommentBodyLabelEditPart.VISUAL_ID:
+ return getCommentBody_5138Parser();
+ case ReadSelfActionNameEditPart.VISUAL_ID:
+ return getReadSelfActionName_5139Parser();
+ case OutputPinInReadSelfActionLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5144Parser();
+ case OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID:
+ return getOutputPinLabel_5145Parser();
+ case ActivityNameEditPartCN.VISUAL_ID:
+ return getActivityName_5142Parser();
+ case ActivityIsSingleExecutionCNEditPart.VISUAL_ID:
+ return getActivityIsSingleExecution_5143Parser();
+ case CreateObjectActionNameEditPart.VISUAL_ID:
+ return getCreateObjectActionName_5148Parser();
+ case OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5146Parser();
+ case OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5147Parser();
+ case ShapeNamedElementNameEditPart.VISUAL_ID:
+ return getNamedElementName_5129Parser();
+ case ReadStructuralFeatureActionNameEditPart.VISUAL_ID:
+ return getReadStructuralFeatureActionName_5153Parser();
+ case InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5149Parser();
+ case InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5150Parser();
+ case OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5151Parser();
+ case InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5152Parser();
+ case AddStructuralFeatureValueActionNameEditPart.VISUAL_ID:
+ return getAddStructuralFeatureValueActionName_5160Parser();
+ case InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5154Parser();
+ case InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5155Parser();
+ case InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID:
+ return getInputPinLabel_5156Parser();
+ case InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID:
+ return getInputPinLabel_5157Parser();
+ case OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID:
+ return getOutputPinLabel_5158Parser();
+ case OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID:
+ return getOutputPinLabel_5159Parser();
+ case DestroyObjectActionNameEditPart.VISUAL_ID:
+ return getDestroyObjectActionName_5163Parser();
+ case InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5161Parser();
+ case InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5162Parser();
+ case ReadVariableActionNameEditPart.VISUAL_ID:
+ return getReadVariableActionName_5166Parser();
+ case OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5164Parser();
+ case OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return getOutputPinLabel_5165Parser();
+ case AddVariableValueActionNameEditPart.VISUAL_ID:
+ return getAddVariableValueActionName_5171Parser();
+ case InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5167Parser();
+ case InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5168Parser();
+ case InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5169Parser();
+ case InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5170Parser();
+ case BroadcastSignalActionNameEditPart.VISUAL_ID:
+ return getBroadcastSignalActionName_5175Parser();
+ case InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5172Parser();
+ case InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5173Parser();
+ case InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID:
+ return getInputPinLabel_5174Parser();
+ case CentralBufferNodeLabelEditPart.VISUAL_ID:
+ return getCentralBufferNodeLabel_5176Parser();
+ case CentralBufferNodeSelectionEditPart.VISUAL_ID:
+ return getCentralBufferNodeLabel_5177Parser();
+ case ConstraintNameEditPartCN.VISUAL_ID:
+ return getConstraintName_5189Parser();
+ case ConstraintBodyEditPartCN.VISUAL_ID:
+ return getConstraintSpecification_5190Parser();
+ case ObjectFlowNameEditPart.VISUAL_ID:
+ return getObjectFlowName_6001Parser();
+ case ObjectFlowWeightEditPart.VISUAL_ID:
+ return getObjectFlowLabel_6002Parser();
+ case ObjectFlowSelectionEditPart.VISUAL_ID:
+ return getObjectFlowLabel_6005Parser();
+ case ObjectFlowTransformationEditPart.VISUAL_ID:
+ return getObjectFlowLabel_6006Parser();
+ case DecisionInputFlowEditPart.VISUAL_ID:
+ return getObjectFlowLabel_6007Parser();
+ case ObjectFlowGuardEditPart.VISUAL_ID:
+ return getObjectFlowLabel_6008Parser();
+ case ObjectFlowAppliedStereotypeEditPart.VISUAL_ID:
+ return getObjectFlowLabel_6010Parser();
+ case ControlFlowNameEditPart.VISUAL_ID:
+ return getControlFlowName_6003Parser();
+ case ControlFlowWeightEditPart.VISUAL_ID:
+ return getControlFlowLabel_6004Parser();
+ case ControlFlowGuardEditPart.VISUAL_ID:
+ return getControlFlowLabel_6009Parser();
+ case ControlFlowAppliedStereotypeEditPart.VISUAL_ID:
+ return getControlFlowLabel_6011Parser();
+ case ExceptionHandlerTypeEditPart.VISUAL_ID:
+ return getExceptionHandlerLabel_6012Parser();
+ }
+ return null;
+ }
+
+ /**
+ * Utility method that consults ParserService
+ *
+ * @generated
+ */
+ public static IParser getParser(IElementType type, EObject object, String parserHint) {
+ return ParserService.getInstance().getParser(new HintAdapter(type, object, parserHint));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser(IAdaptable hint) {
+ String vid = (String) hint.getAdapter(String.class);
+ if (vid != null) {
+ return getParser(UMLVisualIDRegistry.getVisualID(vid));
+ }
+ View view = (View) hint.getAdapter(View.class);
+ if (view != null) {
+ return getParser(UMLVisualIDRegistry.getVisualID(view));
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean provides(IOperation operation) {
+ if (operation instanceof GetParserOperation) {
+ IAdaptable hint = ((GetParserOperation) operation).getHint();
+ if (UMLElementTypes.getElement(hint) == null) {
+ return false;
+ }
+ return getParser(hint) != null;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ private static class HintAdapter extends ParserHintAdapter {
+
+ /**
+ * @generated
+ */
+ private final IElementType elementType;
+
+ /**
+ * @generated
+ */
+ public HintAdapter(IElementType type, EObject object, String parserHint) {
+ super(object, parserHint);
+ assert type != null;
+ elementType = type;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (IElementType.class.equals(adapter)) {
+ return elementType;
+ }
+ return super.getAdapter(adapter);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLViewProvider.java
index 196ea679ddf..813ffe1e5d6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/providers/UMLViewProvider.java
@@ -1,3411 +1,3573 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.providers;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.providers.IViewProvider;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.notation.Bounds;
-import org.eclipse.gmf.runtime.notation.Connector;
-import org.eclipse.gmf.runtime.notation.DecorationNode;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.FillStyle;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.Location;
-import org.eclipse.gmf.runtime.notation.MeasurementUnit;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.RelativeBendpoints;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.TitleStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.activity.edit.parts.*;
-import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
-import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.uml2.uml.ActionInputPin;
-import org.eclipse.uml2.uml.CallBehaviorAction;
-import org.eclipse.uml2.uml.CallOperationAction;
-import org.eclipse.uml2.uml.InputPin;
-import org.eclipse.uml2.uml.OpaqueAction;
-import org.eclipse.uml2.uml.OutputPin;
-import org.eclipse.uml2.uml.ValuePin;
-
-/**
- * @generated
- */
-public class UMLViewProvider extends AbstractProvider implements IViewProvider {
-
- /**
- * @generated
- */
- @Override
- public final boolean provides(IOperation operation) {
- if (operation instanceof CreateViewForKindOperation) {
- return provides((CreateViewForKindOperation) operation);
- }
- assert operation instanceof CreateViewOperation;
- if (operation instanceof CreateDiagramViewOperation) {
- return provides((CreateDiagramViewOperation) operation);
- } else if (operation instanceof CreateEdgeViewOperation) {
- return provides((CreateEdgeViewOperation) operation);
- } else if (operation instanceof CreateNodeViewOperation) {
- return provides((CreateNodeViewOperation) operation);
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean provides(CreateViewForKindOperation op) {
- /*
- * if (op.getViewKind() == Node.class)
- * return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
- * 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;
- }
-
- /**
- * Indicates for which diagram this provider works for.
- * <p>
- * This method can be overloaded when diagram editor inherits from another one
- * </p>
- *
- * @return the unique identifier of the diagram for which views are provided.
- */
- protected String getDiagramProvidedId() {
- return ActivityDiagramEditPart.MODEL_ID;
- }
-
- /**
- * @generated
- */
- protected boolean provides(CreateDiagramViewOperation op) {
- return ActivityDiagramEditPart.MODEL_ID.equals(op.getSemanticHint()) && UMLVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())) != -1;
- }
-
- /**
- * @generated
- */
- protected boolean provides(CreateNodeViewOperation op) {
- if (op.getContainerView() == null) {
- return false;
- }
- IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- EObject domainElement = getSemanticElement(op.getSemanticAdapter());
- int visualID;
- if (op.getSemanticHint() == null) {
- // Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
- // In this situation there should be NO elementType, visualID will be determined
- // by VisualIDRegistry.getNodeVisualID() for domainElement.
- if (elementType != null || domainElement == null) {
- return false;
- }
- visualID = UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement);
- } else {
- visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint());
- if (elementType != null) {
- if (elementType instanceof IExtendedHintedElementType) {
- IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType);
- if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) {
- return false; // foreign element type.
- }
- } else {
- if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
- return false; // foreign element type
- }
- }
- String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
- if (!op.getSemanticHint().equals(elementTypeHint)) {
- return false; // if semantic hint is specified it should be the same as in element type
- }
- if (domainElement != null && visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
- return false; // visual id for node EClass should match visual id from element type
- }
- } else {
- if (!ActivityDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(op.getContainerView()))) {
- return false; // foreign diagram
- }
- switch (visualID) {
- case ActivityEditPart.VISUAL_ID:
- case ParameterEditPart.VISUAL_ID:
- case ConstraintInActivityAsPrecondEditPart.VISUAL_ID:
- case ConstraintInActivityAsPostcondEditPart.VISUAL_ID:
- case InitialNodeEditPart.VISUAL_ID:
- case ActivityFinalNodeEditPart.VISUAL_ID:
- case FlowFinalNodeEditPart.VISUAL_ID:
- case OpaqueActionEditPart.VISUAL_ID:
- case ValuePinInOpaqueActEditPart.VISUAL_ID:
- case ActionInputPinInOpaqueActEditPart.VISUAL_ID:
- case InputPinInOpaqueActEditPart.VISUAL_ID:
- case OutputPinInOpaqueActEditPart.VISUAL_ID:
- case CallBehaviorActionEditPart.VISUAL_ID:
- case ValuePinInCallBeActEditPart.VISUAL_ID:
- case ActionInputPinInCallBeActEditPart.VISUAL_ID:
- case InputPinInCallBeActEditPart.VISUAL_ID:
- case OutputPinInCallBeActEditPart.VISUAL_ID:
- case CallOperationActionEditPart.VISUAL_ID:
- case ActionInputPinInCallOpActEditPart.VISUAL_ID:
- case ValuePinInCallOpActEditPart.VISUAL_ID:
- case InputPinInCallOpActEditPart.VISUAL_ID:
- case OutputPinInCallOpActEditPart.VISUAL_ID:
- case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID:
- case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID:
- case InputPinInCallOpActAsTargetEditPart.VISUAL_ID:
- case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID:
- case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID:
- case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID:
- case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID:
- case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID:
- case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID:
- case ConstraintAsLocalPrecondEditPart.VISUAL_ID:
- case ConstraintAsLocalPostcondEditPart.VISUAL_ID:
- case DecisionNodeEditPart.VISUAL_ID:
- case MergeNodeEditPart.VISUAL_ID:
- case ForkNodeEditPart.VISUAL_ID:
- case JoinNodeEditPart.VISUAL_ID:
- case DataStoreNodeEditPart.VISUAL_ID:
- case SendObjectActionEditPart.VISUAL_ID:
- case ValuePinInSendObjActAsReqEditPart.VISUAL_ID:
- case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID:
- case InputPinInSendObjActAsReqEditPart.VISUAL_ID:
- case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID:
- case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID:
- case InputPinInSendObjActAsTargetEditPart.VISUAL_ID:
- case SendSignalActionEditPart.VISUAL_ID:
- case ActionInputPinInSendSigActEditPart.VISUAL_ID:
- case ValuePinInSendSigActEditPart.VISUAL_ID:
- case InputPinInSendSigActEditPart.VISUAL_ID:
- case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID:
- case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID:
- case InputPinInSendSigActAsTargetEditPart.VISUAL_ID:
- case ActivityParameterNodeEditPart.VISUAL_ID:
- case AcceptEventActionEditPart.VISUAL_ID:
- case OutputPinInAcceptEventActionEditPart.VISUAL_ID:
- case ValueSpecificationActionEditPart.VISUAL_ID:
- case OutputPinInValSpecActEditPart.VISUAL_ID:
- case ConditionalNodeEditPart.VISUAL_ID:
- case ExpansionRegionEditPart.VISUAL_ID:
- case ExpansionNodeAsInEditPart.VISUAL_ID:
- case ExpansionNodeAsOutEditPart.VISUAL_ID:
- case LoopNodeEditPart.VISUAL_ID:
- case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID:
- case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID:
- case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID:
- case SequenceNodeEditPart.VISUAL_ID:
- case StructuredActivityNodeEditPart.VISUAL_ID:
- case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID:
- case ActivityPartitionEditPart.VISUAL_ID:
- case InterruptibleActivityRegionEditPart.VISUAL_ID:
- case CommentEditPartCN.VISUAL_ID:
- case ReadSelfActionEditPart.VISUAL_ID:
- case ReadSelfActionOutputPinEditPart.VISUAL_ID:
- case ActivityEditPartCN.VISUAL_ID:
- case CreateObjectActionEditPart.VISUAL_ID:
- case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID:
- case ShapeNamedElementEditPart.VISUAL_ID:
- case ReadStructuralFeatureActionEditPart.VISUAL_ID:
- case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID:
- case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID:
- case AddStructuralFeatureValueActionEditPart.VISUAL_ID:
- case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID:
- case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID:
- case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID:
- case DestroyObjectActionEditPart.VISUAL_ID:
- case InputPinInDestroyObjectActionEditPart.VISUAL_ID:
- case ReadVariableActionEditPart.VISUAL_ID:
- case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID:
- case AddVariableValueActionEditPart.VISUAL_ID:
- case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID:
- case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID:
- case BroadcastSignalActionEditPart.VISUAL_ID:
- case InputPinInBroadcastSignalActionEditPart.VISUAL_ID:
- case CentralBufferNodeEditPart.VISUAL_ID:
- case ConstraintEditPartCN.VISUAL_ID:
- if (domainElement == null || visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
- return false; // visual id in semantic hint should match visual id for domain element
- }
- break;
- default:
- return false;
- }
- }
- }
- return UMLVisualIDRegistry.canCreateNode(op.getContainerView(), visualID);
- }
-
- /**
- * @generated
- */
- protected boolean provides(CreateEdgeViewOperation op) {
- IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- // RS: add code for extended types creation
- if (elementType instanceof IExtendedHintedElementType) {
- IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType);
- if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) {
- return false; // foreign element type.
- }
- } else {
- if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
- return false; // foreign element type
- }
- }
- // if (!org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
- // return false; // foreign element type
- // }
- // END R.S.
- String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
- if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) {
- return false; // our hint is visual id and must be specified, and it should be the same as in element type
- }
- int visualID = UMLVisualIDRegistry.getVisualID(elementTypeHint);
- EObject domainElement = getSemanticElement(op.getSemanticAdapter());
- if (domainElement != null && visualID != UMLVisualIDRegistry.getLinkWithClassVisualID(domainElement)) {
- return false; // visual id for link EClass should match visual id from element type
- }
- return true;
- }
-
- /**
- * @generated
- */
- @Override
- public Diagram createDiagram(IAdaptable semanticAdapter, String diagramKind, PreferencesHint preferencesHint) {
- Diagram diagram = NotationFactory.eINSTANCE.createDiagram();
- DiagramVersioningUtils.stampCurrentVersion(diagram);
- diagram.getStyles().add(NotationFactory.eINSTANCE.createDiagramStyle());
- diagram.setType(ActivityDiagramEditPart.MODEL_ID);
- diagram.setElement(getSemanticElement(semanticAdapter));
- diagram.setMeasurementUnit(MeasurementUnit.PIXEL_LITERAL);
- return diagram;
- }
-
- /**
- * @generated
- */
- @Override
- public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
- final EObject domainElement = getSemanticElement(semanticAdapter);
- final int visualID;
- if (semanticHint == null) {
- visualID = UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
- } else {
- visualID = UMLVisualIDRegistry.getVisualID(semanticHint);
- }
- switch (visualID) {
- case ActivityEditPart.VISUAL_ID:
- return createActivity_2001(domainElement, containerView, index, persisted, preferencesHint);
- case ParameterEditPart.VISUAL_ID:
- return createParameter_3001(domainElement, containerView, index, persisted, preferencesHint);
- case ConstraintInActivityAsPrecondEditPart.VISUAL_ID:
- return createConstraint_3002(domainElement, containerView, index, persisted, preferencesHint);
- case ConstraintInActivityAsPostcondEditPart.VISUAL_ID:
- return createConstraint_3003(domainElement, containerView, index, persisted, preferencesHint);
- case InitialNodeEditPart.VISUAL_ID:
- return createInitialNode_3004(domainElement, containerView, index, persisted, preferencesHint);
- case ActivityFinalNodeEditPart.VISUAL_ID:
- return createActivityFinalNode_3005(domainElement, containerView, index, persisted, preferencesHint);
- case FlowFinalNodeEditPart.VISUAL_ID:
- return createFlowFinalNode_3006(domainElement, containerView, index, persisted, preferencesHint);
- case OpaqueActionEditPart.VISUAL_ID:
- return createOpaqueAction_3007(domainElement, containerView, index, persisted, preferencesHint);
- case ValuePinInOpaqueActEditPart.VISUAL_ID:
- return createValuePin_3015(domainElement, containerView, index, persisted, preferencesHint);
- case ActionInputPinInOpaqueActEditPart.VISUAL_ID:
- return createActionInputPin_3016(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInOpaqueActEditPart.VISUAL_ID:
- return createInputPin_3013(domainElement, containerView, index, persisted, preferencesHint);
- case OutputPinInOpaqueActEditPart.VISUAL_ID:
- return createOutputPin_3014(domainElement, containerView, index, persisted, preferencesHint);
- case CallBehaviorActionEditPart.VISUAL_ID:
- return createCallBehaviorAction_3008(domainElement, containerView, index, persisted, preferencesHint);
- case ValuePinInCallBeActEditPart.VISUAL_ID:
- return createValuePin_3017(domainElement, containerView, index, persisted, preferencesHint);
- case ActionInputPinInCallBeActEditPart.VISUAL_ID:
- return createActionInputPin_3018(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInCallBeActEditPart.VISUAL_ID:
- return createInputPin_3019(domainElement, containerView, index, persisted, preferencesHint);
- case OutputPinInCallBeActEditPart.VISUAL_ID:
- return createOutputPin_3020(domainElement, containerView, index, persisted, preferencesHint);
- case CallOperationActionEditPart.VISUAL_ID:
- return createCallOperationAction_3010(domainElement, containerView, index, persisted, preferencesHint);
- case ActionInputPinInCallOpActEditPart.VISUAL_ID:
- return createActionInputPin_3021(domainElement, containerView, index, persisted, preferencesHint);
- case ValuePinInCallOpActEditPart.VISUAL_ID:
- return createValuePin_3022(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInCallOpActEditPart.VISUAL_ID:
- return createInputPin_3023(domainElement, containerView, index, persisted, preferencesHint);
- case OutputPinInCallOpActEditPart.VISUAL_ID:
- return createOutputPin_3024(domainElement, containerView, index, persisted, preferencesHint);
- case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID:
- return createValuePin_3025(domainElement, containerView, index, persisted, preferencesHint);
- case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID:
- return createActionInputPin_3026(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInCallOpActAsTargetEditPart.VISUAL_ID:
- return createInputPin_3027(domainElement, containerView, index, persisted, preferencesHint);
- case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID:
- return createDurationConstraint_3034(domainElement, containerView, index, persisted, preferencesHint);
- case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID:
- return createDurationConstraint_3035(domainElement, containerView, index, persisted, preferencesHint);
- case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID:
- return createTimeConstraint_3036(domainElement, containerView, index, persisted, preferencesHint);
- case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID:
- return createTimeConstraint_3037(domainElement, containerView, index, persisted, preferencesHint);
- case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID:
- return createIntervalConstraint_3032(domainElement, containerView, index, persisted, preferencesHint);
- case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID:
- return createIntervalConstraint_3033(domainElement, containerView, index, persisted, preferencesHint);
- case ConstraintAsLocalPrecondEditPart.VISUAL_ID:
- return createConstraint_3011(domainElement, containerView, index, persisted, preferencesHint);
- case ConstraintAsLocalPostcondEditPart.VISUAL_ID:
- return createConstraint_3012(domainElement, containerView, index, persisted, preferencesHint);
- case DecisionNodeEditPart.VISUAL_ID:
- return createDecisionNode_3038(domainElement, containerView, index, persisted, preferencesHint);
- case MergeNodeEditPart.VISUAL_ID:
- return createMergeNode_3039(domainElement, containerView, index, persisted, preferencesHint);
- case ForkNodeEditPart.VISUAL_ID:
- return createForkNode_3040(domainElement, containerView, index, persisted, preferencesHint);
- case JoinNodeEditPart.VISUAL_ID:
- return createJoinNode_3041(domainElement, containerView, index, persisted, preferencesHint);
- case DataStoreNodeEditPart.VISUAL_ID:
- return createDataStoreNode_3078(domainElement, containerView, index, persisted, preferencesHint);
- case SendObjectActionEditPart.VISUAL_ID:
- return createSendObjectAction_3042(domainElement, containerView, index, persisted, preferencesHint);
- case ValuePinInSendObjActAsReqEditPart.VISUAL_ID:
- return createValuePin_3046(domainElement, containerView, index, persisted, preferencesHint);
- case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID:
- return createActionInputPin_3047(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInSendObjActAsReqEditPart.VISUAL_ID:
- return createInputPin_3048(domainElement, containerView, index, persisted, preferencesHint);
- case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID:
- return createValuePin_3049(domainElement, containerView, index, persisted, preferencesHint);
- case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID:
- return createActionInputPin_3050(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInSendObjActAsTargetEditPart.VISUAL_ID:
- return createInputPin_3051(domainElement, containerView, index, persisted, preferencesHint);
- case SendSignalActionEditPart.VISUAL_ID:
- return createSendSignalAction_3052(domainElement, containerView, index, persisted, preferencesHint);
- case ActionInputPinInSendSigActEditPart.VISUAL_ID:
- return createActionInputPin_3053(domainElement, containerView, index, persisted, preferencesHint);
- case ValuePinInSendSigActEditPart.VISUAL_ID:
- return createValuePin_3054(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInSendSigActEditPart.VISUAL_ID:
- return createInputPin_3055(domainElement, containerView, index, persisted, preferencesHint);
- case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID:
- return createValuePin_3060(domainElement, containerView, index, persisted, preferencesHint);
- case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID:
- return createActionInputPin_3061(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInSendSigActAsTargetEditPart.VISUAL_ID:
- return createInputPin_3062(domainElement, containerView, index, persisted, preferencesHint);
- case ActivityParameterNodeEditPart.VISUAL_ID:
- return createActivityParameterNode_3059(domainElement, containerView, index, persisted, preferencesHint);
- case AcceptEventActionEditPart.VISUAL_ID:
- return createAcceptEventAction_3063(domainElement, containerView, index, persisted, preferencesHint);
- case OutputPinInAcceptEventActionEditPart.VISUAL_ID:
- return createOutputPin_3064(domainElement, containerView, index, persisted, preferencesHint);
- case ValueSpecificationActionEditPart.VISUAL_ID:
- return createValueSpecificationAction_3076(domainElement, containerView, index, persisted, preferencesHint);
- case OutputPinInValSpecActEditPart.VISUAL_ID:
- return createOutputPin_3077(domainElement, containerView, index, persisted, preferencesHint);
- case ConditionalNodeEditPart.VISUAL_ID:
- return createConditionalNode_3069(domainElement, containerView, index, persisted, preferencesHint);
- case ExpansionRegionEditPart.VISUAL_ID:
- return createExpansionRegion_3070(domainElement, containerView, index, persisted, preferencesHint);
- case ExpansionNodeAsInEditPart.VISUAL_ID:
- return createExpansionNode_3074(domainElement, containerView, index, persisted, preferencesHint);
- case ExpansionNodeAsOutEditPart.VISUAL_ID:
- return createExpansionNode_3075(domainElement, containerView, index, persisted, preferencesHint);
- case LoopNodeEditPart.VISUAL_ID:
- return createLoopNode_3071(domainElement, containerView, index, persisted, preferencesHint);
- case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID:
- return createOutputPin_3109(domainElement, containerView, index, persisted, preferencesHint);
- case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID:
- return createOutputPin_3110(domainElement, containerView, index, persisted, preferencesHint);
- case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID:
- return createOutputPin_3111(domainElement, containerView, index, persisted, preferencesHint);
- case SequenceNodeEditPart.VISUAL_ID:
- return createSequenceNode_3073(domainElement, containerView, index, persisted, preferencesHint);
- case StructuredActivityNodeEditPart.VISUAL_ID:
- return createStructuredActivityNode_3065(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID:
- return createInputPin_3105(domainElement, containerView, index, persisted, preferencesHint);
- case ActivityPartitionEditPart.VISUAL_ID:
- return createActivityPartition_3067(domainElement, containerView, index, persisted, preferencesHint);
- case InterruptibleActivityRegionEditPart.VISUAL_ID:
- return createInterruptibleActivityRegion_3068(domainElement, containerView, index, persisted, preferencesHint);
- case CommentEditPartCN.VISUAL_ID:
- return createComment_3080(domainElement, containerView, index, persisted, preferencesHint);
- case ReadSelfActionEditPart.VISUAL_ID:
- return createReadSelfAction_3081(domainElement, containerView, index, persisted, preferencesHint);
- case ReadSelfActionOutputPinEditPart.VISUAL_ID:
- return createOutputPin_3084(domainElement, containerView, index, persisted, preferencesHint);
- case ActivityEditPartCN.VISUAL_ID:
- return createActivity_3083(domainElement, containerView, index, persisted, preferencesHint);
- case CreateObjectActionEditPart.VISUAL_ID:
- return createCreateObjectAction_3086(domainElement, containerView, index, persisted, preferencesHint);
- case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID:
- return createOutputPin_3087(domainElement, containerView, index, persisted, preferencesHint);
- case ShapeNamedElementEditPart.VISUAL_ID:
- return createNamedElement_3085(domainElement, containerView, index, persisted, preferencesHint);
- case ReadStructuralFeatureActionEditPart.VISUAL_ID:
- return createReadStructuralFeatureAction_3088(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID:
- return createInputPin_3089(domainElement, containerView, index, persisted, preferencesHint);
- case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID:
- return createOutputPin_3090(domainElement, containerView, index, persisted, preferencesHint);
- case AddStructuralFeatureValueActionEditPart.VISUAL_ID:
- return createAddStructuralFeatureValueAction_3091(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID:
- return createInputPin_3092(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID:
- return createInputPin_3093(domainElement, containerView, index, persisted, preferencesHint);
- case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID:
- return createOutputPin_3094(domainElement, containerView, index, persisted, preferencesHint);
- case DestroyObjectActionEditPart.VISUAL_ID:
- return createDestroyObjectAction_3095(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInDestroyObjectActionEditPart.VISUAL_ID:
- return createInputPin_3096(domainElement, containerView, index, persisted, preferencesHint);
- case ReadVariableActionEditPart.VISUAL_ID:
- return createReadVariableAction_3097(domainElement, containerView, index, persisted, preferencesHint);
- case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID:
- return createOutputPin_3098(domainElement, containerView, index, persisted, preferencesHint);
- case AddVariableValueActionEditPart.VISUAL_ID:
- return createAddVariableValueAction_3099(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID:
- return createInputPin_3100(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID:
- return createInputPin_3101(domainElement, containerView, index, persisted, preferencesHint);
- case BroadcastSignalActionEditPart.VISUAL_ID:
- return createBroadcastSignalAction_3102(domainElement, containerView, index, persisted, preferencesHint);
- case InputPinInBroadcastSignalActionEditPart.VISUAL_ID:
- return createInputPin_3103(domainElement, containerView, index, persisted, preferencesHint);
- case CentralBufferNodeEditPart.VISUAL_ID:
- return createCentralBufferNode_3104(domainElement, containerView, index, persisted, preferencesHint);
- case ConstraintEditPartCN.VISUAL_ID:
- return createConstraint_3112(domainElement, containerView, index, persisted, preferencesHint);
- }
- // can't happen, provided #provides(CreateNodeViewOperation) is correct
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
- IElementType elementType = getSemanticElementType(semanticAdapter);
- String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
- switch (UMLVisualIDRegistry.getVisualID(elementTypeHint)) {
- case ActionLocalPreconditionEditPart.VISUAL_ID:
- return createActionLocalPrecondition_4001(containerView, index, persisted, preferencesHint);
- case ActionLocalPostconditionEditPart.VISUAL_ID:
- return createActionLocalPostcondition_4002(containerView, index, persisted, preferencesHint);
- case ObjectFlowEditPart.VISUAL_ID:
- return createObjectFlow_4003(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case ControlFlowEditPart.VISUAL_ID:
- return createControlFlow_4004(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case ExceptionHandlerEditPart.VISUAL_ID:
- return createExceptionHandler_4005(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case CommentLinkEditPart.VISUAL_ID:
- return createCommentAnnotatedElement_4006(containerView, index, persisted, preferencesHint);
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return createConstraintConstrainedElement_4007(containerView, index, persisted, preferencesHint);
- }
- // can never happen, provided #provides(CreateEdgeViewOperation) is correct
- return null;
- }
-
- /**
- * @generated
- */
- public Node createActivity_2001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActivityEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Activity");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Activity");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Activity");
- Node label5001 = createLabel(node, UMLVisualIDRegistry.getType(ActivityNameEditPart.VISUAL_ID));
- Node label5002 = createLabel(node, UMLVisualIDRegistry.getType(ActivityIsSingleExecutionEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityParametersCompartmentEditPart.VISUAL_ID), false, false, true, true);
- createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true);
- createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true);
- createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Activity");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createParameter_3001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Node node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- node.setType(UMLVisualIDRegistry.getType(ParameterEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Parameter");
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Parameter");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createConstraint_3002(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Node node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- node.setType(UMLVisualIDRegistry.getType(ConstraintInActivityAsPrecondEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createConstraint_3003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Node node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- node.setType(UMLVisualIDRegistry.getType(ConstraintInActivityAsPostcondEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInitialNode_3004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InitialNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InitialNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InitialNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InitialNode");
- Node label5080 = createLabel(node, UMLVisualIDRegistry.getType(InitialNodeAppliedStereotypeEditPart.VISUAL_ID));
- label5080.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5080 = (Location) label5080.getLayoutConstraint();
- location5080.setX(0);
- location5080.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createActivityFinalNode_3005(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActivityFinalNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActivityFinalNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActivityFinalNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActivityFinalNode");
- Node label5081 = createLabel(node, UMLVisualIDRegistry.getType(ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID));
- label5081.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5081 = (Location) label5081.getLayoutConstraint();
- location5081.setX(0);
- location5081.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createFlowFinalNode_3006(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(FlowFinalNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "FlowFinalNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "FlowFinalNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "FlowFinalNode");
- Node label5082 = createLabel(node, UMLVisualIDRegistry.getType(FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID));
- label5082.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5082 = (Location) label5082.getLayoutConstraint();
- location5082.setX(0);
- location5082.setY(5);
- return node;
- }
-
- /**
- * @generated NOT addition of pins initialization and height adaptation to pins
- */
- public Node createOpaqueAction_3007(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- // adapt the height to contained pins
- Bounds boundsConstraint = NotationFactory.eINSTANCE.createBounds();
- PinPositionLocator.adaptActionHeight(boundsConstraint, domainElement);
- node.setLayoutConstraint(boundsConstraint);
- node.setType(UMLVisualIDRegistry.getType(OpaqueActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OpaqueAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OpaqueAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OpaqueAction");
- Node label5003 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueActionNameEditPart.VISUAL_ID));
- // Add pins
- createPins(domainElement, node, persisted, preferencesHint);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createValuePin_3015(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ValuePinInOpaqueActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
- Node label5011 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInOActLabelEditPart.VISUAL_ID));
- label5011.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5011 = (Location) label5011.getLayoutConstraint();
- location5011.setX(0);
- location5011.setY(5);
- Node label5024 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInOActValueEditPart.VISUAL_ID));
- label5024.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5024 = (Location) label5024.getLayoutConstraint();
- location5024.setX(0);
- location5024.setY(5);
- Node label5083 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID));
- label5083.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5083 = (Location) label5083.getLayoutConstraint();
- location5083.setX(0);
- location5083.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createActionInputPin_3016(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActionInputPinInOpaqueActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
- Node label5012 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInOActLabelEditPart.VISUAL_ID));
- label5012.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5012 = (Location) label5012.getLayoutConstraint();
- location5012.setX(0);
- location5012.setY(5);
- Node label5025 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInOActValueEditPart.VISUAL_ID));
- label5025.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5025 = (Location) label5025.getLayoutConstraint();
- location5025.setX(0);
- location5025.setY(5);
- Node label5084 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID));
- label5084.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5084 = (Location) label5084.getLayoutConstraint();
- location5084.setX(0);
- location5084.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3013(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInOpaqueActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5009 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInOActLabelEditPart.VISUAL_ID));
- label5009.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5009 = (Location) label5009.getLayoutConstraint();
- location5009.setX(0);
- location5009.setY(5);
- Node label5085 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInOActAppliedStereotypeEditPart.VISUAL_ID));
- label5085.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5085 = (Location) label5085.getLayoutConstraint();
- location5085.setX(0);
- location5085.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createOutputPin_3014(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(OutputPinInOpaqueActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
- Node label5010 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInOActLabelEditPart.VISUAL_ID));
- label5010.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5010 = (Location) label5010.getLayoutConstraint();
- location5010.setX(0);
- location5010.setY(5);
- Node label5086 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID));
- label5086.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5086 = (Location) label5086.getLayoutConstraint();
- location5086.setX(0);
- location5086.setY(5);
- return node;
- }
-
- /**
- * @generated NOT addition of pins initialization and height adaptation to pins
- */
- public Node createCallBehaviorAction_3008(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- // adapt the height to contained pins
- Bounds boundsConstraint = NotationFactory.eINSTANCE.createBounds();
- PinPositionLocator.adaptActionHeight(boundsConstraint, domainElement);
- node.setLayoutConstraint(boundsConstraint);
- node.setType(UMLVisualIDRegistry.getType(CallBehaviorActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CallBehaviorAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CallBehaviorAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CallBehaviorAction");
- Node label5004 = createLabel(node, UMLVisualIDRegistry.getType(CallBehaviorActionNameEditPart.VISUAL_ID));
- // Add pins
- createPins(domainElement, node, persisted, preferencesHint);
- return node;
- }
-
- /**
- * Create pins in an action's node
- *
- * @param domainElement
- * the model action
- * @param node
- * the action node
- * @param persisted
- * the persisted property of views to create
- * @param preferencesHint
- * the preference hint
- * @generated NOT
- */
- private void createPins(EObject domainElement, Shape node, boolean persisted, PreferencesHint preferencesHint) {
- if (domainElement instanceof OpaqueAction) {
- // pins of an opaque action : input values and output values
- int index = 0;
- for (InputPin pin : ((OpaqueAction) domainElement).getInputValues()) {
- if (pin instanceof ValuePin) {
- createValuePin_3015(pin, node, index, persisted, preferencesHint);
- } else if (pin instanceof ActionInputPin) {
- createActionInputPin_3016(pin, node, index, persisted, preferencesHint);
- } else {
- createInputPin_3013(pin, node, index, persisted, preferencesHint);
- }
- index++;
- }
- index = 0;
- for (OutputPin pin : ((OpaqueAction) domainElement).getOutputValues()) {
- createOutputPin_3014(pin, node, index, persisted, preferencesHint);
- }
- } else if (domainElement instanceof CallBehaviorAction) {
- // pins of a call behavior action : arguments and results
- int index = 0;
- for (InputPin pin : ((CallBehaviorAction) domainElement).getArguments()) {
- if (pin instanceof ValuePin) {
- createValuePin_3017(pin, node, index, persisted, preferencesHint);
- } else if (pin instanceof ActionInputPin) {
- createActionInputPin_3018(pin, node, index, persisted, preferencesHint);
- } else {
- createInputPin_3019(pin, node, index, persisted, preferencesHint);
- }
- index++;
- }
- index = 0;
- for (OutputPin pin : ((CallBehaviorAction) domainElement).getResults()) {
- createOutputPin_3020(pin, node, index, persisted, preferencesHint);
- }
- } else if (domainElement instanceof CallOperationAction) {
- // pins of a call operation action : arguments, target and results
- int index = 0;
- for (InputPin pin : ((CallOperationAction) domainElement).getArguments()) {
- if (pin instanceof ValuePin) {
- createValuePin_3022(pin, node, index, persisted, preferencesHint);
- } else if (pin instanceof ActionInputPin) {
- createActionInputPin_3021(pin, node, index, persisted, preferencesHint);
- } else {
- createInputPin_3023(pin, node, index, persisted, preferencesHint);
- }
- index++;
- }
- InputPin target = ((CallOperationAction) domainElement).getTarget();
- if (target instanceof ValuePin) {
- createValuePin_3025(target, node, index, persisted, preferencesHint);
- } else if (target instanceof ActionInputPin) {
- createActionInputPin_3026(target, node, index, persisted, preferencesHint);
- } else if (target != null) {
- createInputPin_3027(target, node, index, persisted, preferencesHint);
- }
- index = 0;
- for (OutputPin pin : ((CallOperationAction) domainElement).getResults()) {
- createOutputPin_3024(pin, node, index, persisted, preferencesHint);
- }
- }
- }
-
- /**
- * @generated
- */
- public Node createValuePin_3017(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ValuePinInCallBeActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
- Node label5013 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCBActLabelEditPart.VISUAL_ID));
- label5013.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5013 = (Location) label5013.getLayoutConstraint();
- location5013.setX(0);
- location5013.setY(5);
- Node label5026 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCBActValueEditPart.VISUAL_ID));
- label5026.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5026 = (Location) label5026.getLayoutConstraint();
- location5026.setX(0);
- location5026.setY(5);
- Node label5087 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID));
- label5087.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5087 = (Location) label5087.getLayoutConstraint();
- location5087.setX(0);
- location5087.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createActionInputPin_3018(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActionInputPinInCallBeActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
- Node label5014 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCBActLabelEditPart.VISUAL_ID));
- label5014.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5014 = (Location) label5014.getLayoutConstraint();
- location5014.setX(0);
- location5014.setY(5);
- Node label5027 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCBActValueEditPart.VISUAL_ID));
- label5027.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5027 = (Location) label5027.getLayoutConstraint();
- location5027.setX(0);
- location5027.setY(5);
- Node label5088 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID));
- label5088.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5088 = (Location) label5088.getLayoutConstraint();
- location5088.setX(0);
- location5088.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3019(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInCallBeActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5015 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCBActLabelEditPart.VISUAL_ID));
- label5015.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5015 = (Location) label5015.getLayoutConstraint();
- location5015.setX(0);
- location5015.setY(5);
- Node label5089 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID));
- label5089.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5089 = (Location) label5089.getLayoutConstraint();
- location5089.setX(0);
- location5089.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createOutputPin_3020(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(OutputPinInCallBeActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
- Node label5016 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCBActLabelEditPart.VISUAL_ID));
- label5016.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5016 = (Location) label5016.getLayoutConstraint();
- location5016.setX(0);
- location5016.setY(5);
- Node label5090 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID));
- label5090.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5090 = (Location) label5090.getLayoutConstraint();
- location5090.setX(0);
- location5090.setY(5);
- return node;
- }
-
- /**
- * @generated NOT addition of pins initialization and height adaptation to pins
- */
- public Node createCallOperationAction_3010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- // adapt the height to contained pins
- Bounds boundsConstraint = NotationFactory.eINSTANCE.createBounds();
- PinPositionLocator.adaptActionHeight(boundsConstraint, domainElement);
- node.setLayoutConstraint(boundsConstraint);
- node.setType(UMLVisualIDRegistry.getType(CallOperationActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CallOperationAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CallOperationAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CallOperationAction");
- Node label5006 = createLabel(node, UMLVisualIDRegistry.getType(CallOperationActionNameEditPart.VISUAL_ID));
- // Add pins
- createPins(domainElement, node, persisted, preferencesHint);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createActionInputPin_3021(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActionInputPinInCallOpActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
- Node label5017 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActLabelEditPart.VISUAL_ID));
- label5017.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5017 = (Location) label5017.getLayoutConstraint();
- location5017.setX(0);
- location5017.setY(5);
- Node label5028 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActValueEditPart.VISUAL_ID));
- label5028.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5028 = (Location) label5028.getLayoutConstraint();
- location5028.setX(0);
- location5028.setY(5);
- Node label5091 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID));
- label5091.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5091 = (Location) label5091.getLayoutConstraint();
- location5091.setX(0);
- location5091.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createValuePin_3022(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ValuePinInCallOpActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
- Node label5018 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActLabelEditPart.VISUAL_ID));
- label5018.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5018 = (Location) label5018.getLayoutConstraint();
- location5018.setX(0);
- location5018.setY(5);
- Node label5029 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActValueEditPart.VISUAL_ID));
- label5029.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5029 = (Location) label5029.getLayoutConstraint();
- location5029.setX(0);
- location5029.setY(5);
- Node label5092 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID));
- label5092.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5092 = (Location) label5092.getLayoutConstraint();
- location5092.setX(0);
- location5092.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3023(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInCallOpActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5019 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActLabelEditPart.VISUAL_ID));
- label5019.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5019 = (Location) label5019.getLayoutConstraint();
- location5019.setX(0);
- location5019.setY(5);
- Node label5093 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID));
- label5093.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5093 = (Location) label5093.getLayoutConstraint();
- location5093.setX(0);
- location5093.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createOutputPin_3024(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(OutputPinInCallOpActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
- Node label5020 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCOActLabelEditPart.VISUAL_ID));
- label5020.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5020 = (Location) label5020.getLayoutConstraint();
- location5020.setX(0);
- location5020.setY(5);
- Node label5094 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID));
- label5094.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5094 = (Location) label5094.getLayoutConstraint();
- location5094.setX(0);
- location5094.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createValuePin_3025(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ValuePinInCallOpActAsTargetEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
- Node label5021 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID));
- label5021.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5021 = (Location) label5021.getLayoutConstraint();
- location5021.setX(0);
- location5021.setY(5);
- Node label5030 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAsTargetValueEditPart.VISUAL_ID));
- label5030.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5030 = (Location) label5030.getLayoutConstraint();
- location5030.setX(0);
- location5030.setY(5);
- Node label5095 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
- label5095.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5095 = (Location) label5095.getLayoutConstraint();
- location5095.setX(0);
- location5095.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createActionInputPin_3026(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
- Node label5022 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID));
- label5022.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5022 = (Location) label5022.getLayoutConstraint();
- location5022.setX(0);
- location5022.setY(5);
- Node label5031 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID));
- label5031.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5031 = (Location) label5031.getLayoutConstraint();
- location5031.setX(0);
- location5031.setY(5);
- Node label5096 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
- label5096.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5096 = (Location) label5096.getLayoutConstraint();
- location5096.setX(0);
- location5096.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3027(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInCallOpActAsTargetEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5023 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActAsTargetLabelEditPart.VISUAL_ID));
- label5023.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5023 = (Location) label5023.getLayoutConstraint();
- location5023.setX(0);
- location5023.setY(5);
- Node label5097 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
- label5097.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5097 = (Location) label5097.getLayoutConstraint();
- location5097.setX(0);
- location5097.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createConstraint_3011(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ConstraintAsLocalPrecondEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Constraint");
- Node label5007 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPrecondNameEditPart.VISUAL_ID));
- Node label5136 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createConstraint_3012(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ConstraintAsLocalPostcondEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Constraint");
- Node label5008 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPostcondNameEditPart.VISUAL_ID));
- Node label5137 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createDecisionNode_3038(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DecisionNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DecisionNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DecisionNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DecisionNode");
- Node label5043 = createLabel(node, UMLVisualIDRegistry.getType(DecisionInputEditPart.VISUAL_ID));
- label5043.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5043 = (Location) label5043.getLayoutConstraint();
- location5043.setX(0);
- location5043.setY(5);
- Node label5098 = createLabel(node, UMLVisualIDRegistry.getType(DecisionNodeAppliedStereotypeEditPart.VISUAL_ID));
- label5098.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5098 = (Location) label5098.getLayoutConstraint();
- location5098.setX(0);
- location5098.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createMergeNode_3039(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(MergeNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "MergeNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "MergeNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "MergeNode");
- Node label5099 = createLabel(node, UMLVisualIDRegistry.getType(MergeNodeAppliedStereotypeEditPart.VISUAL_ID));
- label5099.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5099 = (Location) label5099.getLayoutConstraint();
- location5099.setX(0);
- location5099.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createForkNode_3040(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ForkNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ForkNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ForkNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ForkNode");
- Node label5100 = createLabel(node, UMLVisualIDRegistry.getType(ForkNodeAppliedStereotypeEditPart.VISUAL_ID));
- label5100.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5100 = (Location) label5100.getLayoutConstraint();
- location5100.setX(0);
- location5100.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createJoinNode_3041(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(JoinNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "JoinNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "JoinNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "JoinNode");
- Node label5042 = createLabel(node, UMLVisualIDRegistry.getType(JoinSpecEditPart.VISUAL_ID));
- label5042.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5042 = (Location) label5042.getLayoutConstraint();
- location5042.setX(0);
- location5042.setY(5);
- Node label5101 = createLabel(node, UMLVisualIDRegistry.getType(JoinNodeAppliedStereotypeEditPart.VISUAL_ID));
- label5101.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5101 = (Location) label5101.getLayoutConstraint();
- location5101.setX(0);
- location5101.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createSendObjectAction_3042(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(SendObjectActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "SendObjectAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SendObjectAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "SendObjectAction");
- Node label5059 = createLabel(node, UMLVisualIDRegistry.getType(SendObjectActionNameEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createValuePin_3046(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
- Node label5049 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID));
- label5049.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5049 = (Location) label5049.getLayoutConstraint();
- location5049.setX(0);
- location5049.setY(5);
- Node label5050 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID));
- label5050.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5050 = (Location) label5050.getLayoutConstraint();
- location5050.setX(0);
- location5050.setY(5);
- Node label5102 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID));
- label5102.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5102 = (Location) label5102.getLayoutConstraint();
- location5102.setX(0);
- location5102.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createActionInputPin_3047(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
- Node label5051 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID));
- label5051.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5051 = (Location) label5051.getLayoutConstraint();
- location5051.setX(0);
- location5051.setY(5);
- Node label5052 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID));
- label5052.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5052 = (Location) label5052.getLayoutConstraint();
- location5052.setX(0);
- location5052.setY(5);
- Node label5103 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID));
- label5103.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5103 = (Location) label5103.getLayoutConstraint();
- location5103.setX(0);
- location5103.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3048(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInSendObjActAsReqEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5053 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID));
- label5053.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5053 = (Location) label5053.getLayoutConstraint();
- location5053.setX(0);
- location5053.setY(5);
- Node label5104 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID));
- label5104.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5104 = (Location) label5104.getLayoutConstraint();
- location5104.setX(0);
- location5104.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createValuePin_3049(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
- Node label5054 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID));
- label5054.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5054 = (Location) label5054.getLayoutConstraint();
- location5054.setX(0);
- location5054.setY(5);
- Node label5055 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID));
- label5055.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5055 = (Location) label5055.getLayoutConstraint();
- location5055.setX(0);
- location5055.setY(5);
- Node label5105 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
- label5105.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5105 = (Location) label5105.getLayoutConstraint();
- location5105.setX(0);
- location5105.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createActionInputPin_3050(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
- Node label5056 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID));
- label5056.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5056 = (Location) label5056.getLayoutConstraint();
- location5056.setX(0);
- location5056.setY(5);
- Node label5057 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID));
- label5057.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5057 = (Location) label5057.getLayoutConstraint();
- location5057.setX(0);
- location5057.setY(5);
- Node label5106 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
- label5106.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5106 = (Location) label5106.getLayoutConstraint();
- location5106.setX(0);
- location5106.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3051(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInSendObjActAsTargetEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5058 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID));
- label5058.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5058 = (Location) label5058.getLayoutConstraint();
- location5058.setX(0);
- location5058.setY(5);
- Node label5107 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
- label5107.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5107 = (Location) label5107.getLayoutConstraint();
- location5107.setX(0);
- location5107.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createSendSignalAction_3052(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(SendSignalActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "SendSignalAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SendSignalAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "SendSignalAction");
- Node label5060 = createLabel(node, UMLVisualIDRegistry.getType(SendSignalActionNameEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createActionInputPin_3053(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendSigActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
- Node label5061 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActLabelEditPart.VISUAL_ID));
- label5061.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5061 = (Location) label5061.getLayoutConstraint();
- location5061.setX(0);
- location5061.setY(5);
- Node label5062 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActValueEditPart.VISUAL_ID));
- label5062.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5062 = (Location) label5062.getLayoutConstraint();
- location5062.setX(0);
- location5062.setY(5);
- Node label5108 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID));
- label5108.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5108 = (Location) label5108.getLayoutConstraint();
- location5108.setX(0);
- location5108.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createValuePin_3054(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ValuePinInSendSigActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
- Node label5063 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActLabelEditPart.VISUAL_ID));
- label5063.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5063 = (Location) label5063.getLayoutConstraint();
- location5063.setX(0);
- location5063.setY(5);
- Node label5064 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActValueEditPart.VISUAL_ID));
- label5064.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5064 = (Location) label5064.getLayoutConstraint();
- location5064.setX(0);
- location5064.setY(5);
- Node label5109 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID));
- label5109.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5109 = (Location) label5109.getLayoutConstraint();
- location5109.setX(0);
- location5109.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3055(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInSendSigActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5065 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActLabelEditPart.VISUAL_ID));
- label5065.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5065 = (Location) label5065.getLayoutConstraint();
- location5065.setX(0);
- location5065.setY(5);
- Node label5110 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID));
- label5110.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5110 = (Location) label5110.getLayoutConstraint();
- location5110.setX(0);
- location5110.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createValuePin_3060(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
- Node label5072 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID));
- label5072.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5072 = (Location) label5072.getLayoutConstraint();
- location5072.setX(0);
- location5072.setY(5);
- Node label5073 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID));
- label5073.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5073 = (Location) label5073.getLayoutConstraint();
- location5073.setX(0);
- location5073.setY(5);
- Node label5111 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
- label5111.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5111 = (Location) label5111.getLayoutConstraint();
- location5111.setX(0);
- location5111.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createActionInputPin_3061(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
- Node label5074 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID));
- label5074.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5074 = (Location) label5074.getLayoutConstraint();
- location5074.setX(0);
- location5074.setY(5);
- Node label5075 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID));
- label5075.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5075 = (Location) label5075.getLayoutConstraint();
- location5075.setX(0);
- location5075.setY(5);
- Node label5112 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
- label5112.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5112 = (Location) label5112.getLayoutConstraint();
- location5112.setX(0);
- location5112.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3062(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInSendSigActAsTargetEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5076 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID));
- label5076.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5076 = (Location) label5076.getLayoutConstraint();
- location5076.setX(0);
- location5076.setY(5);
- Node label5113 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
- label5113.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5113 = (Location) label5113.getLayoutConstraint();
- location5113.setX(0);
- location5113.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createActivityParameterNode_3059(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActivityParameterNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActivityParameterNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActivityParameterNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActivityParameterNode");
- Node label5071 = createLabel(node, UMLVisualIDRegistry.getType(ParameterNodeNameEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createAcceptEventAction_3063(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(AcceptEventActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "AcceptEventAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AcceptEventAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "AcceptEventAction");
- Node label5078 = createLabel(node, UMLVisualIDRegistry.getType(AcceptEventActionLabelEditPart.VISUAL_ID));
- Node label5079 = createLabel(node, UMLVisualIDRegistry.getType(AcceptTimeEventActionLabelEditPart.VISUAL_ID));
- label5079.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5079 = (Location) label5079.getLayoutConstraint();
- location5079.setX(0);
- location5079.setY(5);
- Node label5115 = createLabel(node, UMLVisualIDRegistry.getType(AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID));
- label5115.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5115 = (Location) label5115.getLayoutConstraint();
- location5115.setX(0);
- location5115.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createOutputPin_3064(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(OutputPinInAcceptEventActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
- Node label5077 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID));
- label5077.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5077 = (Location) label5077.getLayoutConstraint();
- location5077.setX(0);
- location5077.setY(5);
- Node label5114 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID));
- label5114.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5114 = (Location) label5114.getLayoutConstraint();
- location5114.setX(0);
- location5114.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createStructuredActivityNode_3065(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(StructuredActivityNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "StructuredActivityNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "StructuredActivityNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "StructuredActivityNode");
- Node label5117 = createLabel(node, UMLVisualIDRegistry.getType(StructuredActivityNodeKeywordEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "StructuredActivityNode");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3105(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInLoopNodeAsVariableEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5178 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID));
- label5178.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5178 = (Location) label5178.getLayoutConstraint();
- location5178.setX(0);
- location5178.setY(5);
- Node label5179 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID));
- label5179.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5179 = (Location) label5179.getLayoutConstraint();
- location5179.setX(0);
- location5179.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createActivityPartition_3067(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActivityPartitionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActivityPartition");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActivityPartition");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActivityPartition");
- Node label5118 = createLabel(node, UMLVisualIDRegistry.getType(ActivityPartitionNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ActivityPartition");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInterruptibleActivityRegion_3068(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InterruptibleActivityRegionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InterruptibleActivityRegion");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InterruptibleActivityRegion");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InterruptibleActivityRegion");
- createCompartment(node, UMLVisualIDRegistry.getType(InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "InterruptibleActivityRegion");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createComment_3080(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(CommentEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Comment");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Comment");
- Node label5138 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyLabelEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createReadSelfAction_3081(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ReadSelfActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ReadSelfAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ReadSelfAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ReadSelfAction");
- Node label5139 = createLabel(node, UMLVisualIDRegistry.getType(ReadSelfActionNameEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createOutputPin_3084(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ReadSelfActionOutputPinEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
- Node label5144 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadSelfActionLabelEditPart.VISUAL_ID));
- label5144.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5144 = (Location) label5144.getLayoutConstraint();
- location5144.setX(0);
- location5144.setY(5);
- Node label5145 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID));
- label5145.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5145 = (Location) label5145.getLayoutConstraint();
- location5145.setX(0);
- location5145.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createActivity_3083(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ActivityEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Activity");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Activity");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Activity");
- Node label5142 = createLabel(node, UMLVisualIDRegistry.getType(ActivityNameEditPartCN.VISUAL_ID));
- Node label5143 = createLabel(node, UMLVisualIDRegistry.getType(ActivityIsSingleExecutionCNEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNParametersCompartmentEditPart.VISUAL_ID), false, false, true, true);
- createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true);
- createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true);
- createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Activity");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createNamedElement_3085(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ShapeNamedElementEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ShapeNamedElement");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ShapeNamedElement");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ShapeNamedElement");
- Node label5129 = createLabel(node, UMLVisualIDRegistry.getType(ShapeNamedElementNameEditPart.VISUAL_ID));
- label5129.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5129 = (Location) label5129.getLayoutConstraint();
- location5129.setX(25);
- location5129.setY(3);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createCreateObjectAction_3086(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(CreateObjectActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CreateObjectAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CreateObjectAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CreateObjectAction");
- Node label5148 = createLabel(node, UMLVisualIDRegistry.getType(CreateObjectActionNameEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createOutputPin_3087(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
- Node label5146 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID));
- label5146.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5146 = (Location) label5146.getLayoutConstraint();
- location5146.setX(0);
- location5146.setY(5);
- Node label5147 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
- label5147.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5147 = (Location) label5147.getLayoutConstraint();
- location5147.setX(0);
- location5147.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createReadStructuralFeatureAction_3088(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ReadStructuralFeatureActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ReadStructuralFeatureAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ReadStructuralFeatureAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ReadStructuralFeatureAction");
- Node label5153 = createLabel(node, UMLVisualIDRegistry.getType(ReadStructuralFeatureActionNameEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3089(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5149 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID));
- label5149.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5149 = (Location) label5149.getLayoutConstraint();
- location5149.setX(0);
- location5149.setY(5);
- Node label5150 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
- label5150.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5150 = (Location) label5150.getLayoutConstraint();
- location5150.setX(0);
- location5150.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createOutputPin_3090(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
- Node label5151 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID));
- label5151.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5151 = (Location) label5151.getLayoutConstraint();
- location5151.setX(0);
- location5151.setY(5);
- Node label5152 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID));
- label5152.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5152 = (Location) label5152.getLayoutConstraint();
- location5152.setX(0);
- location5152.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createAddStructuralFeatureValueAction_3091(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "AddStructuralFeatureValueAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AddStructuralFeatureValueAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "AddStructuralFeatureValueAction");
- Node label5160 = createLabel(node, UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionNameEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3092(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5154 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID));
- label5154.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5154 = (Location) label5154.getLayoutConstraint();
- location5154.setX(0);
- location5154.setY(5);
- Node label5155 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
- label5155.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5155 = (Location) label5155.getLayoutConstraint();
- location5155.setX(0);
- location5155.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3093(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5156 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID));
- label5156.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5156 = (Location) label5156.getLayoutConstraint();
- location5156.setX(0);
- location5156.setY(5);
- Node label5157 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID));
- label5157.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5157 = (Location) label5157.getLayoutConstraint();
- location5157.setX(0);
- location5157.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createOutputPin_3094(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
- Node label5158 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID));
- label5158.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5158 = (Location) label5158.getLayoutConstraint();
- location5158.setX(0);
- location5158.setY(5);
- Node label5159 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID));
- label5159.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5159 = (Location) label5159.getLayoutConstraint();
- location5159.setX(0);
- location5159.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createDestroyObjectAction_3095(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DestroyObjectActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DestroyObjectAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DestroyObjectAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DestroyObjectAction");
- Node label5163 = createLabel(node, UMLVisualIDRegistry.getType(DestroyObjectActionNameEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3096(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInDestroyObjectActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5161 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID));
- label5161.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5161 = (Location) label5161.getLayoutConstraint();
- location5161.setX(0);
- location5161.setY(5);
- Node label5162 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
- label5162.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5162 = (Location) label5162.getLayoutConstraint();
- location5162.setX(0);
- location5162.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createReadVariableAction_3097(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ReadVariableActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ReadVariableAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ReadVariableAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ReadVariableAction");
- Node label5166 = createLabel(node, UMLVisualIDRegistry.getType(ReadVariableActionNameEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createOutputPin_3098(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
- Node label5164 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID));
- label5164.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5164 = (Location) label5164.getLayoutConstraint();
- location5164.setX(0);
- location5164.setY(5);
- Node label5165 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
- label5165.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5165 = (Location) label5165.getLayoutConstraint();
- location5165.setX(0);
- location5165.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createAddVariableValueAction_3099(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(AddVariableValueActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "AddVariableValueAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AddVariableValueAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "AddVariableValueAction");
- Node label5171 = createLabel(node, UMLVisualIDRegistry.getType(AddVariableValueActionNameEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3100(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5167 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID));
- label5167.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5167 = (Location) label5167.getLayoutConstraint();
- location5167.setX(0);
- location5167.setY(5);
- Node label5168 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
- label5168.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5168 = (Location) label5168.getLayoutConstraint();
- location5168.setX(0);
- location5168.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3101(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5169 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID));
- label5169.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5169 = (Location) label5169.getLayoutConstraint();
- location5169.setX(0);
- location5169.setY(5);
- Node label5170 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
- label5170.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5170 = (Location) label5170.getLayoutConstraint();
- location5170.setX(0);
- location5170.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createBroadcastSignalAction_3102(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(BroadcastSignalActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "BroadcastSignalAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "BroadcastSignalAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "BroadcastSignalAction");
- Node label5175 = createLabel(node, UMLVisualIDRegistry.getType(BroadcastSignalActionNameEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createInputPin_3103(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
- Node label5172 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID));
- label5172.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5172 = (Location) label5172.getLayoutConstraint();
- location5172.setX(0);
- location5172.setY(5);
- Node label5173 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID));
- label5173.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5173 = (Location) label5173.getLayoutConstraint();
- location5173.setX(0);
- location5173.setY(5);
- Node label5174 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
- label5174.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5174 = (Location) label5174.getLayoutConstraint();
- location5174.setX(0);
- location5174.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createCentralBufferNode_3104(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(CentralBufferNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CentralBufferNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CentralBufferNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CentralBufferNode");
- Node label5176 = createLabel(node, UMLVisualIDRegistry.getType(CentralBufferNodeLabelEditPart.VISUAL_ID));
- Node label5177 = createLabel(node, UMLVisualIDRegistry.getType(CentralBufferNodeSelectionEditPart.VISUAL_ID));
- label5177.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5177 = (Location) label5177.getLayoutConstraint();
- location5177.setX(0);
- location5177.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createConstraint_3112(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ConstraintEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Constraint");
- Node label5189 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID));
- Node label5190 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintBodyEditPartCN.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createValueSpecificationAction_3076(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ValueSpecificationActionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValueSpecificationAction");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValueSpecificationAction");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValueSpecificationAction");
- Node label5126 = createLabel(node, UMLVisualIDRegistry.getType(ValueSpecificationActionNameEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createOutputPin_3077(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(OutputPinInValSpecActEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
- Node label5124 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInValSpecActLabelEditPart.VISUAL_ID));
- label5124.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5124 = (Location) label5124.getLayoutConstraint();
- location5124.setX(0);
- location5124.setY(5);
- Node label5125 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID));
- label5125.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5125 = (Location) label5125.getLayoutConstraint();
- location5125.setX(0);
- location5125.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createDataStoreNode_3078(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DataStoreNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DataStoreNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataStoreNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DataStoreNode");
- Node label5127 = createLabel(node, UMLVisualIDRegistry.getType(DataStoreNodeLabelEditPart.VISUAL_ID));
- Node label5128 = createLabel(node, UMLVisualIDRegistry.getType(DataStoreSelectionEditPart.VISUAL_ID));
- label5128.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5128 = (Location) label5128.getLayoutConstraint();
- location5128.setX(0);
- location5128.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createConditionalNode_3069(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ConditionalNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ConditionalNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ConditionalNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ConditionalNode");
- Node label5119 = createLabel(node, UMLVisualIDRegistry.getType(ConditionalNodeKeywordEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ConditionalNode");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createExpansionRegion_3070(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ExpansionRegionEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ExpansionRegion");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExpansionRegion");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ExpansionRegion");
- Node label5120 = createLabel(node, UMLVisualIDRegistry.getType(ExpansionRegionKeywordEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ExpansionRegion");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createExpansionNode_3074(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ExpansionNodeAsInEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ExpansionNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExpansionNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ExpansionNode");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createExpansionNode_3075(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ExpansionNodeAsOutEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ExpansionNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExpansionNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ExpansionNode");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createLoopNode_3071(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(LoopNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "LoopNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LoopNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "LoopNode");
- Node label5121 = createLabel(node, UMLVisualIDRegistry.getType(LoopNodeKeywordEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "LoopNode");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createOutputPin_3109(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
- Node label5184 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID));
- label5184.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5184 = (Location) label5184.getLayoutConstraint();
- location5184.setX(0);
- location5184.setY(5);
- Node label5185 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID));
- label5185.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5185 = (Location) label5185.getLayoutConstraint();
- location5185.setX(0);
- location5185.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createOutputPin_3110(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
- Node label5186 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID));
- label5186.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5186 = (Location) label5186.getLayoutConstraint();
- location5186.setX(0);
- location5186.setY(5);
- Node label5183 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID));
- label5183.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5183 = (Location) label5183.getLayoutConstraint();
- location5183.setX(0);
- location5183.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createOutputPin_3111(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsResultEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
- Node label5187 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID));
- label5187.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5187 = (Location) label5187.getLayoutConstraint();
- location5187.setX(0);
- location5187.setY(5);
- Node label5188 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID));
- label5188.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5188 = (Location) label5188.getLayoutConstraint();
- location5188.setX(0);
- location5188.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createSequenceNode_3073(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(SequenceNodeEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "SequenceNode");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SequenceNode");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "SequenceNode");
- Node label5123 = createLabel(node, UMLVisualIDRegistry.getType(SequenceNodeKeywordEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "SequenceNode");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createIntervalConstraint_3032(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "IntervalConstraint");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "IntervalConstraint");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "IntervalConstraint");
- Node label5036 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID));
- Node label5134 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createIntervalConstraint_3033(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "IntervalConstraint");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "IntervalConstraint");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "IntervalConstraint");
- Node label5037 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID));
- Node label5135 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createDurationConstraint_3034(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DurationConstraintAsLocalPrecondEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DurationConstraint");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DurationConstraint");
- Node label5038 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID));
- Node label5130 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createDurationConstraint_3035(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DurationConstraintAsLocalPostcondEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DurationConstraint");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DurationConstraint");
- Node label5039 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID));
- Node label5131 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createTimeConstraint_3036(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(TimeConstraintAsLocalPrecondEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "TimeConstraint");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "TimeConstraint");
- Node label5040 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID));
- Node label5132 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createTimeConstraint_3037(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(TimeConstraintAsLocalPostcondEditPart.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "TimeConstraint");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint");
- PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "TimeConstraint");
- Node label5041 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID));
- Node label5133 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Edge createActionLocalPrecondition_4001(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Edge edge = NotationFactory.eINSTANCE.createEdge();
- edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle());
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(ActionLocalPreconditionEditPart.VISUAL_ID));
- edge.setElement(null);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined");
- // 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);
- // }
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined");
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createActionLocalPostcondition_4002(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Edge edge = NotationFactory.eINSTANCE.createEdge();
- edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle());
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(ActionLocalPostconditionEditPart.VISUAL_ID));
- edge.setElement(null);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined");
- // 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);
- // }
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined");
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createObjectFlow_4003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(ObjectFlowEditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "ObjectFlow");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ObjectFlow");
- // 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);
- // }
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "ObjectFlow");
- Node label6001 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowNameEditPart.VISUAL_ID));
- label6001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6001 = (Location) label6001.getLayoutConstraint();
- location6001.setX(0);
- location6001.setY(20);
- Node label6002 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowWeightEditPart.VISUAL_ID));
- label6002.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6002 = (Location) label6002.getLayoutConstraint();
- location6002.setX(0);
- location6002.setY(20);
- Node label6005 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowSelectionEditPart.VISUAL_ID));
- label6005.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6005 = (Location) label6005.getLayoutConstraint();
- location6005.setX(20);
- location6005.setY(40);
- Node label6006 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowTransformationEditPart.VISUAL_ID));
- label6006.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6006 = (Location) label6006.getLayoutConstraint();
- location6006.setX(-20);
- location6006.setY(-60);
- Node label6007 = createLabel(edge, UMLVisualIDRegistry.getType(DecisionInputFlowEditPart.VISUAL_ID));
- label6007.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6007 = (Location) label6007.getLayoutConstraint();
- location6007.setX(0);
- location6007.setY(-20);
- Node label6008 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowGuardEditPart.VISUAL_ID));
- label6008.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6008 = (Location) label6008.getLayoutConstraint();
- location6008.setX(0);
- location6008.setY(20);
- Node label6010 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowAppliedStereotypeEditPart.VISUAL_ID));
- label6010.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6010 = (Location) label6010.getLayoutConstraint();
- location6010.setX(0);
- location6010.setY(-20);
- Node label6014 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowInterruptibleIconEditPart.VISUAL_ID));
- label6014.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "ObjectFlow");
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createControlFlow_4004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(ControlFlowEditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "ControlFlow");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ControlFlow");
- // 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);
- // }
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "ControlFlow");
- Node label6003 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowNameEditPart.VISUAL_ID));
- label6003.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6003 = (Location) label6003.getLayoutConstraint();
- location6003.setX(0);
- location6003.setY(20);
- Node label6004 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowWeightEditPart.VISUAL_ID));
- label6004.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6004 = (Location) label6004.getLayoutConstraint();
- location6004.setX(0);
- location6004.setY(20);
- Node label6009 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowGuardEditPart.VISUAL_ID));
- label6009.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6009 = (Location) label6009.getLayoutConstraint();
- location6009.setX(0);
- location6009.setY(20);
- Node label6011 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowAppliedStereotypeEditPart.VISUAL_ID));
- label6011.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6011 = (Location) label6011.getLayoutConstraint();
- location6011.setX(0);
- location6011.setY(-20);
- Node label6013 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowInterruptibleIconEditPart.VISUAL_ID));
- label6013.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "ControlFlow");
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createExceptionHandler_4005(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(ExceptionHandlerEditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "ExceptionHandler");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ExceptionHandler");
- // 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);
- // }
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "ExceptionHandler");
- Node label6012 = createLabel(edge, UMLVisualIDRegistry.getType(ExceptionHandlerTypeEditPart.VISUAL_ID));
- label6012.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6012 = (Location) label6012.getLayoutConstraint();
- location6012.setX(0);
- location6012.setY(40);
- Node label6015 = createLabel(edge, UMLVisualIDRegistry.getType(ExceptionHandlerIconEditPart.VISUAL_ID));
- label6015.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createCommentAnnotatedElement_4006(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(CommentLinkEditPart.VISUAL_ID));
- edge.setElement(null);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Undefined");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined");
- // 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);
- // }
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined");
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createConstraintConstrainedElement_4007(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- edge.setElement(null);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Undefined");
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined");
- // 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);
- // }
- PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined");
- return edge;
- }
-
- /**
- * @generated
- */
- protected void stampShortcut(View containerView, Node target) {
- if (!ActivityDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) {
- EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
- shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
- shortcutAnnotation.getDetails().put("modelID", ActivityDiagramEditPart.MODEL_ID); //$NON-NLS-1$
- target.getEAnnotations().add(shortcutAnnotation);
- }
- }
-
- /**
- * @generated
- */
- protected Node createLabel(View owner, String hint) {
- DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode();
- rv.setType(hint);
- ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
- return rv;
- }
-
- /**
- * @generated
- */
- protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) {
- // SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
- // rv.setShowTitle(showTitle);
- // rv.setCollapsed(isCollapsed);
- Node rv;
- if (canCollapse) {
- rv = NotationFactory.eINSTANCE.createBasicCompartment();
- } else {
- rv = NotationFactory.eINSTANCE.createDecorationNode();
- }
- rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- if (hasTitle) {
- TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle();
- rv.getStyles().add(ts);
- }
- if (canSort) {
- rv.getStyles().add(NotationFactory.eINSTANCE.createSortingStyle());
- }
- if (canFilter) {
- rv.getStyles().add(NotationFactory.eINSTANCE.createFilteringStyle());
- }
- rv.setType(hint);
- ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
- return rv;
- }
-
- /**
- * @generated
- */
- protected EObject getSemanticElement(IAdaptable semanticAdapter) {
- if (semanticAdapter == null) {
- return null;
- }
- EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
- if (eObject != null) {
- return EMFCoreUtil.resolve(TransactionUtil.getEditingDomain(eObject), eObject);
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected IElementType getSemanticElementType(IAdaptable semanticAdapter) {
- if (semanticAdapter == null) {
- return null;
- }
- return (IElementType) semanticAdapter.getAdapter(IElementType.class);
- }
-
- /**
- * @generated
- */
- 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);
- viewFontStyle.setFontName(fontData.getName());
- 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());
- }
- }
-
- /**
- * @generated
- */
- private void initForegroundFromPrefs(View view, final IPreferenceStore store, String elementName) {
- String lineColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_LINE);
- org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(store, lineColorConstant);
- ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB));
- }
-
- /**
- * @generated
- */
- private void initBackgroundFromPrefs(View view, final IPreferenceStore store, String elementName) {
- 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());
- ;
- if (store.getBoolean(gradientPolicyConstant)) {
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(store.getString(gradientColorConstant));
- fillStyle.setGradient(gradientPreferenceConverter.getGradientData());
- fillStyle.setTransparency(gradientPreferenceConverter.getTransparency());
- }
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.providers;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.providers.IViewProvider;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.notation.Bounds;
+import org.eclipse.gmf.runtime.notation.Connector;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.FillStyle;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.MeasurementUnit;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.RelativeBendpoints;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.TitleStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.activity.edit.parts.*;
+import org.eclipse.papyrus.uml.diagram.activity.locator.PinPositionLocator;
+import org.eclipse.papyrus.uml.diagram.activity.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.uml2.uml.ActionInputPin;
+import org.eclipse.uml2.uml.CallBehaviorAction;
+import org.eclipse.uml2.uml.CallOperationAction;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.OpaqueAction;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.ValuePin;
+
+/**
+ * @generated
+ */
+public class UMLViewProvider extends AbstractProvider implements IViewProvider {
+
+ /**
+ * @generated
+ */
+ @Override
+ public final boolean provides(IOperation operation) {
+ if (operation instanceof CreateViewForKindOperation) {
+ return provides((CreateViewForKindOperation) operation);
+ }
+ assert operation instanceof CreateViewOperation;
+ if (operation instanceof CreateDiagramViewOperation) {
+ return provides((CreateDiagramViewOperation) operation);
+ } else if (operation instanceof CreateEdgeViewOperation) {
+ return provides((CreateEdgeViewOperation) operation);
+ } else if (operation instanceof CreateNodeViewOperation) {
+ return provides((CreateNodeViewOperation) operation);
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean provides(CreateViewForKindOperation op) {
+ /*
+ * if (op.getViewKind() == Node.class)
+ * return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ * 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;
+ }
+
+ /**
+ * Indicates for which diagram this provider works for.
+ * <p>
+ * This method can be overloaded when diagram editor inherits from another one
+ * </p>
+ *
+ * @return the unique identifier of the diagram for which views are provided.
+ */
+ protected String getDiagramProvidedId() {
+ return ActivityDiagramEditPart.MODEL_ID;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean provides(CreateDiagramViewOperation op) {
+ return ActivityDiagramEditPart.MODEL_ID.equals(op.getSemanticHint()) && UMLVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())) != -1;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean provides(CreateNodeViewOperation op) {
+ if (op.getContainerView() == null) {
+ return false;
+ }
+ IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
+ EObject domainElement = getSemanticElement(op.getSemanticAdapter());
+ int visualID;
+ if (op.getSemanticHint() == null) {
+ // Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
+ // In this situation there should be NO elementType, visualID will be determined
+ // by VisualIDRegistry.getNodeVisualID() for domainElement.
+ if (elementType != null || domainElement == null) {
+ return false;
+ }
+ visualID = UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement);
+ } else {
+ visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint());
+ if (elementType != null) {
+ if (elementType instanceof IExtendedHintedElementType) {
+ IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType);
+ if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) {
+ return false; // foreign element type.
+ }
+ } else {
+ if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
+ return false; // foreign element type
+ }
+ }
+ String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
+ if (!op.getSemanticHint().equals(elementTypeHint)) {
+ return false; // if semantic hint is specified it should be the same as in element type
+ }
+ if (domainElement != null && visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
+ return false; // visual id for node EClass should match visual id from element type
+ }
+ } else {
+ if (!ActivityDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(op.getContainerView()))) {
+ return false; // foreign diagram
+ }
+ switch (visualID) {
+ case ActivityEditPart.VISUAL_ID:
+ case ParameterEditPart.VISUAL_ID:
+ case ConstraintInActivityAsPrecondEditPart.VISUAL_ID:
+ case ConstraintInActivityAsPostcondEditPart.VISUAL_ID:
+ case InitialNodeEditPart.VISUAL_ID:
+ case ActivityFinalNodeEditPart.VISUAL_ID:
+ case FlowFinalNodeEditPart.VISUAL_ID:
+ case OpaqueActionEditPart.VISUAL_ID:
+ case ValuePinInOpaqueActEditPart.VISUAL_ID:
+ case ActionInputPinInOpaqueActEditPart.VISUAL_ID:
+ case InputPinInOpaqueActEditPart.VISUAL_ID:
+ case OutputPinInOpaqueActEditPart.VISUAL_ID:
+ case CallBehaviorActionEditPart.VISUAL_ID:
+ case ValuePinInCallBeActEditPart.VISUAL_ID:
+ case ActionInputPinInCallBeActEditPart.VISUAL_ID:
+ case InputPinInCallBeActEditPart.VISUAL_ID:
+ case OutputPinInCallBeActEditPart.VISUAL_ID:
+ case CallOperationActionEditPart.VISUAL_ID:
+ case ActionInputPinInCallOpActEditPart.VISUAL_ID:
+ case ValuePinInCallOpActEditPart.VISUAL_ID:
+ case InputPinInCallOpActEditPart.VISUAL_ID:
+ case OutputPinInCallOpActEditPart.VISUAL_ID:
+ case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID:
+ case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID:
+ case InputPinInCallOpActAsTargetEditPart.VISUAL_ID:
+ case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ case ConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ case ConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ case DecisionNodeEditPart.VISUAL_ID:
+ case MergeNodeEditPart.VISUAL_ID:
+ case ForkNodeEditPart.VISUAL_ID:
+ case JoinNodeEditPart.VISUAL_ID:
+ case DataStoreNodeEditPart.VISUAL_ID:
+ case SendObjectActionEditPart.VISUAL_ID:
+ case ValuePinInSendObjActAsReqEditPart.VISUAL_ID:
+ case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID:
+ case InputPinInSendObjActAsReqEditPart.VISUAL_ID:
+ case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID:
+ case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID:
+ case InputPinInSendObjActAsTargetEditPart.VISUAL_ID:
+ case SendSignalActionEditPart.VISUAL_ID:
+ case ActionInputPinInSendSigActEditPart.VISUAL_ID:
+ case ValuePinInSendSigActEditPart.VISUAL_ID:
+ case InputPinInSendSigActEditPart.VISUAL_ID:
+ case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID:
+ case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID:
+ case InputPinInSendSigActAsTargetEditPart.VISUAL_ID:
+ case ActivityParameterNodeEditPart.VISUAL_ID:
+ case AcceptEventActionEditPart.VISUAL_ID:
+ case OutputPinInAcceptEventActionEditPart.VISUAL_ID:
+ case ValueSpecificationActionEditPart.VISUAL_ID:
+ case OutputPinInValSpecActEditPart.VISUAL_ID:
+ case ConditionalNodeEditPart.VISUAL_ID:
+ case ExpansionRegionEditPart.VISUAL_ID:
+ case ExpansionNodeAsInEditPart.VISUAL_ID:
+ case ExpansionNodeAsOutEditPart.VISUAL_ID:
+ case LoopNodeEditPart.VISUAL_ID:
+ case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID:
+ case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID:
+ case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID:
+ case SequenceNodeEditPart.VISUAL_ID:
+ case StructuredActivityNodeEditPart.VISUAL_ID:
+ case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID:
+ case ActivityPartitionEditPart.VISUAL_ID:
+ case InterruptibleActivityRegionEditPart.VISUAL_ID:
+ case CommentEditPartCN.VISUAL_ID:
+ case ReadSelfActionEditPart.VISUAL_ID:
+ case ReadSelfActionOutputPinEditPart.VISUAL_ID:
+ case ActivityEditPartCN.VISUAL_ID:
+ case CreateObjectActionEditPart.VISUAL_ID:
+ case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID:
+ case ShapeNamedElementEditPart.VISUAL_ID:
+ case ReadStructuralFeatureActionEditPart.VISUAL_ID:
+ case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID:
+ case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID:
+ case AddStructuralFeatureValueActionEditPart.VISUAL_ID:
+ case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID:
+ case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID:
+ case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID:
+ case DestroyObjectActionEditPart.VISUAL_ID:
+ case InputPinInDestroyObjectActionEditPart.VISUAL_ID:
+ case ReadVariableActionEditPart.VISUAL_ID:
+ case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID:
+ case AddVariableValueActionEditPart.VISUAL_ID:
+ case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID:
+ case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID:
+ case BroadcastSignalActionEditPart.VISUAL_ID:
+ case InputPinInBroadcastSignalActionEditPart.VISUAL_ID:
+ case CentralBufferNodeEditPart.VISUAL_ID:
+ case ConstraintEditPartCN.VISUAL_ID:
+ if (domainElement == null || visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
+ return false; // visual id in semantic hint should match visual id for domain element
+ }
+ break;
+ default:
+ return false;
+ }
+ }
+ }
+ return UMLVisualIDRegistry.canCreateNode(op.getContainerView(), visualID);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean provides(CreateEdgeViewOperation op) {
+ IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
+ // RS: add code for extended types creation
+ if (elementType instanceof IExtendedHintedElementType) {
+ IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType);
+ if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) {
+ return false; // foreign element type.
+ }
+ } else {
+ if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
+ return false; // foreign element type
+ }
+ }
+ // if (!org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
+ // return false; // foreign element type
+ // }
+ // END R.S.
+ String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
+ if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) {
+ return false; // our hint is visual id and must be specified, and it should be the same as in element type
+ }
+ int visualID = UMLVisualIDRegistry.getVisualID(elementTypeHint);
+ EObject domainElement = getSemanticElement(op.getSemanticAdapter());
+ if (domainElement != null && visualID != UMLVisualIDRegistry.getLinkWithClassVisualID(domainElement)) {
+ return false; // visual id for link EClass should match visual id from element type
+ }
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Diagram createDiagram(IAdaptable semanticAdapter, String diagramKind, PreferencesHint preferencesHint) {
+ Diagram diagram = NotationFactory.eINSTANCE.createDiagram();
+ DiagramVersioningUtils.stampCurrentVersion(diagram);
+ diagram.getStyles().add(NotationFactory.eINSTANCE.createDiagramStyle());
+ diagram.setType(ActivityDiagramEditPart.MODEL_ID);
+ diagram.setElement(getSemanticElement(semanticAdapter));
+ diagram.setMeasurementUnit(MeasurementUnit.PIXEL_LITERAL);
+ return diagram;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ final EObject domainElement = getSemanticElement(semanticAdapter);
+ final int visualID;
+ if (semanticHint == null) {
+ visualID = UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
+ } else {
+ visualID = UMLVisualIDRegistry.getVisualID(semanticHint);
+ }
+ switch (visualID) {
+ case ActivityEditPart.VISUAL_ID:
+ return createActivity_2001(domainElement, containerView, index, persisted, preferencesHint);
+ case ParameterEditPart.VISUAL_ID:
+ return createParameter_3001(domainElement, containerView, index, persisted, preferencesHint);
+ case ConstraintInActivityAsPrecondEditPart.VISUAL_ID:
+ return createConstraint_3002(domainElement, containerView, index, persisted, preferencesHint);
+ case ConstraintInActivityAsPostcondEditPart.VISUAL_ID:
+ return createConstraint_3003(domainElement, containerView, index, persisted, preferencesHint);
+ case InitialNodeEditPart.VISUAL_ID:
+ return createInitialNode_3004(domainElement, containerView, index, persisted, preferencesHint);
+ case ActivityFinalNodeEditPart.VISUAL_ID:
+ return createActivityFinalNode_3005(domainElement, containerView, index, persisted, preferencesHint);
+ case FlowFinalNodeEditPart.VISUAL_ID:
+ return createFlowFinalNode_3006(domainElement, containerView, index, persisted, preferencesHint);
+ case OpaqueActionEditPart.VISUAL_ID:
+ return createOpaqueAction_3007(domainElement, containerView, index, persisted, preferencesHint);
+ case ValuePinInOpaqueActEditPart.VISUAL_ID:
+ return createValuePin_3015(domainElement, containerView, index, persisted, preferencesHint);
+ case ActionInputPinInOpaqueActEditPart.VISUAL_ID:
+ return createActionInputPin_3016(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInOpaqueActEditPart.VISUAL_ID:
+ return createInputPin_3013(domainElement, containerView, index, persisted, preferencesHint);
+ case OutputPinInOpaqueActEditPart.VISUAL_ID:
+ return createOutputPin_3014(domainElement, containerView, index, persisted, preferencesHint);
+ case CallBehaviorActionEditPart.VISUAL_ID:
+ return createCallBehaviorAction_3008(domainElement, containerView, index, persisted, preferencesHint);
+ case ValuePinInCallBeActEditPart.VISUAL_ID:
+ return createValuePin_3017(domainElement, containerView, index, persisted, preferencesHint);
+ case ActionInputPinInCallBeActEditPart.VISUAL_ID:
+ return createActionInputPin_3018(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInCallBeActEditPart.VISUAL_ID:
+ return createInputPin_3019(domainElement, containerView, index, persisted, preferencesHint);
+ case OutputPinInCallBeActEditPart.VISUAL_ID:
+ return createOutputPin_3020(domainElement, containerView, index, persisted, preferencesHint);
+ case CallOperationActionEditPart.VISUAL_ID:
+ return createCallOperationAction_3010(domainElement, containerView, index, persisted, preferencesHint);
+ case ActionInputPinInCallOpActEditPart.VISUAL_ID:
+ return createActionInputPin_3021(domainElement, containerView, index, persisted, preferencesHint);
+ case ValuePinInCallOpActEditPart.VISUAL_ID:
+ return createValuePin_3022(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInCallOpActEditPart.VISUAL_ID:
+ return createInputPin_3023(domainElement, containerView, index, persisted, preferencesHint);
+ case OutputPinInCallOpActEditPart.VISUAL_ID:
+ return createOutputPin_3024(domainElement, containerView, index, persisted, preferencesHint);
+ case ValuePinInCallOpActAsTargetEditPart.VISUAL_ID:
+ return createValuePin_3025(domainElement, containerView, index, persisted, preferencesHint);
+ case ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID:
+ return createActionInputPin_3026(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInCallOpActAsTargetEditPart.VISUAL_ID:
+ return createInputPin_3027(domainElement, containerView, index, persisted, preferencesHint);
+ case DurationConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ return createDurationConstraint_3034(domainElement, containerView, index, persisted, preferencesHint);
+ case DurationConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ return createDurationConstraint_3035(domainElement, containerView, index, persisted, preferencesHint);
+ case TimeConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ return createTimeConstraint_3036(domainElement, containerView, index, persisted, preferencesHint);
+ case TimeConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ return createTimeConstraint_3037(domainElement, containerView, index, persisted, preferencesHint);
+ case IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ return createIntervalConstraint_3032(domainElement, containerView, index, persisted, preferencesHint);
+ case IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ return createIntervalConstraint_3033(domainElement, containerView, index, persisted, preferencesHint);
+ case ConstraintAsLocalPrecondEditPart.VISUAL_ID:
+ return createConstraint_3011(domainElement, containerView, index, persisted, preferencesHint);
+ case ConstraintAsLocalPostcondEditPart.VISUAL_ID:
+ return createConstraint_3012(domainElement, containerView, index, persisted, preferencesHint);
+ case DecisionNodeEditPart.VISUAL_ID:
+ return createDecisionNode_3038(domainElement, containerView, index, persisted, preferencesHint);
+ case MergeNodeEditPart.VISUAL_ID:
+ return createMergeNode_3039(domainElement, containerView, index, persisted, preferencesHint);
+ case ForkNodeEditPart.VISUAL_ID:
+ return createForkNode_3040(domainElement, containerView, index, persisted, preferencesHint);
+ case JoinNodeEditPart.VISUAL_ID:
+ return createJoinNode_3041(domainElement, containerView, index, persisted, preferencesHint);
+ case DataStoreNodeEditPart.VISUAL_ID:
+ return createDataStoreNode_3078(domainElement, containerView, index, persisted, preferencesHint);
+ case SendObjectActionEditPart.VISUAL_ID:
+ return createSendObjectAction_3042(domainElement, containerView, index, persisted, preferencesHint);
+ case ValuePinInSendObjActAsReqEditPart.VISUAL_ID:
+ return createValuePin_3046(domainElement, containerView, index, persisted, preferencesHint);
+ case ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID:
+ return createActionInputPin_3047(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInSendObjActAsReqEditPart.VISUAL_ID:
+ return createInputPin_3048(domainElement, containerView, index, persisted, preferencesHint);
+ case ValuePinInSendObjActAsTargetEditPart.VISUAL_ID:
+ return createValuePin_3049(domainElement, containerView, index, persisted, preferencesHint);
+ case ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID:
+ return createActionInputPin_3050(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInSendObjActAsTargetEditPart.VISUAL_ID:
+ return createInputPin_3051(domainElement, containerView, index, persisted, preferencesHint);
+ case SendSignalActionEditPart.VISUAL_ID:
+ return createSendSignalAction_3052(domainElement, containerView, index, persisted, preferencesHint);
+ case ActionInputPinInSendSigActEditPart.VISUAL_ID:
+ return createActionInputPin_3053(domainElement, containerView, index, persisted, preferencesHint);
+ case ValuePinInSendSigActEditPart.VISUAL_ID:
+ return createValuePin_3054(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInSendSigActEditPart.VISUAL_ID:
+ return createInputPin_3055(domainElement, containerView, index, persisted, preferencesHint);
+ case ValuePinInSendSigActAsTargetEditPart.VISUAL_ID:
+ return createValuePin_3060(domainElement, containerView, index, persisted, preferencesHint);
+ case ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID:
+ return createActionInputPin_3061(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInSendSigActAsTargetEditPart.VISUAL_ID:
+ return createInputPin_3062(domainElement, containerView, index, persisted, preferencesHint);
+ case ActivityParameterNodeEditPart.VISUAL_ID:
+ return createActivityParameterNode_3059(domainElement, containerView, index, persisted, preferencesHint);
+ case AcceptEventActionEditPart.VISUAL_ID:
+ return createAcceptEventAction_3063(domainElement, containerView, index, persisted, preferencesHint);
+ case OutputPinInAcceptEventActionEditPart.VISUAL_ID:
+ return createOutputPin_3064(domainElement, containerView, index, persisted, preferencesHint);
+ case ValueSpecificationActionEditPart.VISUAL_ID:
+ return createValueSpecificationAction_3076(domainElement, containerView, index, persisted, preferencesHint);
+ case OutputPinInValSpecActEditPart.VISUAL_ID:
+ return createOutputPin_3077(domainElement, containerView, index, persisted, preferencesHint);
+ case ConditionalNodeEditPart.VISUAL_ID:
+ return createConditionalNode_3069(domainElement, containerView, index, persisted, preferencesHint);
+ case ExpansionRegionEditPart.VISUAL_ID:
+ return createExpansionRegion_3070(domainElement, containerView, index, persisted, preferencesHint);
+ case ExpansionNodeAsInEditPart.VISUAL_ID:
+ return createExpansionNode_3074(domainElement, containerView, index, persisted, preferencesHint);
+ case ExpansionNodeAsOutEditPart.VISUAL_ID:
+ return createExpansionNode_3075(domainElement, containerView, index, persisted, preferencesHint);
+ case LoopNodeEditPart.VISUAL_ID:
+ return createLoopNode_3071(domainElement, containerView, index, persisted, preferencesHint);
+ case OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID:
+ return createOutputPin_3109(domainElement, containerView, index, persisted, preferencesHint);
+ case OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID:
+ return createOutputPin_3110(domainElement, containerView, index, persisted, preferencesHint);
+ case OutputPinInLoopNodeAsResultEditPart.VISUAL_ID:
+ return createOutputPin_3111(domainElement, containerView, index, persisted, preferencesHint);
+ case SequenceNodeEditPart.VISUAL_ID:
+ return createSequenceNode_3073(domainElement, containerView, index, persisted, preferencesHint);
+ case StructuredActivityNodeEditPart.VISUAL_ID:
+ return createStructuredActivityNode_3065(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInLoopNodeAsVariableEditPart.VISUAL_ID:
+ return createInputPin_3105(domainElement, containerView, index, persisted, preferencesHint);
+ case ActivityPartitionEditPart.VISUAL_ID:
+ return createActivityPartition_3067(domainElement, containerView, index, persisted, preferencesHint);
+ case InterruptibleActivityRegionEditPart.VISUAL_ID:
+ return createInterruptibleActivityRegion_3068(domainElement, containerView, index, persisted, preferencesHint);
+ case CommentEditPartCN.VISUAL_ID:
+ return createComment_3080(domainElement, containerView, index, persisted, preferencesHint);
+ case ReadSelfActionEditPart.VISUAL_ID:
+ return createReadSelfAction_3081(domainElement, containerView, index, persisted, preferencesHint);
+ case ReadSelfActionOutputPinEditPart.VISUAL_ID:
+ return createOutputPin_3084(domainElement, containerView, index, persisted, preferencesHint);
+ case ActivityEditPartCN.VISUAL_ID:
+ return createActivity_3083(domainElement, containerView, index, persisted, preferencesHint);
+ case CreateObjectActionEditPart.VISUAL_ID:
+ return createCreateObjectAction_3086(domainElement, containerView, index, persisted, preferencesHint);
+ case OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID:
+ return createOutputPin_3087(domainElement, containerView, index, persisted, preferencesHint);
+ case ShapeNamedElementEditPart.VISUAL_ID:
+ return createNamedElement_3085(domainElement, containerView, index, persisted, preferencesHint);
+ case ReadStructuralFeatureActionEditPart.VISUAL_ID:
+ return createReadStructuralFeatureAction_3088(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID:
+ return createInputPin_3089(domainElement, containerView, index, persisted, preferencesHint);
+ case OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID:
+ return createOutputPin_3090(domainElement, containerView, index, persisted, preferencesHint);
+ case AddStructuralFeatureValueActionEditPart.VISUAL_ID:
+ return createAddStructuralFeatureValueAction_3091(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID:
+ return createInputPin_3092(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID:
+ return createInputPin_3093(domainElement, containerView, index, persisted, preferencesHint);
+ case OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID:
+ return createOutputPin_3094(domainElement, containerView, index, persisted, preferencesHint);
+ case DestroyObjectActionEditPart.VISUAL_ID:
+ return createDestroyObjectAction_3095(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInDestroyObjectActionEditPart.VISUAL_ID:
+ return createInputPin_3096(domainElement, containerView, index, persisted, preferencesHint);
+ case ReadVariableActionEditPart.VISUAL_ID:
+ return createReadVariableAction_3097(domainElement, containerView, index, persisted, preferencesHint);
+ case OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID:
+ return createOutputPin_3098(domainElement, containerView, index, persisted, preferencesHint);
+ case AddVariableValueActionEditPart.VISUAL_ID:
+ return createAddVariableValueAction_3099(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID:
+ return createInputPin_3100(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID:
+ return createInputPin_3101(domainElement, containerView, index, persisted, preferencesHint);
+ case BroadcastSignalActionEditPart.VISUAL_ID:
+ return createBroadcastSignalAction_3102(domainElement, containerView, index, persisted, preferencesHint);
+ case InputPinInBroadcastSignalActionEditPart.VISUAL_ID:
+ return createInputPin_3103(domainElement, containerView, index, persisted, preferencesHint);
+ case CentralBufferNodeEditPart.VISUAL_ID:
+ return createCentralBufferNode_3104(domainElement, containerView, index, persisted, preferencesHint);
+ case ConstraintEditPartCN.VISUAL_ID:
+ return createConstraint_3112(domainElement, containerView, index, persisted, preferencesHint);
+ }
+ // can't happen, provided #provides(CreateNodeViewOperation) is correct
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ IElementType elementType = getSemanticElementType(semanticAdapter);
+ String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
+ switch (UMLVisualIDRegistry.getVisualID(elementTypeHint)) {
+ case ActionLocalPreconditionEditPart.VISUAL_ID:
+ return createActionLocalPrecondition_4001(containerView, index, persisted, preferencesHint);
+ case ActionLocalPostconditionEditPart.VISUAL_ID:
+ return createActionLocalPostcondition_4002(containerView, index, persisted, preferencesHint);
+ case ObjectFlowEditPart.VISUAL_ID:
+ return createObjectFlow_4003(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
+ case ControlFlowEditPart.VISUAL_ID:
+ return createControlFlow_4004(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
+ case ExceptionHandlerEditPart.VISUAL_ID:
+ return createExceptionHandler_4005(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
+ case CommentLinkEditPart.VISUAL_ID:
+ return createCommentAnnotatedElement_4006(containerView, index, persisted, preferencesHint);
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return createConstraintConstrainedElement_4007(containerView, index, persisted, preferencesHint);
+ }
+ // can never happen, provided #provides(CreateEdgeViewOperation) is correct
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createActivity_2001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ActivityEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ stampShortcut(containerView, node);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Activity");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Activity");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Activity");
+ Node label5001 = createLabel(node, UMLVisualIDRegistry.getType(ActivityNameEditPart.VISUAL_ID));
+ Node label5002 = createLabel(node, UMLVisualIDRegistry.getType(ActivityIsSingleExecutionEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityParametersCompartmentEditPart.VISUAL_ID), false, false, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityPreConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityPostConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ActivityActivityContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Activity");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createParameter_3001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Node node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ node.setType(UMLVisualIDRegistry.getType(ParameterEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Parameter");
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Parameter");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createConstraint_3002(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Node node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ node.setType(UMLVisualIDRegistry.getType(ConstraintInActivityAsPrecondEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createConstraint_3003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Node node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ node.setType(UMLVisualIDRegistry.getType(ConstraintInActivityAsPostcondEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInitialNode_3004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InitialNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InitialNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InitialNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InitialNode");
+ Node label5080 = createLabel(node, UMLVisualIDRegistry.getType(InitialNodeAppliedStereotypeEditPart.VISUAL_ID));
+ label5080.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5080 = (Location) label5080.getLayoutConstraint();
+ location5080.setX(0);
+ location5080.setY(5);
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6034 = createLabel(node, UMLVisualIDRegistry.getType(InitialNodeFloatingNameEditPart.VISUAL_ID));
+ label6034.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6034 = (Location) label6034.getLayoutConstraint();
+ location6034.setX(0);
+ location6034.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createActivityFinalNode_3005(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ActivityFinalNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActivityFinalNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActivityFinalNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActivityFinalNode");
+ Node label5081 = createLabel(node, UMLVisualIDRegistry.getType(ActivityFinalNodeAppliedStereotypeEditPart.VISUAL_ID));
+ label5081.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5081 = (Location) label5081.getLayoutConstraint();
+ location5081.setX(0);
+ location5081.setY(5);
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6033 = createLabel(node, UMLVisualIDRegistry.getType(ActivityFinalNodeFloatingNameEditPart.VISUAL_ID));
+ label6033.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6033 = (Location) label6033.getLayoutConstraint();
+ location6033.setX(0);
+ location6033.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createFlowFinalNode_3006(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(FlowFinalNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "FlowFinalNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "FlowFinalNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "FlowFinalNode");
+ Node label5082 = createLabel(node, UMLVisualIDRegistry.getType(FlowFinalNodeAppliedStereotypeEditPart.VISUAL_ID));
+ label5082.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5082 = (Location) label5082.getLayoutConstraint();
+ location5082.setX(0);
+ location5082.setY(5);
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6035 = createLabel(node, UMLVisualIDRegistry.getType(FlowFinalNodeFloatingNameEditPart.VISUAL_ID));
+ label6035.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6035 = (Location) label6035.getLayoutConstraint();
+ location6035.setX(0);
+ location6035.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated NOT addition of pins initialization and height adaptation to pins
+ */
+ public Node createOpaqueAction_3007(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ // adapt the height to contained pins
+ Bounds boundsConstraint = NotationFactory.eINSTANCE.createBounds();
+ PinPositionLocator.adaptActionHeight(boundsConstraint, domainElement);
+ node.setLayoutConstraint(boundsConstraint);
+ node.setType(UMLVisualIDRegistry.getType(OpaqueActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OpaqueAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OpaqueAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OpaqueAction");
+ Node label5003 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueActionNameEditPart.VISUAL_ID));
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6028 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueActionFloatingNameEditPart.VISUAL_ID));
+ label6028.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6028 = (Location) label6028.getLayoutConstraint();
+ location6028.setX(0);
+ location6028.setY(5);
+
+ // Add pins
+ createPins(domainElement, node, persisted, preferencesHint);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createValuePin_3015(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ValuePinInOpaqueActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
+ Node label5011 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInOActLabelEditPart.VISUAL_ID));
+ label5011.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5011 = (Location) label5011.getLayoutConstraint();
+ location5011.setX(0);
+ location5011.setY(5);
+ Node label5024 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInOActValueEditPart.VISUAL_ID));
+ label5024.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5024 = (Location) label5024.getLayoutConstraint();
+ location5024.setX(0);
+ location5024.setY(5);
+ Node label5083 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInOActAppliedStereotypeEditPart.VISUAL_ID));
+ label5083.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5083 = (Location) label5083.getLayoutConstraint();
+ location5083.setX(0);
+ location5083.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createActionInputPin_3016(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ActionInputPinInOpaqueActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
+ Node label5012 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInOActLabelEditPart.VISUAL_ID));
+ label5012.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5012 = (Location) label5012.getLayoutConstraint();
+ location5012.setX(0);
+ location5012.setY(5);
+ Node label5025 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInOActValueEditPart.VISUAL_ID));
+ label5025.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5025 = (Location) label5025.getLayoutConstraint();
+ location5025.setX(0);
+ location5025.setY(5);
+ Node label5084 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInOActAppliedStereotypeEditPart.VISUAL_ID));
+ label5084.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5084 = (Location) label5084.getLayoutConstraint();
+ location5084.setX(0);
+ location5084.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3013(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInOpaqueActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5009 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInOActLabelEditPart.VISUAL_ID));
+ label5009.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5009 = (Location) label5009.getLayoutConstraint();
+ location5009.setX(0);
+ location5009.setY(5);
+ Node label5085 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInOActAppliedStereotypeEditPart.VISUAL_ID));
+ label5085.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5085 = (Location) label5085.getLayoutConstraint();
+ location5085.setX(0);
+ location5085.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createOutputPin_3014(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(OutputPinInOpaqueActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
+ Node label5010 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInOActLabelEditPart.VISUAL_ID));
+ label5010.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5010 = (Location) label5010.getLayoutConstraint();
+ location5010.setX(0);
+ location5010.setY(5);
+ Node label5086 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInOActAppliedStereotypeEditPart.VISUAL_ID));
+ label5086.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5086 = (Location) label5086.getLayoutConstraint();
+ location5086.setX(0);
+ location5086.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated NOT addition of pins initialization and height adaptation to pins
+ */
+ public Node createCallBehaviorAction_3008(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ // adapt the height to contained pins
+ Bounds boundsConstraint = NotationFactory.eINSTANCE.createBounds();
+ PinPositionLocator.adaptActionHeight(boundsConstraint, domainElement);
+ node.setLayoutConstraint(boundsConstraint);
+ node.setType(UMLVisualIDRegistry.getType(CallBehaviorActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CallBehaviorAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CallBehaviorAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CallBehaviorAction");
+ Node label5004 = createLabel(node, UMLVisualIDRegistry.getType(CallBehaviorActionNameEditPart.VISUAL_ID));
+
+ // not generated but change include on gmfgen, can be override at the generation
+ Node label6020 = createLabel(node, UMLVisualIDRegistry.getType(CallBehaviorActionFloatingNameEditPart.VISUAL_ID));
+ label6020.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6020 = (Location) label6020.getLayoutConstraint();
+ location6020.setX(0);
+ location6020.setY(5);
+
+ // Add pins
+ createPins(domainElement, node, persisted, preferencesHint);
+ return node;
+ }
+
+ /**
+ * Create pins in an action's node
+ *
+ * @param domainElement
+ * the model action
+ * @param node
+ * the action node
+ * @param persisted
+ * the persisted property of views to create
+ * @param preferencesHint
+ * the preference hint
+ * @generated NOT
+ */
+ private void createPins(EObject domainElement, Shape node, boolean persisted, PreferencesHint preferencesHint) {
+ if (domainElement instanceof OpaqueAction) {
+ // pins of an opaque action : input values and output values
+ int index = 0;
+ for (InputPin pin : ((OpaqueAction) domainElement).getInputValues()) {
+ if (pin instanceof ValuePin) {
+ createValuePin_3015(pin, node, index, persisted, preferencesHint);
+ } else if (pin instanceof ActionInputPin) {
+ createActionInputPin_3016(pin, node, index, persisted, preferencesHint);
+ } else {
+ createInputPin_3013(pin, node, index, persisted, preferencesHint);
+ }
+ index++;
+ }
+ index = 0;
+ for (OutputPin pin : ((OpaqueAction) domainElement).getOutputValues()) {
+ createOutputPin_3014(pin, node, index, persisted, preferencesHint);
+ }
+ } else if (domainElement instanceof CallBehaviorAction) {
+ // pins of a call behavior action : arguments and results
+ int index = 0;
+ for (InputPin pin : ((CallBehaviorAction) domainElement).getArguments()) {
+ if (pin instanceof ValuePin) {
+ createValuePin_3017(pin, node, index, persisted, preferencesHint);
+ } else if (pin instanceof ActionInputPin) {
+ createActionInputPin_3018(pin, node, index, persisted, preferencesHint);
+ } else {
+ createInputPin_3019(pin, node, index, persisted, preferencesHint);
+ }
+ index++;
+ }
+ index = 0;
+ for (OutputPin pin : ((CallBehaviorAction) domainElement).getResults()) {
+ createOutputPin_3020(pin, node, index, persisted, preferencesHint);
+ }
+ } else if (domainElement instanceof CallOperationAction) {
+ // pins of a call operation action : arguments, target and results
+ int index = 0;
+ for (InputPin pin : ((CallOperationAction) domainElement).getArguments()) {
+ if (pin instanceof ValuePin) {
+ createValuePin_3022(pin, node, index, persisted, preferencesHint);
+ } else if (pin instanceof ActionInputPin) {
+ createActionInputPin_3021(pin, node, index, persisted, preferencesHint);
+ } else {
+ createInputPin_3023(pin, node, index, persisted, preferencesHint);
+ }
+ index++;
+ }
+ InputPin target = ((CallOperationAction) domainElement).getTarget();
+ if (target instanceof ValuePin) {
+ createValuePin_3025(target, node, index, persisted, preferencesHint);
+ } else if (target instanceof ActionInputPin) {
+ createActionInputPin_3026(target, node, index, persisted, preferencesHint);
+ } else if (target != null) {
+ createInputPin_3027(target, node, index, persisted, preferencesHint);
+ }
+ index = 0;
+ for (OutputPin pin : ((CallOperationAction) domainElement).getResults()) {
+ createOutputPin_3024(pin, node, index, persisted, preferencesHint);
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public Node createValuePin_3017(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ValuePinInCallBeActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
+ Node label5013 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCBActLabelEditPart.VISUAL_ID));
+ label5013.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5013 = (Location) label5013.getLayoutConstraint();
+ location5013.setX(0);
+ location5013.setY(5);
+ Node label5026 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCBActValueEditPart.VISUAL_ID));
+ label5026.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5026 = (Location) label5026.getLayoutConstraint();
+ location5026.setX(0);
+ location5026.setY(5);
+ Node label5087 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCBActAppliedStereotypeEditPart.VISUAL_ID));
+ label5087.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5087 = (Location) label5087.getLayoutConstraint();
+ location5087.setX(0);
+ location5087.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createActionInputPin_3018(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ActionInputPinInCallBeActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
+ Node label5014 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCBActLabelEditPart.VISUAL_ID));
+ label5014.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5014 = (Location) label5014.getLayoutConstraint();
+ location5014.setX(0);
+ location5014.setY(5);
+ Node label5027 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCBActValueEditPart.VISUAL_ID));
+ label5027.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5027 = (Location) label5027.getLayoutConstraint();
+ location5027.setX(0);
+ location5027.setY(5);
+ Node label5088 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCBActAppliedStereotypeEditPart.VISUAL_ID));
+ label5088.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5088 = (Location) label5088.getLayoutConstraint();
+ location5088.setX(0);
+ location5088.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3019(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInCallBeActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5015 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCBActLabelEditPart.VISUAL_ID));
+ label5015.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5015 = (Location) label5015.getLayoutConstraint();
+ location5015.setX(0);
+ location5015.setY(5);
+ Node label5089 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCBActAppliedStereotypeEditPart.VISUAL_ID));
+ label5089.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5089 = (Location) label5089.getLayoutConstraint();
+ location5089.setX(0);
+ location5089.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createOutputPin_3020(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(OutputPinInCallBeActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
+ Node label5016 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCBActLabelEditPart.VISUAL_ID));
+ label5016.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5016 = (Location) label5016.getLayoutConstraint();
+ location5016.setX(0);
+ location5016.setY(5);
+ Node label5090 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCBActAppliedStereotypeEditPart.VISUAL_ID));
+ label5090.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5090 = (Location) label5090.getLayoutConstraint();
+ location5090.setX(0);
+ location5090.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated NOT addition of pins initialization and height adaptation to pins
+ */
+ public Node createCallOperationAction_3010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ // adapt the height to contained pins
+ Bounds boundsConstraint = NotationFactory.eINSTANCE.createBounds();
+ PinPositionLocator.adaptActionHeight(boundsConstraint, domainElement);
+ node.setLayoutConstraint(boundsConstraint);
+ node.setType(UMLVisualIDRegistry.getType(CallOperationActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CallOperationAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CallOperationAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CallOperationAction");
+ Node label5006 = createLabel(node, UMLVisualIDRegistry.getType(CallOperationActionNameEditPart.VISUAL_ID));
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6020 = createLabel(node, UMLVisualIDRegistry.getType(CallOperationActionFloatingNameEditPart.VISUAL_ID));
+ label6020.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6020 = (Location) label6020.getLayoutConstraint();
+ location6020.setX(0);
+ location6020.setY(5);
+
+ // Add pins
+ createPins(domainElement, node, persisted, preferencesHint);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createActionInputPin_3021(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ActionInputPinInCallOpActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
+ Node label5017 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActLabelEditPart.VISUAL_ID));
+ label5017.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5017 = (Location) label5017.getLayoutConstraint();
+ location5017.setX(0);
+ location5017.setY(5);
+ Node label5028 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActValueEditPart.VISUAL_ID));
+ label5028.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5028 = (Location) label5028.getLayoutConstraint();
+ location5028.setX(0);
+ location5028.setY(5);
+ Node label5091 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAppliedStereotypeEditPart.VISUAL_ID));
+ label5091.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5091 = (Location) label5091.getLayoutConstraint();
+ location5091.setX(0);
+ location5091.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createValuePin_3022(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ValuePinInCallOpActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
+ Node label5018 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActLabelEditPart.VISUAL_ID));
+ label5018.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5018 = (Location) label5018.getLayoutConstraint();
+ location5018.setX(0);
+ location5018.setY(5);
+ Node label5029 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActValueEditPart.VISUAL_ID));
+ label5029.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5029 = (Location) label5029.getLayoutConstraint();
+ location5029.setX(0);
+ location5029.setY(5);
+ Node label5092 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAppliedStereotypeEditPart.VISUAL_ID));
+ label5092.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5092 = (Location) label5092.getLayoutConstraint();
+ location5092.setX(0);
+ location5092.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3023(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInCallOpActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5019 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActLabelEditPart.VISUAL_ID));
+ label5019.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5019 = (Location) label5019.getLayoutConstraint();
+ location5019.setX(0);
+ location5019.setY(5);
+ Node label5093 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActAppliedStereotypeEditPart.VISUAL_ID));
+ label5093.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5093 = (Location) label5093.getLayoutConstraint();
+ location5093.setX(0);
+ location5093.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createOutputPin_3024(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(OutputPinInCallOpActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
+ Node label5020 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCOActLabelEditPart.VISUAL_ID));
+ label5020.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5020 = (Location) label5020.getLayoutConstraint();
+ location5020.setX(0);
+ location5020.setY(5);
+ Node label5094 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCOActAppliedStereotypeEditPart.VISUAL_ID));
+ label5094.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5094 = (Location) label5094.getLayoutConstraint();
+ location5094.setX(0);
+ location5094.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createValuePin_3025(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ValuePinInCallOpActAsTargetEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
+ Node label5021 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAsTargetLabelEditPart.VISUAL_ID));
+ label5021.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5021 = (Location) label5021.getLayoutConstraint();
+ location5021.setX(0);
+ location5021.setY(5);
+ Node label5030 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAsTargetValueEditPart.VISUAL_ID));
+ label5030.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5030 = (Location) label5030.getLayoutConstraint();
+ location5030.setX(0);
+ location5030.setY(5);
+ Node label5095 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
+ label5095.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5095 = (Location) label5095.getLayoutConstraint();
+ location5095.setX(0);
+ location5095.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createActionInputPin_3026(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ActionInputPinInCallOpActAsTargetEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
+ Node label5022 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAsTargetLabelEditPart.VISUAL_ID));
+ label5022.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5022 = (Location) label5022.getLayoutConstraint();
+ location5022.setX(0);
+ location5022.setY(5);
+ Node label5031 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAsTargetValueEditPart.VISUAL_ID));
+ label5031.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5031 = (Location) label5031.getLayoutConstraint();
+ location5031.setX(0);
+ location5031.setY(5);
+ Node label5096 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
+ label5096.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5096 = (Location) label5096.getLayoutConstraint();
+ location5096.setX(0);
+ location5096.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3027(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInCallOpActAsTargetEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5023 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActAsTargetLabelEditPart.VISUAL_ID));
+ label5023.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5023 = (Location) label5023.getLayoutConstraint();
+ location5023.setX(0);
+ location5023.setY(5);
+ Node label5097 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInCOActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
+ label5097.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5097 = (Location) label5097.getLayoutConstraint();
+ location5097.setX(0);
+ location5097.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createConstraint_3011(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ConstraintAsLocalPrecondEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Constraint");
+ Node label5007 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPrecondNameEditPart.VISUAL_ID));
+ Node label5136 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPrecondBodyEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createConstraint_3012(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ConstraintAsLocalPostcondEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Constraint");
+ Node label5008 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPostcondNameEditPart.VISUAL_ID));
+ Node label5137 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintAsLocalPostcondBodyEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createDecisionNode_3038(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(DecisionNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DecisionNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DecisionNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DecisionNode");
+ Node label5043 = createLabel(node, UMLVisualIDRegistry.getType(DecisionInputEditPart.VISUAL_ID));
+ label5043.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5043 = (Location) label5043.getLayoutConstraint();
+ location5043.setX(0);
+ location5043.setY(5);
+ Node label5098 = createLabel(node, UMLVisualIDRegistry.getType(DecisionNodeAppliedStereotypeEditPart.VISUAL_ID));
+ label5098.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5098 = (Location) label5098.getLayoutConstraint();
+ location5098.setX(0);
+ location5098.setY(5);
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6036 = createLabel(node, UMLVisualIDRegistry.getType(DecisionNodeFloatingNameEditPart.VISUAL_ID));
+ label6036.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6036 = (Location) label6036.getLayoutConstraint();
+ location6036.setX(0);
+ location6036.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createMergeNode_3039(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(MergeNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "MergeNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "MergeNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "MergeNode");
+ Node label5099 = createLabel(node, UMLVisualIDRegistry.getType(MergeNodeAppliedStereotypeEditPart.VISUAL_ID));
+ label5099.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5099 = (Location) label5099.getLayoutConstraint();
+ location5099.setX(0);
+ location5099.setY(5);
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6037 = createLabel(node, UMLVisualIDRegistry.getType(MergeNodeFloatingNameEditPart.VISUAL_ID));
+ label6037.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6037 = (Location) label6037.getLayoutConstraint();
+ location6037.setX(0);
+ location6037.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createForkNode_3040(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ForkNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ForkNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ForkNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ForkNode");
+ Node label5100 = createLabel(node, UMLVisualIDRegistry.getType(ForkNodeAppliedStereotypeEditPart.VISUAL_ID));
+ label5100.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5100 = (Location) label5100.getLayoutConstraint();
+ location5100.setX(0);
+ location5100.setY(5);
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6038 = createLabel(node, UMLVisualIDRegistry.getType(ForkNodeFloatingNameEditPart.VISUAL_ID));
+ label6038.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6038 = (Location) label6038.getLayoutConstraint();
+ location6038.setX(0);
+ location6038.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createJoinNode_3041(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(JoinNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "JoinNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "JoinNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "JoinNode");
+ Node label5042 = createLabel(node, UMLVisualIDRegistry.getType(JoinSpecEditPart.VISUAL_ID));
+ label5042.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5042 = (Location) label5042.getLayoutConstraint();
+ location5042.setX(0);
+ location5042.setY(5);
+ Node label5101 = createLabel(node, UMLVisualIDRegistry.getType(JoinNodeAppliedStereotypeEditPart.VISUAL_ID));
+ label5101.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5101 = (Location) label5101.getLayoutConstraint();
+ location5101.setX(0);
+ location5101.setY(5);
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6039 = createLabel(node, UMLVisualIDRegistry.getType(JoinNodeFloatingNameEditPart.VISUAL_ID));
+ label6039.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6039 = (Location) label6039.getLayoutConstraint();
+ location6039.setX(0);
+ location6039.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createSendObjectAction_3042(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(SendObjectActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "SendObjectAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SendObjectAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "SendObjectAction");
+ Node label5059 = createLabel(node, UMLVisualIDRegistry.getType(SendObjectActionNameEditPart.VISUAL_ID));
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6027 = createLabel(node, UMLVisualIDRegistry.getType(SendObjectActionFloatingNameEditPart.VISUAL_ID));
+ label6027.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6027 = (Location) label6027.getLayoutConstraint();
+ location6027.setX(0);
+ location6027.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createValuePin_3046(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
+ Node label5049 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqLabelEditPart.VISUAL_ID));
+ label5049.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5049 = (Location) label5049.getLayoutConstraint();
+ location5049.setX(0);
+ location5049.setY(5);
+ Node label5050 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqValueEditPart.VISUAL_ID));
+ label5050.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5050 = (Location) label5050.getLayoutConstraint();
+ location5050.setX(0);
+ location5050.setY(5);
+ Node label5102 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID));
+ label5102.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5102 = (Location) label5102.getLayoutConstraint();
+ location5102.setX(0);
+ location5102.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createActionInputPin_3047(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
+ Node label5051 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqLabelEditPart.VISUAL_ID));
+ label5051.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5051 = (Location) label5051.getLayoutConstraint();
+ location5051.setX(0);
+ location5051.setY(5);
+ Node label5052 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqValueEditPart.VISUAL_ID));
+ label5052.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5052 = (Location) label5052.getLayoutConstraint();
+ location5052.setX(0);
+ location5052.setY(5);
+ Node label5103 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID));
+ label5103.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5103 = (Location) label5103.getLayoutConstraint();
+ location5103.setX(0);
+ location5103.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3048(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInSendObjActAsReqEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5053 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsReqLabelEditPart.VISUAL_ID));
+ label5053.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5053 = (Location) label5053.getLayoutConstraint();
+ location5053.setX(0);
+ location5053.setY(5);
+ Node label5104 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsReqAppliedStereotypeEditPart.VISUAL_ID));
+ label5104.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5104 = (Location) label5104.getLayoutConstraint();
+ location5104.setX(0);
+ location5104.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createValuePin_3049(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
+ Node label5054 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetLabelEditPart.VISUAL_ID));
+ label5054.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5054 = (Location) label5054.getLayoutConstraint();
+ location5054.setX(0);
+ location5054.setY(5);
+ Node label5055 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetValueEditPart.VISUAL_ID));
+ label5055.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5055 = (Location) label5055.getLayoutConstraint();
+ location5055.setX(0);
+ location5055.setY(5);
+ Node label5105 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
+ label5105.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5105 = (Location) label5105.getLayoutConstraint();
+ location5105.setX(0);
+ location5105.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createActionInputPin_3050(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
+ Node label5056 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID));
+ label5056.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5056 = (Location) label5056.getLayoutConstraint();
+ location5056.setX(0);
+ location5056.setY(5);
+ Node label5057 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetValueEditPart.VISUAL_ID));
+ label5057.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5057 = (Location) label5057.getLayoutConstraint();
+ location5057.setX(0);
+ location5057.setY(5);
+ Node label5106 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
+ label5106.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5106 = (Location) label5106.getLayoutConstraint();
+ location5106.setX(0);
+ location5106.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3051(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInSendObjActAsTargetEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5058 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsTargetLabelEditPart.VISUAL_ID));
+ label5058.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5058 = (Location) label5058.getLayoutConstraint();
+ location5058.setX(0);
+ location5058.setY(5);
+ Node label5107 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendObjActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
+ label5107.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5107 = (Location) label5107.getLayoutConstraint();
+ location5107.setX(0);
+ location5107.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createSendSignalAction_3052(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(SendSignalActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "SendSignalAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SendSignalAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "SendSignalAction");
+ Node label5060 = createLabel(node, UMLVisualIDRegistry.getType(SendSignalActionNameEditPart.VISUAL_ID));
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6032 = createLabel(node, UMLVisualIDRegistry.getType(SendSignalActionFloatingNameEditPart.VISUAL_ID));
+ label6032.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6032 = (Location) label6032.getLayoutConstraint();
+ location6032.setX(0);
+ location6032.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createActionInputPin_3053(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendSigActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
+ Node label5061 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActLabelEditPart.VISUAL_ID));
+ label5061.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5061 = (Location) label5061.getLayoutConstraint();
+ location5061.setX(0);
+ location5061.setY(5);
+ Node label5062 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActValueEditPart.VISUAL_ID));
+ label5062.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5062 = (Location) label5062.getLayoutConstraint();
+ location5062.setX(0);
+ location5062.setY(5);
+ Node label5108 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID));
+ label5108.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5108 = (Location) label5108.getLayoutConstraint();
+ location5108.setX(0);
+ location5108.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createValuePin_3054(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ValuePinInSendSigActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
+ Node label5063 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActLabelEditPart.VISUAL_ID));
+ label5063.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5063 = (Location) label5063.getLayoutConstraint();
+ location5063.setX(0);
+ location5063.setY(5);
+ Node label5064 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActValueEditPart.VISUAL_ID));
+ label5064.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5064 = (Location) label5064.getLayoutConstraint();
+ location5064.setX(0);
+ location5064.setY(5);
+ Node label5109 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAppliedStereotypeEditPart.VISUAL_ID));
+ label5109.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5109 = (Location) label5109.getLayoutConstraint();
+ location5109.setX(0);
+ location5109.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3055(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInSendSigActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5065 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActLabelEditPart.VISUAL_ID));
+ label5065.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5065 = (Location) label5065.getLayoutConstraint();
+ location5065.setX(0);
+ location5065.setY(5);
+ Node label5110 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActAppliedStereotypeEditPart.VISUAL_ID));
+ label5110.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5110 = (Location) label5110.getLayoutConstraint();
+ location5110.setX(0);
+ location5110.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createValuePin_3060(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValuePin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValuePin");
+ Node label5072 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetLabelEditPart.VISUAL_ID));
+ label5072.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5072 = (Location) label5072.getLayoutConstraint();
+ location5072.setX(0);
+ location5072.setY(5);
+ Node label5073 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetValueEditPart.VISUAL_ID));
+ label5073.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5073 = (Location) label5073.getLayoutConstraint();
+ location5073.setX(0);
+ location5073.setY(5);
+ Node label5111 = createLabel(node, UMLVisualIDRegistry.getType(ValuePinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
+ label5111.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5111 = (Location) label5111.getLayoutConstraint();
+ location5111.setX(0);
+ location5111.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createActionInputPin_3061(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActionInputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActionInputPin");
+ Node label5074 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID));
+ label5074.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5074 = (Location) label5074.getLayoutConstraint();
+ location5074.setX(0);
+ location5074.setY(5);
+ Node label5075 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetValueEditPart.VISUAL_ID));
+ label5075.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5075 = (Location) label5075.getLayoutConstraint();
+ location5075.setX(0);
+ location5075.setY(5);
+ Node label5112 = createLabel(node, UMLVisualIDRegistry.getType(ActionInputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
+ label5112.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5112 = (Location) label5112.getLayoutConstraint();
+ location5112.setX(0);
+ location5112.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3062(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInSendSigActAsTargetEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5076 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActAsTargetLabelEditPart.VISUAL_ID));
+ label5076.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5076 = (Location) label5076.getLayoutConstraint();
+ location5076.setX(0);
+ location5076.setY(5);
+ Node label5113 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInSendSigActAsTargetAppliedStereotypeEditPart.VISUAL_ID));
+ label5113.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5113 = (Location) label5113.getLayoutConstraint();
+ location5113.setX(0);
+ location5113.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createActivityParameterNode_3059(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ActivityParameterNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActivityParameterNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActivityParameterNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActivityParameterNode");
+ Node label5071 = createLabel(node, UMLVisualIDRegistry.getType(ParameterNodeNameEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createAcceptEventAction_3063(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(AcceptEventActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "AcceptEventAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AcceptEventAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "AcceptEventAction");
+ Node label5078 = createLabel(node, UMLVisualIDRegistry.getType(AcceptEventActionLabelEditPart.VISUAL_ID));
+ Node label5079 = createLabel(node, UMLVisualIDRegistry.getType(AcceptTimeEventActionLabelEditPart.VISUAL_ID));
+ label5079.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5079 = (Location) label5079.getLayoutConstraint();
+ location5079.setX(0);
+ location5079.setY(5);
+ Node label5115 = createLabel(node, UMLVisualIDRegistry.getType(AcceptTimeEventActionAppliedStereotypeEditPart.VISUAL_ID));
+ label5115.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5115 = (Location) label5115.getLayoutConstraint();
+ location5115.setX(0);
+ location5115.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createOutputPin_3064(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(OutputPinInAcceptEventActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
+ Node label5077 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAcceptEventActionLabelEditPart.VISUAL_ID));
+ label5077.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5077 = (Location) label5077.getLayoutConstraint();
+ location5077.setX(0);
+ location5077.setY(5);
+ Node label5114 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAcceptEventActionAppliedStereotypeEditPart.VISUAL_ID));
+ label5114.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5114 = (Location) label5114.getLayoutConstraint();
+ location5114.setX(0);
+ location5114.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createStructuredActivityNode_3065(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(StructuredActivityNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "StructuredActivityNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "StructuredActivityNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "StructuredActivityNode");
+ Node label5117 = createLabel(node, UMLVisualIDRegistry.getType(StructuredActivityNodeKeywordEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(StructuredActivityNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "StructuredActivityNode");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3105(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInLoopNodeAsVariableEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5178 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInLoopNodeAsVariableLabelEditPart.VISUAL_ID));
+ label5178.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5178 = (Location) label5178.getLayoutConstraint();
+ location5178.setX(0);
+ location5178.setY(5);
+ Node label5179 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInStructuredActivityNodeAppliedStereotypeEditPart.VISUAL_ID));
+ label5179.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5179 = (Location) label5179.getLayoutConstraint();
+ location5179.setX(0);
+ location5179.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createActivityPartition_3067(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ActivityPartitionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ActivityPartition");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ActivityPartition");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ActivityPartition");
+ Node label5118 = createLabel(node, UMLVisualIDRegistry.getType(ActivityPartitionNameEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ActivityPartitionActivityPartitionContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ActivityPartition");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInterruptibleActivityRegion_3068(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InterruptibleActivityRegionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InterruptibleActivityRegion");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InterruptibleActivityRegion");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InterruptibleActivityRegion");
+ createCompartment(node, UMLVisualIDRegistry.getType(InterruptibleActivityRegionInterruptibleActivityRegionContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "InterruptibleActivityRegion");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createComment_3080(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(CommentEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Comment");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Comment");
+ Node label5138 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyLabelEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createReadSelfAction_3081(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ReadSelfActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ReadSelfAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ReadSelfAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ReadSelfAction");
+ Node label5139 = createLabel(node, UMLVisualIDRegistry.getType(ReadSelfActionNameEditPart.VISUAL_ID));
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6025 = createLabel(node, UMLVisualIDRegistry.getType(ReadSelfActionFloatingNameEditPart.VISUAL_ID));
+ label6025.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6025 = (Location) label6025.getLayoutConstraint();
+ location6025.setX(0);
+ location6025.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createOutputPin_3084(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ReadSelfActionOutputPinEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
+ Node label5144 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadSelfActionLabelEditPart.VISUAL_ID));
+ label5144.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5144 = (Location) label5144.getLayoutConstraint();
+ location5144.setX(0);
+ location5144.setY(5);
+ Node label5145 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadSelfActionAppliedStereotypeEditPart.VISUAL_ID));
+ label5145.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5145 = (Location) label5145.getLayoutConstraint();
+ location5145.setX(0);
+ location5145.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createActivity_3083(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ActivityEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Activity");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Activity");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Activity");
+ Node label5142 = createLabel(node, UMLVisualIDRegistry.getType(ActivityNameEditPartCN.VISUAL_ID));
+ Node label5143 = createLabel(node, UMLVisualIDRegistry.getType(ActivityIsSingleExecutionCNEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNParametersCompartmentEditPart.VISUAL_ID), false, false, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNPreConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNPostConditionsCompartmentEditPart.VISUAL_ID), false, false, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ActivityCNContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Activity");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createNamedElement_3085(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ShapeNamedElementEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ShapeNamedElement");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ShapeNamedElement");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ShapeNamedElement");
+ Node label5129 = createLabel(node, UMLVisualIDRegistry.getType(ShapeNamedElementNameEditPart.VISUAL_ID));
+ label5129.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5129 = (Location) label5129.getLayoutConstraint();
+ location5129.setX(25);
+ location5129.setY(3);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createCreateObjectAction_3086(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(CreateObjectActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CreateObjectAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CreateObjectAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CreateObjectAction");
+ Node label5148 = createLabel(node, UMLVisualIDRegistry.getType(CreateObjectActionNameEditPart.VISUAL_ID));
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6024 = createLabel(node, UMLVisualIDRegistry.getType(CreateObjectActionFloatingNameEditPart.VISUAL_ID));
+ label6024.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6024 = (Location) label6024.getLayoutConstraint();
+ location6024.setX(0);
+ location6024.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createOutputPin_3087(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(OutputPinInCreateObjectActionAsResultEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
+ Node label5146 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCreateObjectActionAsResultLabelEditPart.VISUAL_ID));
+ label5146.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5146 = (Location) label5146.getLayoutConstraint();
+ location5146.setX(0);
+ location5146.setY(5);
+ Node label5147 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInCreateObjectActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
+ label5147.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5147 = (Location) label5147.getLayoutConstraint();
+ location5147.setX(0);
+ location5147.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createReadStructuralFeatureAction_3088(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ReadStructuralFeatureActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ReadStructuralFeatureAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ReadStructuralFeatureAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ReadStructuralFeatureAction");
+ Node label5153 = createLabel(node, UMLVisualIDRegistry.getType(ReadStructuralFeatureActionNameEditPart.VISUAL_ID));
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6023 = createLabel(node, UMLVisualIDRegistry.getType(ReadStructuralFeatureActionFloatingNameEditPart.VISUAL_ID));
+ label6023.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6023 = (Location) label6023.getLayoutConstraint();
+ location6023.setX(0);
+ location6023.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3089(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsObjectEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5149 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsObjectLabelEditPart.VISUAL_ID));
+ label5149.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5149 = (Location) label5149.getLayoutConstraint();
+ location5149.setX(0);
+ location5149.setY(5);
+ Node label5150 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
+ label5150.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5150 = (Location) label5150.getLayoutConstraint();
+ location5150.setX(0);
+ location5150.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createOutputPin_3090(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(OutputPinInReadStructuralFeatureAsResultEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
+ Node label5151 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadStructuralFeatureAsResultLabelEditPart.VISUAL_ID));
+ label5151.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5151 = (Location) label5151.getLayoutConstraint();
+ location5151.setX(0);
+ location5151.setY(5);
+ Node label5152 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInReadStructuralFeatureAsResultWrappingLabelEditPart.VISUAL_ID));
+ label5152.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5152 = (Location) label5152.getLayoutConstraint();
+ location5152.setX(0);
+ location5152.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createAddStructuralFeatureValueAction_3091(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "AddStructuralFeatureValueAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AddStructuralFeatureValueAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "AddStructuralFeatureValueAction");
+ Node label5160 = createLabel(node, UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionNameEditPart.VISUAL_ID));
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6019 = createLabel(node, UMLVisualIDRegistry.getType(AddStructuralFeatureValueActionFloatingNameEditPart.VISUAL_ID));
+ label6019.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6019 = (Location) label6019.getLayoutConstraint();
+ location6019.setX(0);
+ location6019.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3092(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsObjectEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5154 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsObjectLabelEditPart.VISUAL_ID));
+ label5154.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5154 = (Location) label5154.getLayoutConstraint();
+ location5154.setX(0);
+ location5154.setY(5);
+ Node label5155 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsObjectAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
+ label5155.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5155 = (Location) label5155.getLayoutConstraint();
+ location5155.setX(0);
+ location5155.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3093(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsValueEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5156 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsValueLabel2EditPart.VISUAL_ID));
+ label5156.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5156 = (Location) label5156.getLayoutConstraint();
+ location5156.setX(0);
+ location5156.setY(5);
+ Node label5157 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddStructuralFeatureValueActionAsValueAppliedStereotypeWrappingLabel2EditPart.VISUAL_ID));
+ label5157.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5157 = (Location) label5157.getLayoutConstraint();
+ location5157.setX(0);
+ location5157.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createOutputPin_3094(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(OutputPinInAddStructuralFeatureValueActionAsResultEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
+ Node label5158 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAddStructuralFeatureValueActionAsResultLabel3EditPart.VISUAL_ID));
+ label5158.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5158 = (Location) label5158.getLayoutConstraint();
+ location5158.setX(0);
+ location5158.setY(5);
+ Node label5159 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInAddStructuralFeatureValueActionAsResultAppliedStereotypeWrappingLabel3EditPart.VISUAL_ID));
+ label5159.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5159 = (Location) label5159.getLayoutConstraint();
+ location5159.setX(0);
+ location5159.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createDestroyObjectAction_3095(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(DestroyObjectActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DestroyObjectAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DestroyObjectAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DestroyObjectAction");
+ Node label5163 = createLabel(node, UMLVisualIDRegistry.getType(DestroyObjectActionNameEditPart.VISUAL_ID));
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6022 = createLabel(node, UMLVisualIDRegistry.getType(DestroyObjectActionFloatingNameEditPart.VISUAL_ID));
+ label6022.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6022 = (Location) label6022.getLayoutConstraint();
+ location6022.setX(0);
+ location6022.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3096(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInDestroyObjectActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5161 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInDestroyObjectActionLabelEditPart.VISUAL_ID));
+ label5161.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5161 = (Location) label5161.getLayoutConstraint();
+ location5161.setX(0);
+ location5161.setY(5);
+ Node label5162 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInDestroyObjectActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
+ label5162.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5162 = (Location) label5162.getLayoutConstraint();
+ location5162.setX(0);
+ location5162.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createReadVariableAction_3097(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ReadVariableActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ReadVariableAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ReadVariableAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ReadVariableAction");
+ Node label5166 = createLabel(node, UMLVisualIDRegistry.getType(ReadVariableActionNameEditPart.VISUAL_ID));
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6021 = createLabel(node, UMLVisualIDRegistry.getType(ReadVariableActionFloatingNameEditPart.VISUAL_ID));
+ label6021.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6021 = (Location) label6021.getLayoutConstraint();
+ location6021.setX(0);
+ location6021.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createOutputPin_3098(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(OutputPinInReadVariableActionAsResultEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
+ Node label5164 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadVariableActionAsResultLabelEditPart.VISUAL_ID));
+ label5164.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5164 = (Location) label5164.getLayoutConstraint();
+ location5164.setX(0);
+ location5164.setY(5);
+ Node label5165 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInReadVariableActionAsResultAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
+ label5165.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5165 = (Location) label5165.getLayoutConstraint();
+ location5165.setX(0);
+ location5165.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createAddVariableValueAction_3099(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(AddVariableValueActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "AddVariableValueAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AddVariableValueAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "AddVariableValueAction");
+ Node label5171 = createLabel(node, UMLVisualIDRegistry.getType(AddVariableValueActionNameEditPart.VISUAL_ID));
+ // not generated but change include on gmfgen, can be override at the generation
+ Node label6018 = createLabel(node, UMLVisualIDRegistry.getType(AddVariableValueActionFloatingNameEditPart.VISUAL_ID));
+ label6018.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6018 = (Location) label6018.getLayoutConstraint();
+ location6018.setX(0);
+ location6018.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3100(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsInsertAtEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5167 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsInsertAtLabelEditPart.VISUAL_ID));
+ label5167.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5167 = (Location) label5167.getLayoutConstraint();
+ location5167.setX(0);
+ location5167.setY(5);
+ Node label5168 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsInsertAtAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
+ label5168.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5168 = (Location) label5168.getLayoutConstraint();
+ location5168.setX(0);
+ location5168.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3101(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsValueEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5169 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsValueLabelEditPart.VISUAL_ID));
+ label5169.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5169 = (Location) label5169.getLayoutConstraint();
+ location5169.setX(0);
+ location5169.setY(5);
+ Node label5170 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInAddVariableValueActionAsValueAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
+ label5170.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5170 = (Location) label5170.getLayoutConstraint();
+ location5170.setX(0);
+ location5170.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createBroadcastSignalAction_3102(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(BroadcastSignalActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "BroadcastSignalAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "BroadcastSignalAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "BroadcastSignalAction");
+ Node label5175 = createLabel(node, UMLVisualIDRegistry.getType(BroadcastSignalActionNameEditPart.VISUAL_ID));
+ // not generated but change include on gmfgen, can be override at the generation
+ Node label6017 = createLabel(node, UMLVisualIDRegistry.getType(BroadcastSignalActionFloatingNameEditPart.VISUAL_ID));
+ label6017.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6017 = (Location) label6017.getLayoutConstraint();
+ location6017.setX(0);
+ location6017.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createInputPin_3103(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "InputPin");
+ Node label5172 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionLabelEditPart.VISUAL_ID));
+ label5172.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5172 = (Location) label5172.getLayoutConstraint();
+ location5172.setX(0);
+ location5172.setY(5);
+ Node label5173 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionValueLabelEditPart.VISUAL_ID));
+ label5173.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5173 = (Location) label5173.getLayoutConstraint();
+ location5173.setX(0);
+ location5173.setY(5);
+ Node label5174 = createLabel(node, UMLVisualIDRegistry.getType(InputPinInBroadcastSignalActionAppliedStereotypeWrappingLabelEditPart.VISUAL_ID));
+ label5174.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5174 = (Location) label5174.getLayoutConstraint();
+ location5174.setX(0);
+ location5174.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createCentralBufferNode_3104(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(CentralBufferNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "CentralBufferNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CentralBufferNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "CentralBufferNode");
+ Node label5176 = createLabel(node, UMLVisualIDRegistry.getType(CentralBufferNodeLabelEditPart.VISUAL_ID));
+ Node label5177 = createLabel(node, UMLVisualIDRegistry.getType(CentralBufferNodeSelectionEditPart.VISUAL_ID));
+ label5177.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5177 = (Location) label5177.getLayoutConstraint();
+ location5177.setX(0);
+ location5177.setY(5);
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6030 = createLabel(node, UMLVisualIDRegistry.getType(CentralBufferNodeFloatingNameEditPart.VISUAL_ID));
+ label6030.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6030 = (Location) label6030.getLayoutConstraint();
+ location6030.setX(0);
+ location6030.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createConstraint_3112(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ConstraintEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "Constraint");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "Constraint");
+ Node label5189 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID));
+ Node label5190 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintBodyEditPartCN.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createValueSpecificationAction_3076(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ValueSpecificationActionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ValueSpecificationAction");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ValueSpecificationAction");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ValueSpecificationAction");
+ Node label5126 = createLabel(node, UMLVisualIDRegistry.getType(ValueSpecificationActionNameEditPart.VISUAL_ID));
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6026 = createLabel(node, UMLVisualIDRegistry.getType(ValueSpecificationActionFloatingNameEditPart.VISUAL_ID));
+ label6026.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6026 = (Location) label6026.getLayoutConstraint();
+ location6026.setX(0);
+ location6026.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createOutputPin_3077(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(OutputPinInValSpecActEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
+ Node label5124 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInValSpecActLabelEditPart.VISUAL_ID));
+ label5124.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5124 = (Location) label5124.getLayoutConstraint();
+ location5124.setX(0);
+ location5124.setY(5);
+ Node label5125 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInValSpecActAppliedStereotypeEditPart.VISUAL_ID));
+ label5125.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5125 = (Location) label5125.getLayoutConstraint();
+ location5125.setX(0);
+ location5125.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createDataStoreNode_3078(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(DataStoreNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DataStoreNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataStoreNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DataStoreNode");
+ Node label5127 = createLabel(node, UMLVisualIDRegistry.getType(DataStoreNodeLabelEditPart.VISUAL_ID));
+ Node label5128 = createLabel(node, UMLVisualIDRegistry.getType(DataStoreSelectionEditPart.VISUAL_ID));
+ label5128.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5128 = (Location) label5128.getLayoutConstraint();
+ location5128.setX(0);
+ location5128.setY(5);
+ // not generated but changes include on gmfgen, can be override at the generation
+ Node label6031 = createLabel(node, UMLVisualIDRegistry.getType(DataStoreNodeFloatingNameEditPart.VISUAL_ID));
+ label6031.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6031 = (Location) label6031.getLayoutConstraint();
+ location6031.setX(0);
+ location6031.setY(5);
+
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createConditionalNode_3069(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ConditionalNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ConditionalNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ConditionalNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ConditionalNode");
+ Node label5119 = createLabel(node, UMLVisualIDRegistry.getType(ConditionalNodeKeywordEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ConditionalNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ConditionalNode");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createExpansionRegion_3070(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ExpansionRegionEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ExpansionRegion");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExpansionRegion");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ExpansionRegion");
+ Node label5120 = createLabel(node, UMLVisualIDRegistry.getType(ExpansionRegionKeywordEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ExpansionRegionStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ExpansionRegion");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createExpansionNode_3074(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ExpansionNodeAsInEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ExpansionNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExpansionNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ExpansionNode");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createExpansionNode_3075(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ExpansionNodeAsOutEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "ExpansionNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExpansionNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "ExpansionNode");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createLoopNode_3071(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(LoopNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "LoopNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LoopNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "LoopNode");
+ Node label5121 = createLabel(node, UMLVisualIDRegistry.getType(LoopNodeKeywordEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(LoopNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "LoopNode");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createOutputPin_3109(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsBodyOutputEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
+ Node label5184 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsBodyOutputLabelEditPart.VISUAL_ID));
+ label5184.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5184 = (Location) label5184.getLayoutConstraint();
+ location5184.setX(0);
+ location5184.setY(5);
+ Node label5185 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsBodyOutputAppliedStereotypeEditPart.VISUAL_ID));
+ label5185.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5185 = (Location) label5185.getLayoutConstraint();
+ location5185.setX(0);
+ location5185.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createOutputPin_3110(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsLoopVariableEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
+ Node label5186 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsLoopVariableLabelEditPart.VISUAL_ID));
+ label5186.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5186 = (Location) label5186.getLayoutConstraint();
+ location5186.setX(0);
+ location5186.setY(5);
+ Node label5183 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsLoopVariableAppliedStereotypeEditPart.VISUAL_ID));
+ label5183.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5183 = (Location) label5183.getLayoutConstraint();
+ location5183.setX(0);
+ location5183.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createOutputPin_3111(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsResultEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OutputPin");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "OutputPin");
+ Node label5187 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsResultLabelEditPart.VISUAL_ID));
+ label5187.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5187 = (Location) label5187.getLayoutConstraint();
+ location5187.setX(0);
+ location5187.setY(5);
+ Node label5188 = createLabel(node, UMLVisualIDRegistry.getType(OutputPinInLoopNodeAsResultAppliedStereotypeEditPart.VISUAL_ID));
+ label5188.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5188 = (Location) label5188.getLayoutConstraint();
+ location5188.setX(0);
+ location5188.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createSequenceNode_3073(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(SequenceNodeEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "SequenceNode");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SequenceNode");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "SequenceNode");
+ Node label5123 = createLabel(node, UMLVisualIDRegistry.getType(SequenceNodeKeywordEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(SequenceNodeStructuredActivityNodeContentCompartmentEditPart.VISUAL_ID), false, false, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "SequenceNode");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createIntervalConstraint_3032(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPrecondEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "IntervalConstraint");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "IntervalConstraint");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "IntervalConstraint");
+ Node label5036 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPrecondNameEditPart.VISUAL_ID));
+ Node label5134 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPrecondBodyEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createIntervalConstraint_3033(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPostcondEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "IntervalConstraint");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "IntervalConstraint");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "IntervalConstraint");
+ Node label5037 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPostcondNameEditPart.VISUAL_ID));
+ Node label5135 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintAsLocalPostcondBodyEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createDurationConstraint_3034(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(DurationConstraintAsLocalPrecondEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DurationConstraint");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DurationConstraint");
+ Node label5038 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPrecondNameEditPart.VISUAL_ID));
+ Node label5130 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPrecondBodyEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createDurationConstraint_3035(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(DurationConstraintAsLocalPostcondEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "DurationConstraint");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "DurationConstraint");
+ Node label5039 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPostcondNameEditPart.VISUAL_ID));
+ Node label5131 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintAsLocalPostcondBodyEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createTimeConstraint_3036(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(TimeConstraintAsLocalPrecondEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "TimeConstraint");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "TimeConstraint");
+ Node label5040 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPrecondNameEditPart.VISUAL_ID));
+ Node label5132 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPrecondBodyEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createTimeConstraint_3037(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.getStyles().add(NotationFactory.eINSTANCE.createHintedDiagramLinkStyle());
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(TimeConstraintAsLocalPostcondEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(node, prefStore, "TimeConstraint");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint");
+ PreferenceInitializerForElementHelper.initBackgroundFromPrefs(node, prefStore, "TimeConstraint");
+ Node label5041 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPostcondNameEditPart.VISUAL_ID));
+ Node label5133 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintAsLocalPostcondBodyEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createActionLocalPrecondition_4001(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Edge edge = NotationFactory.eINSTANCE.createEdge();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle());
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(ActionLocalPreconditionEditPart.VISUAL_ID));
+ edge.setElement(null);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined");
+ // 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);
+ // }
+ PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined");
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createActionLocalPostcondition_4002(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Edge edge = NotationFactory.eINSTANCE.createEdge();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createRoutingStyle());
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(ActionLocalPostconditionEditPart.VISUAL_ID));
+ edge.setElement(null);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined");
+ // 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);
+ // }
+ PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined");
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createObjectFlow_4003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(ObjectFlowEditPart.VISUAL_ID));
+ edge.setElement(domainElement);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "ObjectFlow");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ObjectFlow");
+ // 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);
+ // }
+ PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "ObjectFlow");
+ Node label6001 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowNameEditPart.VISUAL_ID));
+ label6001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6001 = (Location) label6001.getLayoutConstraint();
+ location6001.setX(0);
+ location6001.setY(20);
+ Node label6002 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowWeightEditPart.VISUAL_ID));
+ label6002.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6002 = (Location) label6002.getLayoutConstraint();
+ location6002.setX(0);
+ location6002.setY(20);
+ Node label6005 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowSelectionEditPart.VISUAL_ID));
+ label6005.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6005 = (Location) label6005.getLayoutConstraint();
+ location6005.setX(20);
+ location6005.setY(40);
+ Node label6006 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowTransformationEditPart.VISUAL_ID));
+ label6006.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6006 = (Location) label6006.getLayoutConstraint();
+ location6006.setX(-20);
+ location6006.setY(-60);
+ Node label6007 = createLabel(edge, UMLVisualIDRegistry.getType(DecisionInputFlowEditPart.VISUAL_ID));
+ label6007.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6007 = (Location) label6007.getLayoutConstraint();
+ location6007.setX(0);
+ location6007.setY(-20);
+ Node label6008 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowGuardEditPart.VISUAL_ID));
+ label6008.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6008 = (Location) label6008.getLayoutConstraint();
+ location6008.setX(0);
+ location6008.setY(20);
+ Node label6010 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowAppliedStereotypeEditPart.VISUAL_ID));
+ label6010.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6010 = (Location) label6010.getLayoutConstraint();
+ location6010.setX(0);
+ location6010.setY(-20);
+ Node label6014 = createLabel(edge, UMLVisualIDRegistry.getType(ObjectFlowInterruptibleIconEditPart.VISUAL_ID));
+ label6014.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "ObjectFlow");
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createControlFlow_4004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(ControlFlowEditPart.VISUAL_ID));
+ edge.setElement(domainElement);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "ControlFlow");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ControlFlow");
+ // 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);
+ // }
+ PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "ControlFlow");
+ Node label6003 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowNameEditPart.VISUAL_ID));
+ label6003.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6003 = (Location) label6003.getLayoutConstraint();
+ location6003.setX(0);
+ location6003.setY(20);
+ Node label6004 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowWeightEditPart.VISUAL_ID));
+ label6004.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6004 = (Location) label6004.getLayoutConstraint();
+ location6004.setX(0);
+ location6004.setY(20);
+ Node label6009 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowGuardEditPart.VISUAL_ID));
+ label6009.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6009 = (Location) label6009.getLayoutConstraint();
+ location6009.setX(0);
+ location6009.setY(20);
+ Node label6011 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowAppliedStereotypeEditPart.VISUAL_ID));
+ label6011.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6011 = (Location) label6011.getLayoutConstraint();
+ location6011.setX(0);
+ location6011.setY(-20);
+ Node label6013 = createLabel(edge, UMLVisualIDRegistry.getType(ControlFlowInterruptibleIconEditPart.VISUAL_ID));
+ label6013.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "ControlFlow");
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createExceptionHandler_4005(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(ExceptionHandlerEditPart.VISUAL_ID));
+ edge.setElement(domainElement);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "ExceptionHandler");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ExceptionHandler");
+ // 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);
+ // }
+ PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "ExceptionHandler");
+ Node label6012 = createLabel(edge, UMLVisualIDRegistry.getType(ExceptionHandlerTypeEditPart.VISUAL_ID));
+ label6012.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6012 = (Location) label6012.getLayoutConstraint();
+ location6012.setX(0);
+ location6012.setY(40);
+ Node label6015 = createLabel(edge, UMLVisualIDRegistry.getType(ExceptionHandlerIconEditPart.VISUAL_ID));
+ label6015.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createCommentAnnotatedElement_4006(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(CommentLinkEditPart.VISUAL_ID));
+ edge.setElement(null);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Undefined");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined");
+ // 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);
+ // }
+ PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined");
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createConstraintConstrainedElement_4007(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
+ edge.setElement(null);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initForegroundFromPrefs(edge, prefStore, "Undefined");
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Undefined");
+ // 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);
+ // }
+ PreferenceInitializerForElementHelper.initRountingFromPrefs(edge, prefStore, "Undefined");
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ protected void stampShortcut(View containerView, Node target) {
+ if (!ActivityDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) {
+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
+ shortcutAnnotation.getDetails().put("modelID", ActivityDiagramEditPart.MODEL_ID); //$NON-NLS-1$
+ target.getEAnnotations().add(shortcutAnnotation);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Node createLabel(View owner, String hint) {
+ DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode();
+ rv.setType(hint);
+ ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
+ return rv;
+ }
+
+ /**
+ * @generated
+ */
+ protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) {
+ // SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
+ // rv.setShowTitle(showTitle);
+ // rv.setCollapsed(isCollapsed);
+ Node rv;
+ if (canCollapse) {
+ rv = NotationFactory.eINSTANCE.createBasicCompartment();
+ } else {
+ rv = NotationFactory.eINSTANCE.createDecorationNode();
+ }
+ rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ if (hasTitle) {
+ TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle();
+ rv.getStyles().add(ts);
+ }
+ if (canSort) {
+ rv.getStyles().add(NotationFactory.eINSTANCE.createSortingStyle());
+ }
+ if (canFilter) {
+ rv.getStyles().add(NotationFactory.eINSTANCE.createFilteringStyle());
+ }
+ rv.setType(hint);
+ ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
+ return rv;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getSemanticElement(IAdaptable semanticAdapter) {
+ if (semanticAdapter == null) {
+ return null;
+ }
+ EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
+ if (eObject != null) {
+ return EMFCoreUtil.resolve(TransactionUtil.getEditingDomain(eObject), eObject);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected IElementType getSemanticElementType(IAdaptable semanticAdapter) {
+ if (semanticAdapter == null) {
+ return null;
+ }
+ return (IElementType) semanticAdapter.getAdapter(IElementType.class);
+ }
+
+ /**
+ * @generated
+ */
+ 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);
+ viewFontStyle.setFontName(fontData.getName());
+ 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());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void initForegroundFromPrefs(View view, final IPreferenceStore store, String elementName) {
+ String lineColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_LINE);
+ org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(store, lineColorConstant);
+ ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB));
+ }
+
+ /**
+ * @generated
+ */
+ private void initBackgroundFromPrefs(View view, final IPreferenceStore store, String elementName) {
+ 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());
+ ;
+ 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.clazz/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF
index 7623833aa70..5ae6c817401 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF
@@ -1,100 +1,97 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.diagram.clazz,
- org.eclipse.papyrus.uml.diagram.clazz.custom.action,
- org.eclipse.papyrus.uml.diagram.clazz.custom.command,
- org.eclipse.papyrus.uml.diagram.clazz.custom.edit.actions,
- org.eclipse.papyrus.uml.diagram.clazz.custom.edit.commands,
- org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part,
- org.eclipse.papyrus.uml.diagram.clazz.custom.factory,
- org.eclipse.papyrus.uml.diagram.clazz.custom.figure,
- org.eclipse.papyrus.uml.diagram.clazz.custom.helper,
- org.eclipse.papyrus.uml.diagram.clazz.custom.helper.advice,
- org.eclipse.papyrus.uml.diagram.clazz.custom.locator,
- org.eclipse.papyrus.uml.diagram.clazz.custom.parsers,
- org.eclipse.papyrus.uml.diagram.clazz.custom.policies,
- org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic,
- org.eclipse.papyrus.uml.diagram.clazz.custom.preferences,
- org.eclipse.papyrus.uml.diagram.clazz.custom.providers,
- org.eclipse.papyrus.uml.diagram.clazz.custom.ui,
- org.eclipse.papyrus.uml.diagram.clazz.custom.utils,
- org.eclipse.papyrus.uml.diagram.clazz.edit.commands,
- org.eclipse.papyrus.uml.diagram.clazz.edit.helpers,
- org.eclipse.papyrus.uml.diagram.clazz.edit.parts,
- org.eclipse.papyrus.uml.diagram.clazz.edit.policies,
- org.eclipse.papyrus.uml.diagram.clazz.expressions,
- org.eclipse.papyrus.uml.diagram.clazz.navigator,
- org.eclipse.papyrus.uml.diagram.clazz.parsers,
- org.eclipse.papyrus.uml.diagram.clazz.part,
- org.eclipse.papyrus.uml.diagram.clazz.providers
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.eclipse.core.expressions,
- org.eclipse.ui.navigator,
- org.eclipse.ui.navigator.resources,
- org.eclipse.gmf.runtime.diagram.ui.properties,
- org.eclipse.gmf.runtime.diagram.ui.render,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,
- org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.1.0",
- org.eclipse.ocl.ecore,
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.1.0",
- org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.3.0",
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.gmf.runtime.emf.core,
- org.eclipse.gmf.runtime.emf.commands.core,
- org.eclipse.gmf.runtime.emf.ui.properties,
- org.eclipse.gmf.runtime.diagram.ui,
- org.eclipse.gmf.runtime.diagram.ui.providers.ide,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.uml2.uml,
- org.eclipse.gmf.runtime.draw2d.ui,
- org.eclipse.ui,
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.appearance;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.1.0",
- org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
- org.eclipse.gmf.tooling.runtime;bundle-version="3.1.0",
- org.eclipse.jface,
- org.eclipse.ui.views,
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.xmi,
- org.eclipse.emf.edit.ui,
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.emf.ecore.edit;visibility:=reexport,
- org.eclipse.emf.validation;visibility:=reexport,
- org.eclipse.gef,
- org.apache.batik.dom.svg;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.util;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.svggen;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.dom;bundle-version="[1.6.0,1.7.0)",
- org.w3c.dom.svg,
- org.apache.batik.css;bundle-version="[1.6.0,1.7.0)",
- org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0"
-Bundle-Vendor: %providerName
-Eclipse-LazyStart: true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagra
- mEditorPlugin
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.clazz;singleton:=
- true
-
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.uml.diagram.clazz,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.action,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.command,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.edit.actions,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.edit.commands,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.factory,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.figure,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.helper,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.helper.advice,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.locator,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.parsers,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.policies,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.preferences,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.providers,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.ui,
+ org.eclipse.papyrus.uml.diagram.clazz.custom.utils,
+ org.eclipse.papyrus.uml.diagram.clazz.edit.commands,
+ org.eclipse.papyrus.uml.diagram.clazz.edit.helpers,
+ org.eclipse.papyrus.uml.diagram.clazz.edit.parts,
+ org.eclipse.papyrus.uml.diagram.clazz.edit.policies,
+ org.eclipse.papyrus.uml.diagram.clazz.expressions,
+ org.eclipse.papyrus.uml.diagram.clazz.navigator,
+ org.eclipse.papyrus.uml.diagram.clazz.parsers,
+ org.eclipse.papyrus.uml.diagram.clazz.part,
+ org.eclipse.papyrus.uml.diagram.clazz.providers
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.expressions,
+ org.eclipse.ui.navigator,
+ org.eclipse.ui.navigator.resources,
+ org.eclipse.gmf.runtime.diagram.ui.properties,
+ org.eclipse.gmf.runtime.diagram.ui.render,
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,
+ org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.1.0",
+ org.eclipse.ocl.ecore,
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.1.0",
+ org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.3.0",
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.gmf.runtime.emf.core,
+ org.eclipse.gmf.runtime.emf.commands.core,
+ org.eclipse.gmf.runtime.emf.ui.properties,
+ org.eclipse.gmf.runtime.diagram.ui,
+ org.eclipse.gmf.runtime.diagram.ui.providers.ide,
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor,
+ org.eclipse.uml2.uml,
+ org.eclipse.gmf.runtime.draw2d.ui,
+ org.eclipse.ui,
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.appearance;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.1.0",
+ org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
+ org.eclipse.gmf.tooling.runtime;bundle-version="3.1.0",
+ org.eclipse.jface,
+ org.eclipse.ui.views,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.emf.edit.ui,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.emf.validation;visibility:=reexport,
+ org.eclipse.gef,
+ org.apache.batik.dom.svg;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.util;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.svggen;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.dom;bundle-version="[1.6.0,1.7.0)",
+ org.w3c.dom.svg,
+ org.apache.batik.css;bundle-version="[1.6.0,1.7.0)",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0"
+Bundle-Vendor: %providerName
+Eclipse-LazyStart: true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorPlugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.clazz; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/AbstractObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/AbstractObservationEditPart.java
deleted file mode 100644
index 39936f53404..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/AbstractObservationEditPart.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://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.clazz.custom.edit.part;
-
-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.GraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editparts.IUMLNamedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-
-/**
- *
- *
- */
-public abstract class AbstractObservationEditPart extends NamedElementEditPart implements IUMLNamedElementEditPart {
-
- public AbstractObservationEditPart(View view) {
- super(view);
- }
-
- /**
- *
- * {@inheritDoc}
- */
- @Override
- protected void refreshBounds() {
- int width = 20;
- int height = 20;
- 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));
- }
-
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- // set the figure active when the feature of the of a class is true
- if (resolveSemanticElement() != null) {
- refreshFontColor();
- // To adapt the display of the container to the icon!
- refreshBounds();
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CAssociationNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CAssociationNodeEditPart.java
deleted file mode 100644
index 86c0d0fe1d2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CAssociationNodeEditPart.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part;
-
-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.uml.diagram.clazz.edit.parts.AssociationNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.AssociationNodeFigure;
-
-/**
- * this a specific editpart used to overload the method createNodePlate
- */
-public class CAssociationNodeEditPart extends AssociationNodeEditPart {
-
- public CAssociationNodeEditPart(View view) {
- super(view);
- }
-
- /**
- *
- * @return
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new AssociationNodeFigure(20, 20);
- return result;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CDependencyNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CDependencyNodeEditPart.java
deleted file mode 100644
index 01f818170bd..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CDependencyNodeEditPart.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part;
-
-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.uml.diagram.clazz.edit.parts.DependencyNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.AssociationNodeFigure;
-
-/**
- * this a specific editpart used to overload the method createNodePlate
- */
-public class CDependencyNodeEditPart extends DependencyNodeEditPart {
-
- public CDependencyNodeEditPart(View view) {
- super(view);
- }
-
- /**
- *
- * @return
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new AssociationNodeFigure(10, 10);
- return result;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomComponentEditPart.java
new file mode 100644
index 00000000000..4783808bf0e
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomComponentEditPart.java
@@ -0,0 +1,48 @@
+package org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part;
+
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+public class CustomComponentEditPart extends ComponentEditPart {
+
+ public CustomComponentEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ @Override
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(100, 100);
+ return result;
+ }
+
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ // Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomConstraintEditPartCN.java
deleted file mode 100644
index ed2862c82f0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomConstraintEditPartCN.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part;
-
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-
-/**
- * Custom variant. Provides elementType for @see AbstractConstraintEditPart
- */
-public class CustomConstraintEditPartCN extends ConstraintEditPartCN {
-
- public CustomConstraintEditPartCN(View view) {
- super(view);
- }
-
- @Override
- protected IElementType elementTypeOfToolAfterCreation() {
- return UMLElementTypes.ConstraintContext_8500;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomDurationObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomDurationObservationEditPart.java
new file mode 100644
index 00000000000..f08e8d96e66
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomDurationObservationEditPart.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part;
+
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DurationObservationEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomDurationObservationEditPart.
+ */
+public class CustomDurationObservationEditPart extends DurationObservationEditPart {
+
+ /** The Constant FLOATING_NAME_OFFSET_WIDTH. */
+ private static final int FLOATING_NAME_OFFSET_WIDTH = 25;
+
+ /** The Constant FLOATING_NAME_OFFSET_HEIGHT. */
+ private static final int FLOATING_NAME_OFFSET_HEIGHT = 3;
+
+ /**
+ * Instantiates a new edit part.
+ *
+ * @param view
+ * the view
+ */
+ public CustomDurationObservationEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * Creates the node plate.
+ *
+ * @return the node figure
+ * @see org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPart#createNodePlate()
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ // Use custom node plate
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(20, 20);
+ return result;
+ }
+
+ /**
+ * Adds the border item.
+ *
+ * @param borderItemContainer
+ * the border item container
+ * @param borderItemEditPart
+ * the border item edit part
+ * @see org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ // if it's a floating name
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.EAST);
+ // Offset from the parent for the constraint case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetHeight()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetHeight() {
+ return FLOATING_NAME_OFFSET_HEIGHT;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetWidth()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return FLOATING_NAME_OFFSET_WIDTH;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomDurationObservationFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomDurationObservationFloatingNameEditPart.java
new file mode 100644
index 00000000000..9a068843f65
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomDurationObservationFloatingNameEditPart.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part;
+
+
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DurationObservationFloatingNameEditPart;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class CDataTypeEditPart.
+ */
+public class CustomDurationObservationFloatingNameEditPart extends DurationObservationFloatingNameEditPart {
+
+ private static final boolean LABEL_DISPLAYED_VALUE = true;
+
+ /**
+ * Instantiates a new edit part.
+ *
+ * @param view
+ * the view
+ */
+ public CustomDurationObservationFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected boolean getDefaultLabelVisibility() {
+ return LABEL_DISPLAYED_VALUE;
+ }
+
+ /**
+ * Gets the default text alignment.
+ *
+ * @return the default text alignment
+ */
+ @Override
+ protected int getDefaultTextAlignment() {
+ return PositionConstants.LEFT;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomTimeObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomTimeObservationEditPart.java
new file mode 100644
index 00000000000..9f1747c99e3
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomTimeObservationEditPart.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TimeObservationEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+
+/**
+ * The Class CustomTimeObservationEditPart.
+ */
+public class CustomTimeObservationEditPart extends TimeObservationEditPart {
+
+ /** The Constant FLOATING_NAME_OFFSET_WIDTH. */
+ private static final int FLOATING_LABEL_OFFSET_WIDTH = 25;
+
+ /** The Constant FLOATING_NAME_OFFSET_HEIGHT. */
+ private static final int FLOATING_LABEL_OFFSET_HEIGHT = 3;
+
+ /**
+ * Instantiates a new edit part.
+ *
+ * @param view
+ * the view
+ */
+ public CustomTimeObservationEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ }
+
+ /**
+ * Creates the node plate.
+ *
+ * @return the node figure
+ * @see org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPart#createNodePlate()
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ // Use custom node plate
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(20, 20);
+ return result;
+ }
+
+ /**
+ * Adds the border item.
+ *
+ * @param borderItemContainer
+ * the border item container
+ * @param borderItemEditPart
+ * the border item edit part
+ * @see org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPart#addBorderItem(org.eclipse.draw2d.IFigure, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart)
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ // if it's a floating name
+ if (borderItemEditPart instanceof FloatingLabelEditPart) {
+ // Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.EAST);
+ // Offset from the parent for the constraint case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetHeight()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetHeight() {
+ return FLOATING_LABEL_OFFSET_HEIGHT;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultFloatingLabelOffsetWidth()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return FLOATING_LABEL_OFFSET_WIDTH;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomTimeObservationFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomTimeObservationFloatingNameEditPart.java
new file mode 100644
index 00000000000..e974ed5d4f3
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomTimeObservationFloatingNameEditPart.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part;
+
+
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TimeObservationFloatingNameEditPart;
+
+/**
+ * The Class CDataTypeEditPart.
+ */
+public class CustomTimeObservationFloatingNameEditPart extends TimeObservationFloatingNameEditPart {
+
+ private static final boolean LABEL_DISPLAYED_VALUE = true;
+
+ /**
+ * Instantiates a new edit part.
+ *
+ * @param view
+ * the view
+ */
+ public CustomTimeObservationFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ @Override
+ protected boolean getDefaultLabelVisibility() {
+ return LABEL_DISPLAYED_VALUE;
+ }
+
+ /**
+ * Gets the default text alignment.
+ *
+ * @return the default text alignment
+ */
+ @Override
+ protected int getDefaultTextAlignment() {
+ return PositionConstants.LEFT;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/factory/CustomUMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/factory/CustomUMLEditPartFactory.java
index 66aadb6c2a0..3405d3f07cf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/factory/CustomUMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/factory/CustomUMLEditPartFactory.java
@@ -19,34 +19,32 @@ import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AssociationEndSour
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AssociationEndTargetEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CAssociationClassEndSourceEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CAssociationClassEndTargetEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CAssociationNodeEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CContainmentCircleEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CDependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CDependencyNodeEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CModelEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CModelEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CPackageEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CPackageEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomDurationObservationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomTimeObservationNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomDurationObservationEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomDurationObservationFloatingNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomTimeObservationEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomTimeObservationFloatingNameEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleSourceEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleTargetEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationNodeEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationSourceNameEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationTargetNameEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ContainmentCircleEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DurationObservationNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DurationObservationEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DurationObservationFloatingNameEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartTN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TimeObservationNameEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TimeObservationEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TimeObservationFloatingNameEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.UMLEditPartFactory;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
@@ -63,6 +61,14 @@ public class CustomUMLEditPartFactory extends UMLEditPartFactory {
// redefined classes to modify the method createNodePlate
case PackageEditPart.VISUAL_ID:
return new CPackageEditPart(view);
+ case DurationObservationEditPart.VISUAL_ID:
+ return new CustomDurationObservationEditPart(view);
+ case TimeObservationEditPart.VISUAL_ID:
+ return new CustomTimeObservationEditPart(view);
+ case DurationObservationFloatingNameEditPart.VISUAL_ID:
+ return new CustomDurationObservationFloatingNameEditPart(view);
+ case TimeObservationFloatingNameEditPart.VISUAL_ID:
+ return new CustomTimeObservationFloatingNameEditPart(view);
case PackageEditPartCN.VISUAL_ID:
return new CPackageEditPartCN(view);
case ModelEditPartTN.VISUAL_ID:
@@ -71,10 +77,6 @@ public class CustomUMLEditPartFactory extends UMLEditPartFactory {
return new CContainmentCircleEditPart(view);
case ModelEditPartCN.VISUAL_ID:
return new CModelEditPartCN(view);
- case AssociationNodeEditPart.VISUAL_ID:
- return new CAssociationNodeEditPart(view);
- case DependencyNodeEditPart.VISUAL_ID:
- return new CDependencyNodeEditPart(view);
case AssociationSourceNameEditPart.VISUAL_ID:
return new AssociationEndSourceEditPart(view);
case AssociationTargetNameEditPart.VISUAL_ID:
@@ -87,12 +89,6 @@ public class CustomUMLEditPartFactory extends UMLEditPartFactory {
return new CDependencyBranchEditPart(view);
case ConstraintEditPart.VISUAL_ID:
return new CustomConstraintEditPart(view);
- case ConstraintEditPartCN.VISUAL_ID:
- return new CustomConstraintEditPartCN(view);
- case DurationObservationNameEditPart.VISUAL_ID:
- return new CustomDurationObservationNameEditPart(view);
- case TimeObservationNameEditPart.VISUAL_ID:
- return new CustomTimeObservationNameEditPart(view);
}
}
return super.createEditPart(context, model);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/AbstractObservationNodeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/AbstractObservationNodeFigure.java
deleted file mode 100644
index 258e1867b50..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/AbstractObservationNodeFigure.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://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.clazz.custom.figure;
-
-import java.util.List;
-
-import org.eclipse.draw2d.AbstractLayout;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.ToolbarLayout;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Provides stereotype and name management for {@link TimeObservationNodeFigure} and {@link DurationObservationNodeFigure}
- */
-public class AbstractObservationNodeFigure extends NodeNamedElementFigure {
-
- /** Plug-in ID where UML2 icons can be found */
- public static final String ID = "org.eclipse.uml2.uml.edit"; //$NON-NLS-1$
-
- /** Icons relative path for UML2 elements in org.eclipse.uml2.uml.edit */
- public static final String PATH = "/icons/full/obj16/"; //$NON-NLS-1$
-
- /**
- * Figure layout manager
- *
- */
- protected class AbstractObservationLayoutManager extends AbstractLayout {
-
- /**
- *
- * {@inheritDoc}
- */
- @Override
- protected Dimension calculatePreferredSize(IFigure container, int hint, int hint2) {
- int minimumWidth = 0;
- int minimumHeight = 0;
- // Adapt the container to the contents
- for (int i = 0; i < container.getChildren().size(); i++) {
- // we ignore the stereotype Label and the qualified name label
- if (container.getChildren().get(i) instanceof Label) {
- // Do nothing
- } else {
- minimumHeight = minimumHeight + ((IFigure) container.getChildren().get(i)).getPreferredSize().height + 2;
- minimumWidth = minimumWidth + ((IFigure) container.getChildren().get(i)).getPreferredSize().width + 1;
- }
- }
- return new Dimension(minimumWidth, minimumHeight);
- }
-
- /**
- *
- * {@inheritDoc}
- */
- @Override
- public void layout(IFigure container) {
- List<?> childrenList = container.getChildren();
- for (int i = 0; i < container.getChildren().size(); i++) {
- // stereotype and qualified name labels are not displayed
- if (container.getChildren().get(i) instanceof Label) {
- ((IFigure) container.getChildren().get(i)).setVisible(false);
- }
- Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds());
- bound.setSize(((IFigure) childrenList.get(i)).getPreferredSize());
- if (i > 0) {
- bound.y = container.getBounds().y + 2;
- bound.x = container.getBounds().x + 2;
- }
- ((IFigure) childrenList.get(i)).setBounds(bound);
- }
- }
- }
-
- /**
- * Label for figure icon
- */
- protected WrappingLabel iconLabel;
-
- /**
- * Constructor
- */
- public AbstractObservationNodeFigure() {
- super();
- this.iconLabel = new WrappingLabel("");
- this.add(this.iconLabel);
- ToolbarLayout toolbarLayout = new ToolbarLayout();
- toolbarLayout.setSpacing(5);
- toolbarLayout.setHorizontal(true);
- this.setLayoutManager(new AbstractObservationLayoutManager());
- }
-
- /**
- * Get the figure icon container
- *
- * @return the icon label
- */
- public WrappingLabel getIconContainer() {
- return iconLabel;
- }
-
- /**
- * Set the icon in the figure
- *
- * @param image
- */
- public void setIcon(Image image) {
- getIconContainer().setIcon(image, 0);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/DurationObservationNodeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/DurationObservationNodeFigure.java
deleted file mode 100644
index f399ffdbcaa..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/DurationObservationNodeFigure.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://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.clazz.custom.figure;
-
-import org.eclipse.papyrus.uml.diagram.common.Activator;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Figure for DurationObservation
- */
-public class DurationObservationNodeFigure extends AbstractObservationNodeFigure {
-
- public static final String IMAGE_DURATION = "DurationObservation.gif"; //$NON-NLS-1$
-
- @Override
- public void setAppliedStereotypeIcon(Image image) {
- if (image == null) {
- setIcon(Activator.getPluginIconImage(ID, PATH + IMAGE_DURATION));
- } else {
- setIcon(image);
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/TimeObservationNodeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/TimeObservationNodeFigure.java
deleted file mode 100644
index 2af8318d30c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/TimeObservationNodeFigure.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://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.clazz.custom.figure;
-
-import org.eclipse.papyrus.uml.diagram.common.Activator;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Figure for TimeObservation
- */
-public class TimeObservationNodeFigure extends AbstractObservationNodeFigure {
-
- public static final String IMAGE_OBSERVATION = "TimeObservation.gif"; //$NON-NLS-1$
-
- @Override
- public void setAppliedStereotypeIcon(Image image) {
- if (image == null) {
- setIcon(Activator.getPluginIconImage(ID, PATH + IMAGE_OBSERVATION));
- } else {
- setIcon(image);
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/InformationItemFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/nodes/InformationItemFigure.java
index 0074916fe96..acce3c9b979 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/InformationItemFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/nodes/InformationItemFigure.java
@@ -1,38 +1,38 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://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.clazz.custom.figure;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.papyrus.uml.diagram.common.figure.node.CompartmentFigure;
-
-/**
- * Figure for Composite representation of InformationItem.
- */
-public class InformationItemFigure extends CompartmentFigure {
-
- /** Value of the textual tag added to the figure. */
- private static String TAG_LABEL = "Information"; //$NON-NLS-1$
-
- /** The List of Compartment */
- private final static List<String> NO_COMPARTMENT = new ArrayList<String>();
-
- /**
- * Creates a new InformationItemFigure.
- */
- public InformationItemFigure() {
- super(NO_COMPARTMENT, TAG_LABEL);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://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.clazz.custom.figure.nodes;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+
+/**
+ * Figure for Composite representation of InformationItem.
+ */
+public class InformationItemFigure extends RoundedCompartmentFigure {
+
+ /** Value of the textual tag added to the figure. */
+ private static String TAG_LABEL = "Information"; //$NON-NLS-1$
+
+ /** The List of Compartment */
+ private final static List<String> NO_COMPARTMENT = new ArrayList<String>();
+
+ /**
+ * Creates a new InformationItemFigure.
+ */
+ public InformationItemFigure() {
+ super(NO_COMPARTMENT, TAG_LABEL);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/ObservationLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/ObservationLayoutEditPolicy.java
index 82e59e332a7..06a19dee106 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/ObservationLayoutEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/ObservationLayoutEditPolicy.java
@@ -1,65 +1,61 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.policies;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DurationObservationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DurationObservationStereotypeLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TimeObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TimeObservationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TimeObservationStereotypeLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-
-/**
- * This edit policy replaces the GMF generated edit policy for Observations.
- * In particular it installs {@link ExternalLabelPrimaryDragRoleEditPolicy} on
- * children that are external label.
- * The code generated by GMF can be found in {@link TimeObservationEditPart#createLayoutEditPolicy()}.
- */
-public class ObservationLayoutEditPolicy extends LayoutEditPolicy {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case DurationObservationNameEditPart.VISUAL_ID:
- case DurationObservationStereotypeLabelEditPart.VISUAL_ID:
- case TimeObservationNameEditPart.VISUAL_ID:
- case TimeObservationStereotypeLabelEditPart.VISUAL_ID:
- return new ExternalLabelPrimaryDragRoleEditPolicy();
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.custom.policies;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DurationObservationStereotypeLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TimeObservationEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TimeObservationStereotypeLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+
+/**
+ * This edit policy replaces the GMF generated edit policy for Observations.
+ * In particular it installs {@link ExternalLabelPrimaryDragRoleEditPolicy} on
+ * children that are external label.
+ * The code generated by GMF can be found in {@link TimeObservationEditPart#createLayoutEditPolicy()}.
+ */
+public class ObservationLayoutEditPolicy extends LayoutEditPolicy {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case DurationObservationStereotypeLabelEditPart.VISUAL_ID:
+ case TimeObservationStereotypeLabelEditPart.VISUAL_ID:
+ return new ExternalLabelPrimaryDragRoleEditPolicy();
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen
index b334b6173a7..c21e2540986 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen
@@ -1,8216 +1,8796 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
- xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
- <gmfgen:GenEditorGenerator
- packageNamePrefix="org.eclipse.papyrus.uml.diagram.clazz"
- modelID="PapyrusUMLClassDiagram"
- domainFileExtension="PapyrusUMLClass"
- dynamicTemplates="true"
- templateDirectory="/org.eclipse.papyrus.def/xtend/"
- copyrightText="Copyright (c) 2014 CEA LIST.&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation">
- <diagram
- visualID="1000"
- editPartClassName="ModelEditPart"
- itemSemanticEditPolicyClassName="ModelItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ModelCanonicalEditPolicy"
- iconProviderPriority="Low"
- validationEnabled="true"
- validationDecorators="true"
- liveValidationUIFeedback="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="PackageEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AbstractShowHideRelatedLinkEditPolicy.SHOW_HIDE_RELATED_LINK_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ShowHideRelatedLinkEditPolicy"/>
- <domainDiagramElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3012"
- editPartClassName="PropertyForClassEditPart"
- itemSemanticEditPolicyClassName="PropertyForClassItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PropertyForClassCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PropertyForClassGraphicalNodeEditPolicy"
- createCommandClassName="PropertyForClassCreateCommand"
- containers="/0/@diagram/@compartments.18 /0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.1/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.PropertyFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedAttribute"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedAttribute"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3002"
- editPartClassName="PropertyForComponentEditPart"
- itemSemanticEditPolicyClassName="PropertyForComponentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PropertyCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PropertyForComponentGraphicalNodeEditPolicy"
- createCommandClassName="PropertyForComponentCreateCommand"
- containers="/0/@diagram/@compartments.21 /0/@diagram/@compartments.3 /0/@diagram/@compartments.31">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="PropertyEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.PropertyFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedAttribute"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedAttribute"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3005"
- editPartClassName="PropertyForSignalEditPart"
- itemSemanticEditPolicyClassName="PropertyForSignalItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PropertyForSignalCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PropertyForSignalGraphicalNodeEditPolicy"
- createCommandClassName="PropertyForSignalCreateCommand"
- containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.33">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.1/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.PropertyFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal/ownedAttribute"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal/ownedAttribute"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.3/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/MultiplicityElement/lower"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.3/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/MultiplicityElement/upper"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3006"
- editPartClassName="PropertyForInterfaceEditPart"
- itemSemanticEditPolicyClassName="PropertyForInterfaceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PropertyForInterfaceCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PropertyForInterfaceGraphicalNodeEditPolicy"
- createCommandClassName="PropertyForInterfaceCreateCommand"
- containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.24">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.1/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.PropertyFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/ownedAttribute"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/ownedAttribute"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3041"
- editPartClassName="PropertyforPrimitiveTypeEditPart"
- itemSemanticEditPolicyClassName="PropertyforPrimitiveTypeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PropertyforPrimitiveTypeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PropertyforPrimitiveTypeGraphicalNodeEditPolicy"
- createCommandClassName="PropertyforPrimitiveTypeCreateCommand"
- containers="/0/@diagram/@compartments.27 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.1/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.PropertyFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedAttribute"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedAttribute"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3018"
- editPartClassName="PropertyforDataTypeEditPart"
- itemSemanticEditPolicyClassName="PropertyforDataTypeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PropertyforDataTypeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PropertyforDataTypeGraphicalNodeEditPolicy"
- createCommandClassName="PropertyforDataTypeCreateCommand"
- containers="/0/@diagram/@compartments.29 /0/@diagram/@compartments.12">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.1/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.PropertyFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedAttribute"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedAttribute"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3014"
- editPartClassName="NestedClassForClassEditPart"
- itemSemanticEditPolicyClassName="NestedClassForClassItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedClassForClassCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedClassForClassGraphicalNodeEditPolicy"
- createCommandClassName="NestedClassForClassCreateCommand"
- containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.20"
- labelElementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.7/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3004"
- editPartClassName="NestedClassForComponentEditPart"
- itemSemanticEditPolicyClassName="NestedClassForComponentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedClassForComponentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedClassForComponentGraphicalNodeEditPolicy"
- createCommandClassName="NestedClassForComponentCreateCommand"
- containers="/0/@diagram/@compartments.23 /0/@diagram/@compartments.5 /0/@diagram/@compartments.38"
- labelElementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ClassEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3008"
- editPartClassName="NestedClassForInterfaceEditPart"
- itemSemanticEditPolicyClassName="NestedClassForInterfaceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedClassForInterfaceCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedClassForInterfaceGraphicalNodeEditPolicy"
- createCommandClassName="NestedClassForInterfaceCreateCommand"
- containers="/0/@diagram/@compartments.26 /0/@diagram/@compartments.9"
- labelElementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.7/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3013"
- editPartClassName="OperationForClassEditPart"
- itemSemanticEditPolicyClassName="OperationForClassItemSemanticEditPolicy"
- canonicalEditPolicyClassName="OperationForClassCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OperationForClassGraphicalNodeEditPolicy"
- createCommandClassName="OperationForClassCommand"
- containers="/0/@diagram/@compartments.19 /0/@diagram/@compartments.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.10/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.OperationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedOperation"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedOperation"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3003"
- editPartClassName="OperationForComponentEditPart"
- itemSemanticEditPolicyClassName="OperationItemSemanticEditPolicy"
- canonicalEditPolicyClassName="OperationForComponentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OperationForComponentGraphicalNodeEditPolicy"
- createCommandClassName="OperationForComponentCreateCommand"
- containers="/0/@diagram/@compartments.22 /0/@diagram/@compartments.4 /0/@diagram/@compartments.37">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="OperationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.OperationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedOperation"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedOperation"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3007"
- editPartClassName="OperationForInterfaceEditpart"
- itemSemanticEditPolicyClassName="OperationForInterfaceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="OperationForInterfaceCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OperationForInterfaceGraphicalNodeEditPolicy"
- createCommandClassName="OperationForInterfaceCreateCommand"
- containers="/0/@diagram/@compartments.25 /0/@diagram/@compartments.8">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.10/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.OperationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/ownedOperation"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/ownedOperation"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3042"
- editPartClassName="OperationForPrimitiveTypeEditPart"
- itemSemanticEditPolicyClassName="OperationForPrimitiveTypeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="OperationForPrimitiveTypeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OperationForPrimitiveTypeGraphicalNodeEditPolicy"
- createCommandClassName="OperationForPrimitiveTypeCreateCommand"
- containers="/0/@diagram/@compartments.28 /0/@diagram/@compartments.11">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.10/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.OperationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedOperation"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedOperation"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3019"
- editPartClassName="OperationForDataTypeEditPart"
- itemSemanticEditPolicyClassName="OperationForDataTypeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="OperationForDataTypeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OperationForDataTypeGraphicalNodeEditPolicy"
- createCommandClassName="OperationForDataTypeCreateCommand"
- containers="/0/@diagram/@compartments.13 /0/@diagram/@compartments.30">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.10/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.OperationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedOperation"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedOperation"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3034"
- editPartClassName="ConnectableElementTemplateParameterEditPart"
- itemSemanticEditPolicyClassName="ConnectableElementTemplateParameterItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ConnectableElementTemplateParameterCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ConnectableElementTemplateParameterGraphicalNodeEditPolicy"
- createCommandClassName="ConnectableElementTemplateParameterCreateCommand"
- containers="/0/@diagram/@compartments.39">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ClassifierTemplateParameterEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateParameterFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy.TEMPLATE_PARAMETER_DISPLAY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ConnectableElementTemplateParameter"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/ownedParameter"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/parameter"/>
- </modelFacet>
- <labelModelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3035"
- editPartClassName="OperationTemplateParameterEditPart"
- itemSemanticEditPolicyClassName="OperationTemplateParameterItemSemanticEditPolicy"
- canonicalEditPolicyClassName="OperationTemplateParameterCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="OperationTemplateParameterGraphicalNodeEditPolicy"
- createCommandClassName="OperationTemplateParameterCreateCommand"
- containers="/0/@diagram/@compartments.40 /0/@diagram/@compartments.39">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ClassifierTemplateParameterEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateParameterFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy.TEMPLATE_PARAMETER_DISPLAY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.OperationTemplateParamaterDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OperationTemplateParameter"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/ownedParameter"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/parameter"/>
- </modelFacet>
- <labelModelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3031"
- editPartClassName="ClassifierTemplateParameterEditPart"
- itemSemanticEditPolicyClassName="ClassifierTemplateParameterItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ClassifierTemplateParameterCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ClassifierTemplateParameterGraphicalNodeEditPolicy"
- createCommandClassName="ClassifierTemplateParameterCreateCommand"
- containers="/0/@diagram/@compartments.39 /0/@diagram/@compartments.40">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ClassifierTemplateParameterEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateParameterFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy.TEMPLATE_PARAMETER_DISPLAY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ClassifierTemplateParameter"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/ownedParameter"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/parameter"/>
- </modelFacet>
- <labelModelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3016"
- editPartClassName="TemplateParameterEditPart"
- itemSemanticEditPolicyClassName="TemplateParameterItemSemanticEditPolicy"
- canonicalEditPolicyClassName="TemplateParameterCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="TemplateParameterGraphicalNodeEditPolicy"
- createCommandClassName="TemplateParameterCreateCommand"
- containers="/0/@diagram/@compartments.39 /0/@diagram/@compartments.40">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="TemplateParameterEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateParameterFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy.TEMPLATE_PARAMETER_DISPLAY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateParameter"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/ownedParameter"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/parameter"/>
- </modelFacet>
- <labelModelFacet
- parser="/0/@labelParsers/@implementations.6"/>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3017"
- editPartClassName="EnumerationLiteralEditPart"
- itemSemanticEditPolicyClassName="EnumerationLiteralItemSemanticEditPolicy"
- canonicalEditPolicyClassName="EnumerationLiteralCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="EnumerationLiteralGraphicalNodeEditPolicy"
- createCommandClassName="EnumerationLiteralCreateCommand"
- containers="/0/@diagram/@compartments.16 /0/@diagram/@compartments.36"
- labelElementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="EnumerationLiteralEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.LiteralEnumerationFigure"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/EnumerationLiteral"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration/ownedLiteral"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration/ownedLiteral"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3011"
- editPartClassName="ReceptionEditPart"
- itemSemanticEditPolicyClassName="ReceptionItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ReceptionCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ReceptionGraphicalNodeEditPolicy"
- createCommandClassName="ReceptionCreateCommand"
- containers="/0/@diagram/@compartments.19 /0/@diagram/@compartments.1 /0/@diagram/@compartments.4 /0/@diagram/@compartments.22"
- labelElementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ReceptionEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.ReceptionFigure"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Reception"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedReception"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedReception"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="\u00ABSignal\u00BB {0}"
- editorPattern="{0}"
- editPattern="{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3039"
- editPartClassName="ReceptionInInterfaceEditPart"
- itemSemanticEditPolicyClassName="ReceptionInInterfaceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ReceptionInInterfaceCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ReceptionInInterfaceGraphicalNodeEditPolicy"
- createCommandClassName="ReceptionInInterfaceCreateCommand"
- containers="/0/@diagram/@compartments.8 /0/@diagram/@compartments.25"
- labelElementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ReceptionEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.ReceptionFigure"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Reception"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/ownedReception"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/ownedReception"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="\u00ABSignal\u00BB {0}"
- editorPattern="{0}"
- editPattern="{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3030"
- editPartClassName="SlotEditPart"
- itemSemanticEditPolicyClassName="SlotItemSemanticEditPolicy"
- canonicalEditPolicyClassName="SlotCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="SlotGraphicalNodeEditPolicy"
- createCommandClassName="SlotCreateCommand"
- containers="/0/@diagram/@compartments.32 /0/@diagram/@compartments.17">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Slot_3030"
- displayName="Slot"
- editHelperClassName="SlotEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.SlotDisplayEditPolicy.SLOT_DISPLAY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.SlotDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Slot"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification/slot"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification/slot"/>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.5"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Slot/definingFeature"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3015"
- editPartClassName="RedefinableTemplateSignatureEditPart"
- itemSemanticEditPolicyClassName="RedefinableTemplateSignatureItemSemanticEditPolicy"
- canonicalEditPolicyClassName="RedefinableTemplateSignatureCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.39"
- graphicalNodeEditPolicyClassName="RedefinableTemplateSignatureGraphicalNodeEditPolicy"
- createCommandClassName="RedefinableTemplateSignatureCreateCommand"
- containers="/0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.27 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.13 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.35 /0/@diagram/@topLevelNodes.6 /0/@diagram/@topLevelNodes.9 /0/@diagram/@childNodes.29 /0/@diagram/@topLevelNodes.11 /0/@diagram/@topLevelNodes.4"
- preferredSideName="EAST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="RedefinableTemplateSignatureEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomRedefinableTemplateSignatureItemSemanticEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/RedefinableTemplateSignature"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateableElement/ownedTemplateSignature"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateableElement/ownedTemplateSignature"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3032"
- editPartClassName="ContainmentCircleEditPart"
- itemSemanticEditPolicyClassName="ContainmentCircleItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ContainmentCircleCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ContainmentCircleGraphicalNodeEditPolicy"
- createCommandClassName="ContainmentCircleCreateCommand"
- containers="/0/@diagram/@topLevelNodes.11"
- preferredSideName="NORTH">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:NotationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.ContainmentCircle_3032"
- displayName="ContainmentCircle"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.ContainmentFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="20"
- height="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomContainmentCircleItemSemanticEditPolicy"/>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="3033"
- editPartClassName="TemplateSignatureEditPart"
- itemSemanticEditPolicyClassName="TemplateSignatureItemSemanticEditPolicy"
- canonicalEditPolicyClassName="TemplateSignatureCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.40"
- graphicalNodeEditPolicyClassName="TemplateSignatureGraphicalNodeEditPolicy"
- createCommandClassName="TemplateSignatureCreateCommand"
- containers="/0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.9 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.31"
- preferredSideName="EAST">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="RedefinableTemplateSignatureEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomRedefinableTemplateSignatureItemSemanticEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateableElement/ownedTemplateSignature"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateableElement/ownedTemplateSignature"/>
- </modelFacet>
- </childNodes>
- <childNodes
- visualID="3020"
- editPartClassName="InstanceSpecificationEditPartCN"
- itemSemanticEditPolicyClassName="InstanceSpecificationItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="InstanceSpecificationCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.17"
- graphicalNodeEditPolicyClassName="InstanceSpecificationGraphicalNodeEditPolicyCN"
- createCommandClassName="InstanceSpecificationCreateCommandCN"
- containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.3/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.InstanceSpecificationFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInstanceSpecificationItemSemanticEditPolicyCN"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5040"
- editPartClassName="InstanceSpecificationNameEditPartCN"
- itemSemanticEditPolicyClassName="InstanceSpecificationNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InstanceSpecificationNameLabelEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3021"
- editPartClassName="ComponentEditPartCN"
- itemSemanticEditPolicyClassName="ComponentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ComponentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.22"
- compartments="/0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5"
- graphicalNodeEditPolicyClassName="ComponentGraphicalNodeEditPolicyCN"
- createCommandClassName="ComponentCreateCommandCN"
- containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.4/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ComponentFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomComponentItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5043"
- editPartClassName="ComponentNameEditPartCN"
- itemSemanticEditPolicyClassName="ComponentNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3022"
- editPartClassName="SignalEditPartCN"
- itemSemanticEditPolicyClassName="SignalItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="SignalCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.22"
- compartments="/0/@diagram/@compartments.6"
- graphicalNodeEditPolicyClassName="SignalGraphicalNodeEditPolicyCN"
- createCommandClassName="SignalCreateCommandCN"
- containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.5/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.SignalFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomSignalItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5046"
- editPartClassName="SignalNameEditPartCN"
- itemSemanticEditPolicyClassName="SignalNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3023"
- editPartClassName="InterfaceEditPartCN"
- itemSemanticEditPolicyClassName="InterfaceItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="InterfaceCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.22"
- compartments="/0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9"
- graphicalNodeEditPolicyClassName="InterfaceGraphicalNodeEditPolicyCN"
- createCommandClassName="InterfaceCreateCommandCN"
- containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.6/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.InterfaceFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInterfaceItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5049"
- editPartClassName="InterfaceNameEditPartCN"
- itemSemanticEditPolicyClassName="InterfaceNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3024"
- editPartClassName="ModelEditPartCN"
- itemSemanticEditPolicyClassName="ModelItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ModelCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.22 /0/@diagram/@childNodes.24"
- compartments="/0/@diagram/@compartments.14"
- graphicalNodeEditPolicyClassName="ModelGraphicalNodeEditPolicyCN"
- createCommandClassName="ModelCreateCommandCN"
- containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.7/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="200"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomModelItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Model"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5052"
- editPartClassName="ModelNameEditPartCN"
- itemSemanticEditPolicyClassName="ModelNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3025"
- editPartClassName="EnumerationEditPartCN"
- itemSemanticEditPolicyClassName="EnumerationItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="EnumerationCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.16"
- graphicalNodeEditPolicyClassName="EnumerationGraphicalNodeEditPolicyCN"
- createCommandClassName="EnumerationCreateCommandCN"
- containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="EnumerationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomEnumerationItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5055"
- editPartClassName="EnumerationNameEditPartCN"
- itemSemanticEditPolicyClassName="EnumerationNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3009"
- editPartClassName="PackageEditPartCN"
- itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="PackageCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.22 /0/@diagram/@childNodes.24"
- compartments="/0/@diagram/@compartments.15"
- graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicyCN"
- createCommandClassName="PackageCreateCommandCN"
- containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="200"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5017"
- editPartClassName="PackageNameEditPartCN"
- itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3040"
- editPartClassName="InformationItemEditPartCN"
- itemSemanticEditPolicyClassName="InformationItemItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="InformationItemCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="InformationItemGraphicalNodeEditPolicyCN"
- createCommandClassName="InformationItemCreateCommandCN"
- containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.InformationItemFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInformationItemItemSemanticEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InformationItem"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5162"
- editPartClassName="InformationItemNameEditPartCN"
- itemSemanticEditPolicyClassName="InformationItemNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3010"
- editPartClassName="ClassEditPartCN"
- itemSemanticEditPolicyClassName="ClassItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ClassCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.22"
- compartments="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.2"
- graphicalNodeEditPolicyClassName="ClassGraphicalNodeEditPolicyCN"
- createCommandClassName="ClassCreateCommandCN"
- containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.7/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5014"
- editPartClassName="ClassNameEditPartCN"
- itemSemanticEditPolicyClassName="ClassNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3026"
- editPartClassName="PrimitiveTypeEditPartCN"
- itemSemanticEditPolicyClassName="PrimitiveTypeItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="PrimitiveTypeCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.10 /0/@diagram/@compartments.11"
- graphicalNodeEditPolicyClassName="PrimitiveTypeGraphicalNodeEditPolicyCN"
- createCommandClassName="PrimitiveTypeCreateCommandCN"
- containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="PrimitiveTypeEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="50"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5058"
- editPartClassName="PrimitiveTypeNameEditPartCN"
- itemSemanticEditPolicyClassName="PrimitiveTypeNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3027"
- editPartClassName="DataTypeEditPartCN"
- itemSemanticEditPolicyClassName="DataTypeItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="DataTypeCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.22"
- compartments="/0/@diagram/@compartments.12 /0/@diagram/@compartments.13"
- graphicalNodeEditPolicyClassName="DataTypeGraphicalNodeEditPolicyCN"
- createCommandClassName="DataTypeCreateCommandCN"
- containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="DataTypeEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomDataTypeItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5061"
- editPartClassName="DataTypeNameEditPartCN"
- itemSemanticEditPolicyClassName="DataTypeNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3028"
- editPartClassName="CommentEditPartCN"
- itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="CommentCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyCN"
- createCommandClassName="CommentCreateCommandCN"
- containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="CommentEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5063"
- editPartClassName="CommentBodyEditPartCN"
- itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCornerBentFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.7"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3029"
- editPartClassName="ConstraintEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyCN"
- createCommandClassName="ConstraintCreateCommandCN"
- containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ConstraintEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomConstraint2ItemSemanticEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5064"
- editPartClassName="ConstraintNameEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintName2ItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5160"
- editPartClassName="ConstraintBodyEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.8"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3036"
- editPartClassName="NestedInterfaceForClassEditPart"
- itemSemanticEditPolicyClassName="NestedInterfaceForClassItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedInterfaceForClassCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedInterfaceForClassGraphicalNodeEditPolicy"
- createCommandClassName="NestedInterfaceForClassCreateCommand"
- containers="/0/@diagram/@compartments.20 /0/@diagram/@compartments.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.6/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3037"
- editPartClassName="NestedInterfaceForComponentEditPart"
- itemSemanticEditPolicyClassName="NestedInterfaceForComponentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedInterfaceForComponentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedInterfaceForComponentGraphicalNodeEditPolicy"
- createCommandClassName="NestedInterfaceForComponentCreateCommand"
- containers="/0/@diagram/@compartments.23 /0/@diagram/@compartments.5">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_3037"
- displayName="Interface"
- editHelperClassName="InterfaceEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3038"
- editPartClassName="NestedInterfaceForInterfaceEditPart"
- itemSemanticEditPolicyClassName="NestedInterfaceForInterfaceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedInterfaceForInterfaceCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedInterfaceForInterfaceGraphicalNodeEditPolicy"
- createCommandClassName="NestedInterfaceForInterfaceCreateCommand"
- containers="/0/@diagram/@compartments.26 /0/@diagram/@compartments.9">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_3038"
- displayName="Interface"
- metamodelType="/0/@diagram/@childNodes.39/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3052"
- editPartClassName="NestedEnumerationForClassEditPart"
- itemSemanticEditPolicyClassName="NestedEnumerationForClassItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedEnumerationForClassCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedEnumerationForClassGraphicalNodeEditPolicy"
- createCommandClassName="NestedEnumerationForClassCreateCommand"
- containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.20">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3052"
- displayName="Enumeration"
- metamodelType="/0/@diagram/@childNodes.30/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3053"
- editPartClassName="NestedEnumerationForComponentEditPart"
- itemSemanticEditPolicyClassName="NestedEnumerationForComponentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedEnumerationForComponentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedEnumerationForComponentGraphicalNodeEditPolicy"
- createCommandClassName="NestedEnumerationForComponentCreateCommand"
- containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.23">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3053"
- displayName="Enumeration"
- metamodelType="/0/@diagram/@childNodes.30/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3054"
- editPartClassName="NestedEnumerationForInterfaceEditPart"
- itemSemanticEditPolicyClassName="NestedEnumerationForInterfaceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedEnumerationForInterfaceCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedEnumerationForInterfaceGraphicalNodeEditPolicy"
- createCommandClassName="NestedEnumerationForInterfaceCreateCommand"
- containers="/0/@diagram/@compartments.9 /0/@diagram/@compartments.26">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3054"
- displayName="Enumeration"
- metamodelType="/0/@diagram/@childNodes.30/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3047"
- editPartClassName="NestedPrimitiveTypeForClassEditPart"
- itemSemanticEditPolicyClassName="NestedPrimitiveTypeForClassItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedPrimitiveTypeForClassCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedPrimitiveTypeForClassGraphicalNodeEditPolicy"
- createCommandClassName="NestedPrimitiveTypeForClassCreateCommand"
- containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.20">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3047"
- displayName="PrimitiveType"
- metamodelType="/0/@diagram/@childNodes.34/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3046"
- editPartClassName="NestedPrimitiveTypeForComponentEditPart"
- itemSemanticEditPolicyClassName="NestedPrimitiveTypeForComponentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedPrimitiveTypeForComponentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedPrimitiveTypeForComponentGraphicalNodeEditPolicy"
- createCommandClassName="NestedPrimitiveTypeForComponentCreateCommand"
- containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.23">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3046"
- displayName="PrimitiveType"
- metamodelType="/0/@diagram/@childNodes.34/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3048"
- editPartClassName="NestedPrimitiveTypeForInterfaceEditPart"
- itemSemanticEditPolicyClassName="NestedPrimitiveTypeForInterfaceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedPrimitiveTypeForInterfaceCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedPrimitiveTypeForInterfaceGraphicalNodeEditPolicy"
- createCommandClassName="NestedPrimitiveTypeForInterfaceCreateCommand"
- containers="/0/@diagram/@compartments.9 /0/@diagram/@compartments.26">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3048"
- displayName="PrimitiveType"
- metamodelType="/0/@diagram/@childNodes.34/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3044"
- editPartClassName="NestedDataTypeForClassEditPart"
- itemSemanticEditPolicyClassName="NestedDataTypeForClassItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedDataTypeForClassCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedDataTypeForClassGraphicalNodeEditPolicy"
- createCommandClassName="NestedDataTypeForClassCreateCommand"
- containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.20">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3044"
- displayName="DataType"
- metamodelType="/0/@diagram/@childNodes.35/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3045"
- editPartClassName="NestedDataTypeForComponentEditPart"
- itemSemanticEditPolicyClassName="NestedDataTypeForComponentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedDataTypeForComponentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedDataTypeForComponentGraphicalNodeEditPolicy"
- createCommandClassName="NestedDataTypeForComponentCreateCommand"
- containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.23">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3045"
- displayName="DataType"
- metamodelType="/0/@diagram/@childNodes.35/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3043"
- editPartClassName="NestedDataTypeForInterfaceEditPart"
- itemSemanticEditPolicyClassName="NestedDataTypeForInterfaceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedDataTypeForInterfaceCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedDataTypeForInterfaceGraphicalNodeEditPolicy"
- createCommandClassName="NestedDataTypeForInterfaceCreateCommand"
- containers="/0/@diagram/@compartments.9 /0/@diagram/@compartments.26">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3043"
- displayName="DataType"
- metamodelType="/0/@diagram/@childNodes.35/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3050"
- editPartClassName="NestedSignalForClassEditPart"
- itemSemanticEditPolicyClassName="NestedSignalForClassItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedSignalForClassCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedSignalForClassGraphicalNodeEditPolicy"
- createCommandClassName="NestedSignalForClassCreateCommand"
- containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.20">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3050"
- displayName="Signal"
- metamodelType="/0/@diagram/@topLevelNodes.5/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3051"
- editPartClassName="NestedSignalForComponentEditPart"
- itemSemanticEditPolicyClassName="NestedSignalForComponentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedSignalForComponentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedSignalForComponentGraphicalNodeEditPolicy"
- createCommandClassName="NestedSignalForComponentCreateCommand"
- containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.23">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3051"
- displayName="Signal"
- metamodelType="/0/@diagram/@topLevelNodes.5/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3049"
- editPartClassName="NestedSignalForInterfaceEditPart"
- itemSemanticEditPolicyClassName="NestedSignalForInterfaceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NestedSignalForInterfaceCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="NestedSignalForInterfaceGraphicalNodeEditPolicy"
- createCommandClassName="NestedSignalForInterfaceCreateCommand"
- containers="/0/@diagram/@compartments.9 /0/@diagram/@compartments.26">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3049"
- displayName="Signal"
- metamodelType="/0/@diagram/@topLevelNodes.5/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <topLevelNodes
- visualID="2014"
- editPartClassName="DependencyNodeEditPart"
- itemSemanticEditPolicyClassName="DependencyNodeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DependencyCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DependencyGraphicalNodeEditPolicy"
- createCommandClassName="DependencyNodeCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- displayName="DependencyNode"
- editHelperClassName="DependencyEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DependencyNodeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="10"
- height="10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="1"
- editPartClassName="MultiDependencyLabelEditPart"
- itemSemanticEditPolicyClassName="MultiDependencyLabelItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2013"
- editPartClassName="AssociationClassEditPart"
- itemSemanticEditPolicyClassName="AssociationClassItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AssociationClassCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.31 /0/@diagram/@compartments.37 /0/@diagram/@compartments.38"
- graphicalNodeEditPolicyClassName="AssociationClassGraphicalNodeEditPolicy"
- createCommandClassName="AssociationClassCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="AssociationClassEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAssociationClassItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AssociationClass"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5066"
- editPartClassName="AssociationClassNameEditPart"
- itemSemanticEditPolicyClassName="AssociationClassNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2015"
- editPartClassName="AssociationNodeEditPart"
- itemSemanticEditPolicyClassName="AssociationNodeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AssociationCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="AssociationGraphicalNodeEditPolicy"
- createCommandClassName="AssociationNodeCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- displayName="AssociationNode"
- editHelperClassName="AssociationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DiamondNode">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="20"
- height="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAssociationNodeItemSemanticEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- </modelFacet>
- </topLevelNodes>
- <topLevelNodes
- visualID="2001"
- editPartClassName="InstanceSpecificationEditPart"
- itemSemanticEditPolicyClassName="InstanceSpecificationItemSemanticEditPolicy"
- canonicalEditPolicyClassName="InstanceSpecificationCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.32"
- graphicalNodeEditPolicyClassName="InstanceSpecificationGraphicalNodeEditPolicy"
- createCommandClassName="InstanceSpecificationCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="InstanceSpecificationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.InstanceSpecificationFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInstanceSpecificationItemSemanticEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5002"
- editPartClassName="InstanceSpecificationNameEditPart"
- itemSemanticEditPolicyClassName="InstanceSpecificationNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InstanceSpecificationNameLabelEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2002"
- editPartClassName="ComponentEditPart"
- itemSemanticEditPolicyClassName="ComponentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ComponentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.22"
- compartments="/0/@diagram/@compartments.21 /0/@diagram/@compartments.22 /0/@diagram/@compartments.23"
- graphicalNodeEditPolicyClassName="ComponentGraphicalNodeEditPolicy"
- createCommandClassName="ComponentCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ComponentEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ComponentFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomComponentItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5005"
- editPartClassName="ComponentNameEditPart"
- itemSemanticEditPolicyClassName="ComponentNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2003"
- editPartClassName="SignalEditPart"
- itemSemanticEditPolicyClassName="SignalItemSemanticEditPolicy"
- canonicalEditPolicyClassName="SignalCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.22"
- compartments="/0/@diagram/@compartments.33"
- graphicalNodeEditPolicyClassName="SignalGraphicalNodeEditPolicy"
- createCommandClassName="SignalCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="SignalEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.SignalFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomSignalItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5008"
- editPartClassName="SignalNameEditPart"
- itemSemanticEditPolicyClassName="SignalNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2004"
- editPartClassName="InterfaceEditPart"
- itemSemanticEditPolicyClassName="InterfaceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="InterfaceCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.22"
- compartments="/0/@diagram/@compartments.24 /0/@diagram/@compartments.25 /0/@diagram/@compartments.26"
- graphicalNodeEditPolicyClassName="InterfaceGraphicalNodeEditPolicy"
- createCommandClassName="InterfaceCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="InterfaceEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.InterfaceFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInterfaceItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5011"
- editPartClassName="InterfaceNameEditPart"
- itemSemanticEditPolicyClassName="InterfaceNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2005"
- editPartClassName="ModelEditPartTN"
- itemSemanticEditPolicyClassName="ModelItemSemanticEditPolicyTN"
- canonicalEditPolicyClassName="ModelCanonicalEditPolicyTN"
- childNodes="/0/@diagram/@childNodes.22 /0/@diagram/@childNodes.24"
- compartments="/0/@diagram/@compartments.34"
- graphicalNodeEditPolicyClassName="ModelGraphicalNodeEditPolicyTN"
- createCommandClassName="ModelCreateCommandTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ModelEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="200"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomModelItemSemanticEditPolicyTN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Model"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5020"
- editPartClassName="ModelNameEditPartTN"
- itemSemanticEditPolicyClassName="ModelNameItemSemanticEditPolicyTN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2006"
- editPartClassName="EnumerationEditPart"
- itemSemanticEditPolicyClassName="EnumerationItemSemanticEditPolicy"
- canonicalEditPolicyClassName="EnumerationCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.36"
- graphicalNodeEditPolicyClassName="EnumerationGraphicalNodeEditPolicy"
- createCommandClassName="EnumerationCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.30/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomEnumerationItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5023"
- editPartClassName="EnumerationNameEditPart"
- itemSemanticEditPolicyClassName="EnumerationNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2007"
- editPartClassName="PackageEditPart"
- itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PackageCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.22 /0/@diagram/@childNodes.24"
- compartments="/0/@diagram/@compartments.35"
- graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicy"
- createCommandClassName="PackageCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="200"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomViewComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomPackageItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5026"
- editPartClassName="PackageNameEditPart"
- itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2099">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.InformationItemFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInformationItemItemSemanticEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InformationItem"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5161"
- editPartClassName="InformationItemNameEditPart"
- itemSemanticEditPolicyClassName="InformationItemNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2008"
- editPartClassName="ClassEditPart"
- itemSemanticEditPolicyClassName="ClassItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ClassCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.22 /0/@diagram/@childNodes.23"
- compartments="/0/@diagram/@compartments.18 /0/@diagram/@compartments.19 /0/@diagram/@compartments.20"
- graphicalNodeEditPolicyClassName="ClassGraphicalNodeEditPolicy"
- createCommandClassName="ClassCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.7/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomViewComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5029"
- editPartClassName="ClassNameEditPart"
- itemSemanticEditPolicyClassName="ClassNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2009"
- editPartClassName="PrimitiveTypeEditPart"
- itemSemanticEditPolicyClassName="PrimitiveTypeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PrimitiveTypeCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.27 /0/@diagram/@compartments.28"
- graphicalNodeEditPolicyClassName="PrimitiveTypeGraphicalNodeEditPolicy"
- createCommandClassName="PrimitiveTypeCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.34/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="50"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomViewComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5032"
- editPartClassName="PrimitiveTypeNameEditPart"
- itemSemanticEditPolicyClassName="PrimitiveTypeNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2010"
- editPartClassName="DataTypeEditPart"
- itemSemanticEditPolicyClassName="DataTypeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DataTypeCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.22"
- compartments="/0/@diagram/@compartments.29 /0/@diagram/@compartments.30"
- graphicalNodeEditPolicyClassName="DataTypeGraphicalNodeEditPolicy"
- createCommandClassName="DataTypeCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.35/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomDataTypeItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5035"
- editPartClassName="DataTypeNameEditPart"
- itemSemanticEditPolicyClassName="DataTypeNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2011"
- editPartClassName="ConstraintEditPart"
- itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ConstraintCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicy"
- createCommandClassName="ConstraintCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.37/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomConstraintItemSemanticEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5037"
- editPartClassName="ConstraintNameEditPart"
- itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5159"
- editPartClassName="ConstraintBodyEditPart"
- itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.8"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2012"
- editPartClassName="CommentEditPart"
- itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="CommentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicy"
- createCommandClassName="CommentCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.36/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5038"
- editPartClassName="CommentBodyEditPart"
- itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCornerBentFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.7"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2016"
- editPartClassName="ShortCutDiagramEditPart"
- itemSemanticEditPolicyClassName="ShortCutDiagramItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ShortCutDiagramCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ShortCutDiagramGraphicalNodeEditPolicy"
- createCommandClassName="ShortCutDiagramCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- displayName="ShortCutDiagram"
- editHelperClassName="ShortCutDiagramEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DiagramNodeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="20"
- height="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.OPEN_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShortCutDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomShortcutDiagramItemSemanticEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.9">
- <metaFeatures
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2095"
- editPartClassName="DurationObservationEditPart"
- itemSemanticEditPolicyClassName="DurationObservationItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DurationObservationCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DurationObservationGraphicalNodeEditPolicy"
- createCommandClassName="DurationObservationCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="DurationObservationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.DurationObservationNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ObservationLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomDurationObservationItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationObservation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5155"
- editPartClassName="DurationObservationNameEditPart"
- itemSemanticEditPolicyClassName="DurationObservationNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5156"
- editPartClassName="DurationObservationStereotypeLabelEditPart"
- itemSemanticEditPolicyClassName="DurationObservationStereotypeLabelItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2096"
- editPartClassName="TimeObservationEditPart"
- itemSemanticEditPolicyClassName="TimeObservationItemSemanticEditPolicy"
- canonicalEditPolicyClassName="TimeObservationCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="TimeObservationGraphicalNodeEditPolicy"
- createCommandClassName="TimeObservationCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="TimeObservationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TimeObservationNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ObservationLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomTimeObservationItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeObservation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5153"
- editPartClassName="TimeObservationNameEditPart"
- itemSemanticEditPolicyClassName="TimeObservationNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5154"
- editPartClassName="TimeObservationStereotypeLabelEditPart"
- itemSemanticEditPolicyClassName="TimeObservationStereotypeLabelItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2097"
- editPartClassName="DefaultNamedElementEditPart"
- itemSemanticEditPolicyClassName="DefaultNamedElementItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DefaultNamedElementCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DefaultNamedElementGraphicalNodeEditPolicy"
- createCommandClassName="DefaultNamedElementCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- displayName="DefaultNamedElement"
- editHelperClassName="DefaultNamedElementEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="50"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomDefaultNamedElementItemSemanticEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- </modelFacet>
- <labels
- visualID="5157"
- editPartClassName="DefaultNamedElementNameEditPart"
- itemSemanticEditPolicyClassName="DefaultNamedElementNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <links
- visualID="4016"
- editPartClassName="AssociationClassDashedLinkEditPart"
- itemSemanticEditPolicyClassName="AssociationClassDashedLinkItemSemanticEditPolicy"
- createCommandClassName="AssociationClassDashedLinkCreateCommand"
- reorientCommandClassName="AssociationClassDashedLinkReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:NotationType"
- displayName="AssociationClassDashedLink"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- </links>
- <links
- visualID="4017"
- editPartClassName="AssociationClassLinkEditPart"
- itemSemanticEditPolicyClassName="AssociationClassLinkItemSemanticEditPolicy"
- createCommandClassName="AssociationClassLinkCreateCommand"
- reorientCommandClassName="AssociationClassLinkReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="AssociationClassLink"
- metamodelType="/0/@diagram/@topLevelNodes.1/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.AssociationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAssociationClassLinkItemSemanticEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AssociationClass"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
- </modelFacet>
- <labels
- visualID="6031"
- editPartClassName="AssociationClassRoleSourceEditPart"
- itemSemanticEditPolicyClassName="AssociationClassRoleSourceItemSemanticEditPolicy"
- readOnly="true"
- alignment="SOURCE">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getRoleSourceLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="srcRole{0}"
- editorPattern="srcRole{0}"
- editPattern="srcRole{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6032"
- editPartClassName="AssociationClassRoleTargetEditPart"
- itemSemanticEditPolicyClassName="AssociationClassRoleTargetSemanticEditPolicy"
- readOnly="true"
- alignment="TARGET">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getRoleTargetLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="targetRole{0}"
- editorPattern="targetRole{0}"
- editPattern="targetRole{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4001"
- editPartClassName="AssociationEditPart"
- itemSemanticEditPolicyClassName="AssociationItemSemanticEditPolicy"
- createCommandClassName="AssociationCreateCommand"
- reorientCommandClassName="AssociationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="AssociationLink"
- metamodelType="/0/@diagram/@topLevelNodes.2/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.AssociationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAssociationItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
- </modelFacet>
- <labels
- visualID="6001"
- editPartClassName="AppliedStereotypeAssociationEditPart"
- itemSemanticEditPolicyClassName="AssociationNameItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeAssociationLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6002"
- editPartClassName="AssociationNameEditPart"
- itemSemanticEditPolicyClassName="AssociationNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAssociationNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6003"
- editPartClassName="AssociationTargetNameEditPart"
- itemSemanticEditPolicyClassName="AssociationTargetNameItemSemanticEditPolicy"
- readOnly="true"
- alignment="SOURCE">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getRoleTargetLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="srcRole{0}"
- editorPattern="srcRole{0}"
- editPattern="srcRole{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6005"
- editPartClassName="AssociationSourceNameEditPart"
- itemSemanticEditPolicyClassName="AssociationSourceNameItemSemanticEditPolicy"
- readOnly="true"
- alignment="TARGET">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getRoleSourceLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="targMul{0}"
- editorPattern="targMul{0}"
- editPattern="targMul{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6033"
- editPartClassName="AssociationMultiplicitySourceEditPart"
- itemSemanticEditPolicyClassName="AssociationMultiplicitySourceSemanticEditPolicy"
- readOnly="true"
- alignment="TARGET">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getMultiplicitySourceLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceMultiplicityEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="srcMul{0}"
- editorPattern="srcMul{0}"
- editPattern="srcMul{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6034"
- editPartClassName="AssociationMultiplicityTargetEditPart"
- itemSemanticEditPolicyClassName="AssociationMultiplicityTargetSemanticEditPolicy"
- readOnly="true"
- alignment="SOURCE">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getMultiplicityTargetLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetMultiplicityEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="srcMul{0}"
- editorPattern="srcMul{0}"
- editPattern="srcMul{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4019"
- editPartClassName="AssociationBranchEditPart"
- itemSemanticEditPolicyClassName="AssociationBranchItemSemanticEditPolicy"
- createCommandClassName="AssociationBranchCreateCommand"
- reorientCommandClassName="AssociationBranchReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="AssociationBranchLink"
- metamodelType="/0/@diagram/@topLevelNodes.2/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.AssociationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAssociationBranchItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
- </modelFacet>
- <labels
- visualID="6024"
- editPartClassName="AssociationBranchRoleEditPart"
- itemSemanticEditPolicyClassName="AssociationBranchRoleItemSemanticEditPolicy"
- readOnly="true"
- alignment="SOURCE">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getRoleSourceLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="srcRole{0}"
- editorPattern="srcRole{0}"
- editPattern="srcRole{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6035"
- editPartClassName="AssociationBranchMutliplicityEditPart"
- itemSemanticEditPolicyClassName="AssociationBranchRoleItemSemanticEditPolicy"
- readOnly="true"
- alignment="SOURCE">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getMultiplicitySourceLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetMultiplicityEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="srcRole{0}"
- editorPattern="srcRole{0}"
- editPattern="srcRole{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4002"
- editPartClassName="GeneralizationEditPart"
- itemSemanticEditPolicyClassName="GeneralizationItemSemanticEditPolicy"
- createCommandClassName="GeneralizationCreateCommand"
- reorientCommandClassName="GeneralizationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="GeneralizationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.GeneralizationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomGeneralizationItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/general"/>
- </modelFacet>
- <labels
- visualID="6007"
- editPartClassName="AppliedStereotyperGeneralizationEditPart"
- itemSemanticEditPolicyClassName="GeneralizationIsSubstitutableItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/isSubstitutable"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4003"
- editPartClassName="InterfaceRealizationEditPart"
- itemSemanticEditPolicyClassName="InterfaceRealizationItemSemanticEditPolicy"
- createCommandClassName="InterfaceRealizationCreateCommand"
- reorientCommandClassName="InterfaceRealizationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="InterfaceRealizationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.InterfaceRealizationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInterfaceRealizationItemSemanticEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InterfaceRealization"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/BehavioredClassifier/interfaceRealization"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/BehavioredClassifier/interfaceRealization"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InterfaceRealization/contract"/>
- </modelFacet>
- <labels
- visualID="6008"
- editPartClassName="AppliedStereotypeInterfaceRealizationEditPart"
- itemSemanticEditPolicyClassName="AppliedStereotypeInterfaceRealizationNameItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6009"
- editPartClassName="InterfaceRealizationNameEditPart"
- itemSemanticEditPolicyClassName="InterfaceRealizationNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4004"
- editPartClassName="SubstitutionEditPart"
- itemSemanticEditPolicyClassName="SubstitutionItemSemanticEditPolicy"
- createCommandClassName="SubstitutionCreateCommand"
- reorientCommandClassName="SubstitutionReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="SubstitutionEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomSubstitutionItemSemanticEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Substitution"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/substitution"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/substitution"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Substitution/substitutingClassifier"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Substitution/contract"/>
- </modelFacet>
- <labels
- visualID="6010"
- editPartClassName="AppliedStereotypeSubstitutionEditPart"
- itemSemanticEditPolicyClassName="SubstitutionNameItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6011"
- editPartClassName="SubstitutionNameEditPart"
- itemSemanticEditPolicyClassName="SubstitutionNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4005"
- editPartClassName="RealizationEditPart"
- itemSemanticEditPolicyClassName="RealizationItemSemanticEditPolicy"
- createCommandClassName="RealizationCreateCommand"
- reorientCommandClassName="RealizationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="RealizationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.InterfaceRealizationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomRealizationItemSemanticEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Realization"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
- </modelFacet>
- <labels
- visualID="6012"
- editPartClassName="AppliedStereotypeRealizationEditPart"
- itemSemanticEditPolicyClassName="RealizationNameItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6013"
- editPartClassName="RealizationNameEditPart"
- itemSemanticEditPolicyClassName="RealizationNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern=""
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4006"
- editPartClassName="AbstractionEditPart"
- itemSemanticEditPolicyClassName="AbstractionItemSemanticEditPolicy"
- createCommandClassName="AbstractionCreateCommand"
- reorientCommandClassName="AbstractionReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="AbstractionEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeAbstractionLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAbstractionItemSemanticEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Abstraction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
- </modelFacet>
- <labels
- visualID="6014"
- editPartClassName="AbstractionNameEditPart"
- itemSemanticEditPolicyClassName="AbstractionNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6015"
- editPartClassName="AppliedStereotypeAbstractionEditPart"
- itemSemanticEditPolicyClassName="AbstractionName2ItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4007"
- editPartClassName="UsageEditPart"
- itemSemanticEditPolicyClassName="UsageItemSemanticEditPolicy"
- createCommandClassName="UsageCreateCommand"
- reorientCommandClassName="UsageReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="UsageEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeUsageLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomUsageItemSemanticEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Usage"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
- </modelFacet>
- <labels
- visualID="6016"
- editPartClassName="UsageNameEditPart"
- itemSemanticEditPolicyClassName="UsageNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6017"
- editPartClassName="AppliedStereotypeUsageEditPart"
- itemSemanticEditPolicyClassName="UsageName2ItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4008"
- editPartClassName="DependencyEditPart"
- itemSemanticEditPolicyClassName="DependencyItemSemanticEditPolicy"
- createCommandClassName="DependencyCreateCommand"
- reorientCommandClassName="DependencyReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="DependencyLink"
- metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
- </modelFacet>
- <labels
- visualID="6026"
- editPartClassName="DependencyNameEditPart"
- itemSemanticEditPolicyClassName="DependencyNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6027"
- editPartClassName="AppliedStereotypeDependencyEditPart"
- itemSemanticEditPolicyClassName="DependencyName2ItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4018"
- editPartClassName="DependencyBranchEditPart"
- itemSemanticEditPolicyClassName="DependencyBranchSemanticEditPolicy"
- createCommandClassName="Dependency3CreateCommand"
- reorientCommandClassName="Dependency2ReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="DependencyBranchLink"
- metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
- </modelFacet>
- </links>
- <links
- visualID="4009"
- editPartClassName="ElementImportEditPart"
- itemSemanticEditPolicyClassName="ElementImportItemSemanticEditPolicy"
- createCommandClassName="ElementImportCreateCommand"
- reorientCommandClassName="ElementImportReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ElementImportEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeElementImportLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/elementImport"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/elementImport"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.2/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/alias"/>
- </initializers>
- </modelElementInitializer>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/importedElement"/>
- </modelFacet>
- <labels
- visualID="6020"
- editPartClassName="ElementImportAliasEditPart"
- itemSemanticEditPolicyClassName="ElementImportAliasItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/alias"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6021"
- editPartClassName="AppliedStereotypeElementImportEditPart"
- itemSemanticEditPolicyClassName="ElementImportAlias2ItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/alias"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4010"
- editPartClassName="PackageImportEditPart"
- itemSemanticEditPolicyClassName="PackageImportItemSemanticEditPolicy"
- createCommandClassName="PackageImportCreateCommand"
- reorientCommandClassName="PackageImportReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="PackageImportEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypePackageImportLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/packageImport"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/packageImport"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport/importedPackage"/>
- </modelFacet>
- <labels
- visualID="6022"
- editPartClassName="AppliedStereotypePackageImportEditPart"
- itemSemanticEditPolicyClassName="PackageImportVisibilityItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.4"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport/visibility"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4011"
- editPartClassName="PackageMergeEditPart"
- itemSemanticEditPolicyClassName="PackageMergeItemSemanticEditPolicy"
- createCommandClassName="PackageMergeCreateCommand"
- reorientCommandClassName="PackageMergeReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="PackageMergeEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypePackageMergeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageMerge"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packageMerge"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packageMerge"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageMerge/receivingPackage"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageMerge/mergedPackage"/>
- </modelFacet>
- <labels
- visualID="6030"
- editPartClassName="AppliedStereotypePackageMergeEditPart"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.3"/>
- </labels>
- </links>
- <links
- visualID="4012"
- editPartClassName="ProfileApplicationEditPart"
- itemSemanticEditPolicyClassName="ProfileApplicationItemSemanticEditPolicy"
- createCommandClassName="ProfileApplicationCreateCommand"
- reorientCommandClassName="ProfileApplicationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ProfileApplicationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ProfileApplication"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/profileApplication"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/profileApplication"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ProfileApplication/appliedProfile"/>
- </modelFacet>
- </links>
- <links
- visualID="4013"
- editPartClassName="CommentAnnotatedElementEditPart"
- itemSemanticEditPolicyClassName="CommentAnnotatedElementItemSemanticEditPolicy"
- createCommandClassName="CommentAnnotatedElementCreateCommand"
- reorientCommandClassName="CommentAnnotatedElementReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
- </modelFacet>
- </links>
- <links
- visualID="4014"
- editPartClassName="ConstraintConstrainedElementEditPart"
- itemSemanticEditPolicyClassName="ConstraintConstrainedElementItemSemanticEditPolicy"
- createCommandClassName="ConstraintConstrainedElementCreateCommand"
- reorientCommandClassName="ConstraintConstrainedElementReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
- </modelFacet>
- </links>
- <links
- visualID="4015"
- editPartClassName="TemplateBindingEditPart"
- itemSemanticEditPolicyClassName="TemplateBindingItemSemanticEditPolicy"
- createCommandClassName="TemplateBindingCreateCommand"
- reorientCommandClassName="TemplateBindingReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="TemplateBindingEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateBindingFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateBinding"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateableElement/templateBinding"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateableElement/templateBinding"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateBinding/boundElement"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateBinding/boundElement"/>
- </modelFacet>
- <labels
- visualID="6023"
- editPartClassName="BindingSubstitutionEditPart"
- itemSemanticEditPolicyClassName="BindingSubstitutionItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getBindingSubstitutionFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.BindingSubstitutionFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateBindingDisplayEditPolicy.TEMPLATE_PARAMETER_DISPLAY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateBindingDisplayEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.10"/>
- </labels>
- <labels
- visualID="6036"
- editPartClassName="AppliedStereotypeTemplateBindingEditPart"
- itemSemanticEditPolicyClassName="AppliedStereotypeTemplateBindingItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.3"/>
- </labels>
- </links>
- <links
- visualID="4020"
- editPartClassName="GeneralizationSetEditPart"
- itemSemanticEditPolicyClassName="GeneralizationSetItemSemanticEditPolicy"
- createCommandClassName="GeneralizationSetCreateCommand"
- reorientCommandClassName="GeneralizationSetReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- displayName="GeneralizationSet"
- editHelperClassName="GeneralizationSetEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.GeneralizationSet"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;CustomDisplay&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.GeneralizationSetLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/GeneralizationSet"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/GeneralizationSet/generalization"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/GeneralizationSet/generalization"/>
- </modelFacet>
- <labels
- visualID="5067"
- editPartClassName="ConstraintLabelEditPart"
- itemSemanticEditPolicyClassName="ConstraintLabelItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2"
- viewPattern="{0},{1}"
- editorPattern="{0},{1}"
- editPattern="{0},{1}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/GeneralizationSet/isCovering"/>
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/GeneralizationSet/isDisjoint"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6037"
- editPartClassName="AppliedStereotypeGeneralizationSetLabelEditPart"
- itemSemanticEditPolicyClassName="AppliedStereotypeGeneralizationSetLabelItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.3"/>
- </labels>
- </links>
- <links
- visualID="4021"
- editPartClassName="InstanceSpecificationLinkEditPart"
- itemSemanticEditPolicyClassName="InstanceSpecificationLinkItemSemanticEditPolicy"
- createCommandClassName="InstanceSpecificationLinkCreateCommand"
- reorientCommandClassName="InstanceSpecificationLinkReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecificationLink_4021"
- displayName="InstanceSpecificationLink"
- editHelperClassName="InstanceSpecificationLinkEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.InstanceSpecificationLinkFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification/slot"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification/slot"/>
- </modelFacet>
- <labels
- visualID="6039"
- editPartClassName="SourceISLinkLabelEditPart"
- itemSemanticEditPolicyClassName="SourceISLinkLabelItemSemanticEditPolicy"
- readOnly="true"
- alignment="SOURCE">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/DecorationNode"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getSourceLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InstanceSpecificationRoleDisplayEditPolicy.INSTANCE_SPECIFICATION_ROLE_DISPLAY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ISRoleSourceDisplayEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.11"/>
- </labels>
- <labels
- visualID="6038"
- editPartClassName="TargetISLinkLabelEditPart"
- itemSemanticEditPolicyClassName="TargetISLinkLabelItemSemanticEditPolicy"
- readOnly="true"
- alignment="TARGET">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/DecorationNode"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getTargetLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InstanceSpecificationRoleDisplayEditPolicy.INSTANCE_SPECIFICATION_ROLE_DISPLAY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ISRoleTargetDisplayEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.12"/>
- </labels>
- </links>
- <links
- visualID="4022"
- editPartClassName="ContainmentSubLinkEditPart"
- itemSemanticEditPolicyClassName="ContainmentSubLinkCreateCommandItemSemanticEditPolicy"
- createCommandClassName="ContainmentSubLinkCreateCommand"
- reorientCommandClassName="ContainmentSubLinkCreateCommandReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:NotationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.AddedLink_4022"
- displayName="ContainmentSubLink"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.AddedLinkFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomViewComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomContainmentSubLinkItemSemanticEditPolicy"/>
- </links>
- <links
- visualID="4023"
- editPartClassName="ContainmentLinkEditPart"
- itemSemanticEditPolicyClassName="ContainmentLinkItemSemanticEditPolicy"
- createCommandClassName="ContainmentLinkCreateCommand"
- reorientCommandClassName="ContainmentLinkReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:NotationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.ContainmentLink_4023"
- displayName="ContainmentLink"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.AddedLinkFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomViewComponentEditPolicy"/>
- </links>
- <links
- visualID="4024"
- editPartClassName="ConnectorTimeObservationEditPart"
- itemSemanticEditPolicyClassName="ConnectorTimeObservationItemSemanticEditPolicy"
- createCommandClassName="ConnectorTimeObservationCreateCommand"
- reorientCommandClassName="ConnectorTimeObservationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeObservation/event"/>
- </modelFacet>
- </links>
- <links
- visualID="4025"
- editPartClassName="ConnectorDurationObservationEditPart"
- itemSemanticEditPolicyClassName="ConnectorDurationObservationItemSemanticEditPolicy"
- createCommandClassName="ConnectorDurationObservationCreateCommand"
- reorientCommandClassName="ConnectorDurationObservationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationObservation/event"/>
- </modelFacet>
- </links>
- <links
- visualID="4026">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.InformationFlowFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeInformationFlowLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InformationFlow"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InformationFlow/informationSource"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InformationFlow/informationTarget"/>
- </modelFacet>
- <labels
- visualID="6040"
- editPartClassName="InformationFlowConveyedLabelEditPart"
- itemSemanticEditPolicyClassName="InformationFlowConveyedLabelItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConveyedLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="30"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InformationFlowCustomLabelEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6041"
- editPartClassName="InformationFlowAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="InformationFlowAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="15"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.NoSemanticParserEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.0/@expressions.2"
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.3"/>
- </links>
- <links
- visualID="8500"
- editPartClassName="ContextLinkEditPart"
- itemSemanticEditPolicyClassName="ContextLinkItemSemanticEditPolicy"
- createCommandClassName="ContextLinkCreateCommand"
- reorientCommandClassName="ContextLinkReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="Undefined"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.CustomContextLinkFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/context"/>
- </modelFacet>
- <labels
- visualID="8501"
- editPartClassName="ContextLinkAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ContextLinkAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="15"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.NoSemanticParserEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <compartments
- visualID="7011"
- editPartClassName="ClassAttributeCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="ClassAttributeCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ClassAttributeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.0"
- title="attributes"
- node="/0/@diagram/@childNodes.33">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7012"
- editPartClassName="ClassOperationCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="ClassOperationCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ClassOperationCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.19 /0/@diagram/@childNodes.9"
- title="operations"
- node="/0/@diagram/@childNodes.33">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7013"
- editPartClassName="ClassNestedClassifierCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="ClassNestedClassifierCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ClassNestedClassifierCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.6 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.50"
- title="nested classifiers"
- node="/0/@diagram/@childNodes.33">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNestedClassifierFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
- </compartments>
- <compartments
- visualID="7023"
- editPartClassName="ComponentAttributeCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="ComponentAttributeCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ComponentAttributeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.1"
- title="attributes"
- node="/0/@diagram/@childNodes.26">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7024"
- editPartClassName="ComponentOperationCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="ComponentOperationCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ComponentOperationCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.10 /0/@diagram/@childNodes.19"
- title="operations"
- node="/0/@diagram/@childNodes.26">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7025"
- editPartClassName="ComponentNestedClassifierCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="ComponentNestedClassifierCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ComponentNestedClassifierCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.51"
- title="nested classifiers"
- node="/0/@diagram/@childNodes.26">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNestedClassifierFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
- </compartments>
- <compartments
- visualID="7026"
- editPartClassName="SignalAttributeCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="SignalAttributeCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="SignalAttributeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.2"
- title="attributes"
- node="/0/@diagram/@childNodes.27">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7027"
- editPartClassName="InterfaceAttributeCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="InterfaceAttributeCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="InterfaceAttributeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.3"
- title="attributes"
- node="/0/@diagram/@childNodes.28">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7028"
- editPartClassName="InterfaceOperationCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="InterfaceOperationCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="InterfaceOperationCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.11 /0/@diagram/@childNodes.20"
- title="operations"
- node="/0/@diagram/@childNodes.28">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7029"
- editPartClassName="InterfaceNestedClassifierCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="InterfaceNestedClassifierCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.52"
- title="nested classifiers"
- node="/0/@diagram/@childNodes.28">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNestedClassifierFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
- </compartments>
- <compartments
- visualID="7041"
- editPartClassName="PrimitiveTypeAttributeCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="PrimitiveTypeAttributeCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="PrimitiveTypeAttributeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.4"
- title="attributes"
- node="/0/@diagram/@childNodes.34">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7042"
- editPartClassName="PrimitiveTypeOperationCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="PrimitiveTypeOperationCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="PrimitiveTypeOperationCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.12"
- title="operations"
- node="/0/@diagram/@childNodes.34">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7032"
- editPartClassName="DataTypeAttributeCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.5"
- title="attributes"
- node="/0/@diagram/@childNodes.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7033"
- editPartClassName="DataTypeOperationCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.13"
- title="operations"
- node="/0/@diagram/@childNodes.35">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7030"
- editPartClassName="ModelPackageableElementCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.32"
- title="packaged elements"
- canCollapse="false"
- node="/0/@diagram/@childNodes.29"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomContainmentCreationEditPolicy"/>
- </compartments>
- <compartments
- visualID="7010"
- editPartClassName="PackagePackageableElementCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.32"
- title="packaged elements"
- canCollapse="false"
- node="/0/@diagram/@childNodes.31"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomContainmentCreationEditPolicy"/>
- </compartments>
- <compartments
- visualID="7031"
- editPartClassName="EnumerationEnumerationLiteralCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.18"
- title="EnumerationLiteralCompartment"
- node="/0/@diagram/@childNodes.30">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getEnumerationLiteralCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7035"
- editPartClassName="InstanceSpecificationSlotCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="InstanceSpecificationSlotCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="InstanceSpecificationSlotCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.21"
- title="slots"
- node="/0/@diagram/@childNodes.25">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getSlotCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7017"
- editPartClassName="ClassAttributeCompartmentEditPart"
- itemSemanticEditPolicyClassName="ClassAttributeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ClassAttributeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.0"
- title="attributes"
- node="/0/@diagram/@topLevelNodes.11">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7018"
- editPartClassName="ClassOperationCompartmentEditPart"
- itemSemanticEditPolicyClassName="ClassOperationCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ClassOperationCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.19 /0/@diagram/@childNodes.9"
- title="operations"
- node="/0/@diagram/@topLevelNodes.11">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7019"
- editPartClassName="ClassNestedClassifierCompartmentEditPart"
- itemSemanticEditPolicyClassName="ClassNestedClassifierCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ClassNestedClassifierCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.6 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.50"
- title="nested classifiers"
- node="/0/@diagram/@topLevelNodes.11">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNestedClassifierFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
- </compartments>
- <compartments
- visualID="7002"
- editPartClassName="ComponentAttributeCompartmentEditPart"
- itemSemanticEditPolicyClassName="ComponentAttributeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ComponentAttributeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.1"
- title="attributes"
- node="/0/@diagram/@topLevelNodes.4">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7003"
- editPartClassName="ComponentOperationCompartmentEditPart"
- itemSemanticEditPolicyClassName="ComponentOperationCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ComponentOperationCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.10 /0/@diagram/@childNodes.19"
- title="operations"
- node="/0/@diagram/@topLevelNodes.4">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7004"
- editPartClassName="ComponentNestedClassifierCompartmentEditPart"
- itemSemanticEditPolicyClassName="ComponentNestedClassifierCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ComponentNestedClassifierCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.51"
- title="nested classifiers"
- node="/0/@diagram/@topLevelNodes.4">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNestedClassifierFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7006"
- editPartClassName="InterfaceAttributeCompartmentEditPart"
- itemSemanticEditPolicyClassName="InterfaceAttributeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="InterfaceAttributeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3"
- title="attributes"
- node="/0/@diagram/@topLevelNodes.6">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7007"
- editPartClassName="InterfaceOperationCompartmentEditPart"
- itemSemanticEditPolicyClassName="InterfaceOperationCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="InterfaceOperationCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.11 /0/@diagram/@childNodes.20"
- title="operations"
- node="/0/@diagram/@topLevelNodes.6">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7008"
- editPartClassName="InterfaceNestedClassifierCompartmentEditPart"
- itemSemanticEditPolicyClassName="InterfaceNestedClassifierCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="InterfaceNestedClassifierCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.52"
- title="nested classifiers"
- node="/0/@diagram/@topLevelNodes.6">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNestedClassifierFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
- </compartments>
- <compartments
- visualID="7039"
- editPartClassName="PrimitiveTypeAttributeCompartmentEditPart"
- itemSemanticEditPolicyClassName="PrimitiveTypeAttributeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PrimitiveTypeAttributeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.4"
- title="attributes"
- node="/0/@diagram/@topLevelNodes.12">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7040"
- editPartClassName="PrimitiveTypeOperationCompartmentEditPart"
- itemSemanticEditPolicyClassName="PrimitiveTypeOperationCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PrimitiveTypeOperationCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.12"
- title="operations"
- node="/0/@diagram/@topLevelNodes.12">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7020"
- editPartClassName="DataTypeAttributeCompartmentEditPart"
- itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.5"
- title="attributes"
- node="/0/@diagram/@topLevelNodes.13">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7021"
- editPartClassName="DataTypeOperationCompartmentEditPart"
- itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.13"
- title="operations"
- node="/0/@diagram/@topLevelNodes.13">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7034"
- editPartClassName="AssociationClassAttributeCompartmentEditPart"
- itemSemanticEditPolicyClassName="AssociationClassAttributeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AssociationClassAttributeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.1"
- title="attributes"
- node="/0/@diagram/@topLevelNodes.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7001"
- editPartClassName="InstanceSpecificationSlotCompartmentEditPart"
- itemSemanticEditPolicyClassName="InstanceSpecificationSlotCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="InstanceSpecificationSlotCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.21"
- title="slots"
- node="/0/@diagram/@topLevelNodes.3">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getSlotCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7005"
- editPartClassName="SignalAttributeCompartmentEditPart"
- itemSemanticEditPolicyClassName="SignalAttributeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="SignalAttributeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2"
- title="attributes"
- node="/0/@diagram/@topLevelNodes.5">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7009"
- editPartClassName="ModelPackageableElementCompartmentEditPartTN"
- itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyTN"
- canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyTN"
- childNodes="/0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.32"
- title="packaged elements"
- canCollapse="false"
- node="/0/@diagram/@topLevelNodes.7"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomContainmentCreationEditPolicy"/>
- </compartments>
- <compartments
- visualID="7016"
- editPartClassName="PackagePackageableElementCompartmentEditPart"
- itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.32"
- title="packaged elements"
- canCollapse="false"
- node="/0/@diagram/@topLevelNodes.9"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomContainmentCreationEditPolicy"/>
- </compartments>
- <compartments
- visualID="7015"
- editPartClassName="EnumerationEnumerationLiteralCompartmentEditPart"
- itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.18"
- title="EnumerationLiteralCompartment"
- node="/0/@diagram/@topLevelNodes.8">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getEnumerationLiteralCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7036"
- editPartClassName="AssociationClassOperationCompartmentEditPart"
- itemSemanticEditPolicyClassName="AssociationClassOperationCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AssociationClassOperationCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.10"
- title="operations"
- node="/0/@diagram/@topLevelNodes.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7037"
- editPartClassName="AssociationClassNestedClassifierCompartmentEditPart"
- itemSemanticEditPolicyClassName="AssociationClassNestedClassifierCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AssociationClassNestedClassifierCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.7"
- title="nested classifiers"
- node="/0/@diagram/@topLevelNodes.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNestedClassifierFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
- </compartments>
- <compartments
- visualID="7014"
- editPartClassName="RedefinableTemplateSignatureTemplateParameterCompartmentEditPart"
- itemSemanticEditPolicyClassName="RedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="RedefinableTemplateSignatureTemplateParameterCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.16 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.17"
- title="TemplateParameterCompartment"
- canCollapse="false"
- node="/0/@diagram/@childNodes.22">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getTemplateParameterRectangle"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CRedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy"/>
- </compartments>
- <compartments
- visualID="7038"
- editPartClassName="TemplateSignatureTemplateParameterCompartmentEditPart"
- itemSemanticEditPolicyClassName="TemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="TemplateSignatureTemplateParameterCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.16 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.17"
- title="TemplateParameterCompartment"
- canCollapse="false"
- node="/0/@diagram/@childNodes.24">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getTemplateParameterRectangle"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy"/>
- </compartments>
- <palette>
- <groups
- title="Nodes"
- description="Nodes"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- id="&quot;clazz.group.nodes&quot;"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Class"
- description="Create a new Class"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif"
- id="&quot;clazz.tool.class&quot;"
- genNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.6 /0/@diagram/@topLevelNodes.11"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="ClassifierTemplateParameter"
- description="Create a ClassifiertemplateParameter"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ClassifierTemplateParameter.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ClassifierTemplateParameter.gif"
- id="&quot;clazz.tool.classifiertemplateparameter&quot;"
- genNodes="/0/@diagram/@childNodes.16"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Comment"
- description="Create a comment"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- createMethodName="createComment5CreationTool"
- id="&quot;clazz.tool.comment&quot;"
- genNodes="/0/@diagram/@childNodes.36 /0/@diagram/@topLevelNodes.15"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Component"
- description="Create a component"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
- id="&quot;clazz.tool.component&quot;"
- genNodes="/0/@diagram/@topLevelNodes.4 /0/@diagram/@childNodes.26"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Constraint"
- description="Create a constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- id="&quot;clazz.tool.constraint&quot;"
- genNodes="/0/@diagram/@childNodes.37 /0/@diagram/@topLevelNodes.14"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="DataType"
- description="Create a new DataType"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
- id="&quot;clazz.tool.datatype&quot;"
- genNodes="/0/@diagram/@childNodes.35 /0/@diagram/@topLevelNodes.13 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.49"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="DurationObservation"
- description="Create new DurationObservation"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
- genNodes="/0/@diagram/@topLevelNodes.17"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Enumeration"
- description="Create an enumeration"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"
- id="&quot;clazz.tool.enumeration&quot;"
- genNodes="/0/@diagram/@childNodes.30 /0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.43"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Enumeration literal"
- description="Create an enumeration literal"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif"
- id="&quot;clazz.tool.enumerationliteral&quot;"
- genNodes="/0/@diagram/@childNodes.18"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Interface"
- description="Create an interface"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
- id="&quot;clazz.tool.interface&quot;"
- genNodes="/0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.40"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="InstanceSpecification"
- description="Create an InstanceSpecification"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InstanceSpecification.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InstanceSpecification.gif"
- id="&quot;clazz.tool.instancespecification&quot;"
- genNodes="/0/@diagram/@topLevelNodes.3 /0/@diagram/@childNodes.25"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="InformationItem"
- description="Create an InformationItem"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationItem.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationItem.gif"
- id="&quot;clazz.tool.informationitem&quot;"
- genNodes="/0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.32"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="PrimitiveType"
- description="Create a Primitivetype"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"
- id="&quot;clazz.tool.primitivetype&quot;"
- genNodes="/0/@diagram/@childNodes.34 /0/@diagram/@topLevelNodes.12 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.46"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Model"
- description="Create a model"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
- id="&quot;clazz.tool.model&quot;"
- genNodes="/0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.29"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Operation"
- description="Create an operation"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
- id="&quot;clazz.tool.operation&quot;"
- genNodes="/0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.12"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="OperationTemplateParameter"
- description="Create an OperationTemplateParameter"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OperationTemplateParameter.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OperationTemplateParameter.gif"
- createMethodName="createOperationTemplateParameterCreationTool"
- id="&quot;clazz.tool.OperationTemplateParameter&quot;"
- genNodes="/0/@diagram/@childNodes.15"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Package"
- description="Create new Package"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
- id="&quot;clazz.tool.package&quot;"
- genNodes="/0/@diagram/@childNodes.31 /0/@diagram/@topLevelNodes.9"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Property"
- description="Create a new Property"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
- id="&quot;clazz.tool.property&quot;"
- genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.4"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Reception"
- description="Create a reception"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif"
- id="&quot;clazz.tool.reception&quot;"
- genNodes="/0/@diagram/@childNodes.19 /0/@diagram/@childNodes.20"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="RedefinableTemplateSignature"
- description="Create a RedefinableTemplateSignature"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/RedefinableTemplateSignature.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/RedefinableTemplateSignature.gif"
- id="&quot;clazz.tool.redefinabletemplatesignature&quot;"
- genNodes="/0/@diagram/@childNodes.22"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Signal"
- description="Create a signal"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif"
- id="&quot;clazz.tool.signal&quot;"
- genNodes="/0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.50 /0/@diagram/@childNodes.51 /0/@diagram/@childNodes.52"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Slot"
- description="Create a Slot"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Slot.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Slot.gif"
- id="&quot;clazz.tool.slot&quot;"
- genNodes="/0/@diagram/@childNodes.21"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="TemplateParameter"
- description="Create a templateParameter"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateParameter.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateParameter.gif"
- id="&quot;clazz.tool.templateparameter&quot;"
- genNodes="/0/@diagram/@childNodes.17"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="TemplateSignature"
- description="Create a TemplateSignature"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateSignature.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateSignature.gif"
- createMethodName="createTemplateSignatureCreationTool"
- id="&quot;clazz.tool.templatesignature&quot;"
- genNodes="/0/@diagram/@childNodes.24"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="TimeObservation"
- description="Create new TimeObservation"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
- createMethodName="createTimeObservation22CreationTool"
- id="&quot;createTimeObservation22CreationTool&quot;"
- genNodes="/0/@diagram/@topLevelNodes.18"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="ConnectableElementTemplateParameter"
- description="Create a ConnectableElementTemplateParameter"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectableElementTemplateParameter.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectableElementTemplateParameter.gif"
- id="&quot;clazz.tool.connectableelementtemplateparameter&quot;"
- genNodes="/0/@diagram/@childNodes.14"/>
- </groups>
- <groups
- title="Edges"
- description="Edges"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- id="&quot;clazz.group.relationships&quot;"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Abstraction"
- description="Create an Abstraction"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
- id="&quot;clazz.tool.abstraction&quot;"
- genLinks="/0/@diagram/@links.8"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Association"
- description="Create an association"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- id="&quot;clazz.tool.association&quot;"
- genLinks="/0/@diagram/@links.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="AssociationBranch"
- description="Create an association branch"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- id="&quot;clazz.tool.associationbranch&quot;"
- genLinks="/0/@diagram/@links.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="AssociationClass"
- description="AssociationClass"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AssociationClass.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AssociationClass.gif"
- id="&quot;clazz.tool.associationclass&quot;"
- genLinks="/0/@diagram/@links.1"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="ContainmentLink"
- description="Create a ContainmentLink"
- largeIconPath="icons/obj16/ContainmentConnection.gif"
- smallIconPath="icons/obj16/ContainmentConnection.gif"
- id="&quot;clazz.tool.containmentlink&quot;"
- genLinks="/0/@diagram/@links.22"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="ContextLink"
- description="Creation of a context link for a Constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- id="&quot;clazz.tool.contextlink&quot;"
- genLinks="/0/@diagram/@links.26"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Dependency"
- description="Create a dependency"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- id="&quot;clazz.tool.dependency&quot;"
- genLinks="/0/@diagram/@links.10"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="DependencyBranch"
- description="Create a dependency branch"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- id="&quot;clazz.tool.dependencybranch&quot;"
- genLinks="/0/@diagram/@links.11"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="ElementImport"
- description="Create a elementImport"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ElementImport.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ElementImport.gif"
- id="&quot;clazz.tool.elementimport&quot;"
- genLinks="/0/@diagram/@links.12"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Generalization"
- description=" Create a generalization"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
- id="&quot;clazz.tool.generalization&quot;"
- genLinks="/0/@diagram/@links.4"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="GeneralizationSet"
- description="GeneralizationSet"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralizationSet.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralizationSet.gif"
- id="&quot;clazz.tool.generalizationset&quot;"
- genLinks="/0/@diagram/@links.19"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="InformationFlow link"
- description="Create an InformationFlow link"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationFlow.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationFlow.gif"
- createMethodName="createInformationFlowLinkCreationTool"
- id="&quot;clazz.tool.informationflowlink&quot;"
- genLinks="/0/@diagram/@links.25"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="InstanceSpecification link"
- description="Create an InstanceSpecification link"
- largeIconPath="icons/obj16/InstanceLink.gif"
- smallIconPath="icons/obj16/InstanceLink.gif"
- createMethodName="createInstanceSpecificationLinkCreationTool"
- id="&quot;clazz.tool.instancespecificationlink&quot;"
- genLinks="/0/@diagram/@links.20"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="InterfaceRealization"
- description="Create an InterfaceRealization"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif"
- id="&quot;clazz.tool.interfacerealization&quot;"
- genLinks="/0/@diagram/@links.5"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Link"
- description="Creation of a link for comment, constraint, TimeObservation, DurationObservation"
- largeIconPath="icons/obj16/Link.gif"
- smallIconPath="icons/obj16/Link.gif"
- id="&quot;clazz.tool.link&quot;"
- genLinks="/0/@diagram/@links.16 /0/@diagram/@links.23 /0/@diagram/@links.24 /0/@diagram/@links.17"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="PackageImport"
- description=" Create a packageImport"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif"
- id="&quot;clazz.tool.packageimport&quot;"
- genLinks="/0/@diagram/@links.13"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="PackageMerge"
- description="Create a packageMerge"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif"
- id="&quot;clazz.tool.packagemerge&quot;"
- genLinks="/0/@diagram/@links.14"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="ProfileApplication"
- description="Create a profileApplication"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif"
- id="&quot;clazz.tool.profileapplication&quot;"
- genLinks="/0/@diagram/@links.15"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Realization"
- description="Create a Realization"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
- id="&quot;clazz.tool.realization&quot;"
- genLinks="/0/@diagram/@links.7"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Substitution"
- description="Create a substitution"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Substitution.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Substitution.gif"
- id="&quot;clazz.tool.substitution&quot;"
- genLinks="/0/@diagram/@links.6"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="TemplateBinding"
- description="Create a TemplateBinding"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateBinding.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateBinding.gif"
- id="&quot;clazz.tool.templatebinding&quot;"
- genLinks="/0/@diagram/@links.18"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Usage"
- description="Create an Usage"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
- id="&quot;clazz.tool.usage&quot;"
- genLinks="/0/@diagram/@links.9"/>
- </groups>
- </palette>
- <preferencePages
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.general"
- name="UML Diagram">
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.appearance"
- name="Appearance"
- kind="Appearance"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.connections"
- name="Connections"
- kind="Connections"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.printing"
- name="Printing"
- kind="Printing"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
- name="Rulers And Grid"
- kind="RulersAndGrid"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.pathmaps"
- name="Pathmaps"
- kind="Pathmaps"/>
- </preferencePages>
- </diagram>
- <plugin
- iD="org.eclipse.papyrus.uml.diagram.clazz"
- name="PapyrusUMLClassDiagram"
- version="1.0.1.qualifier"/>
- <editor/>
- <navigator/>
- <diagramUpdater/>
- <propertySheet>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="appearance"/>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="diagram"/>
- <tabs
- xsi:type="gmfgen:GenCustomPropertyTab"
- iD="domain"
- label="Core">
- <filter
- xsi:type="gmfgen:TypeTabFilter">
- <types>org.eclipse.gmf.runtime.notation.View</types>
- <types>org.eclipse.gef.EditPart</types>
- <generatedTypes>abstractNavigatorItem</generatedTypes>
- </filter>
- </tabs>
- </propertySheet>
- <domainGenModel
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
- <expressionProviders>
- <providers
- xsi:type="gmfgen:GenJavaExpressionProvider"
- injectExpressionBody="true">
- <expressions
- body="return org.eclipse.papyrus.uml.tools.utils.NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());"/>
- <expressions
- body="org.eclipse.uml2.uml.LiteralString literalString=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();&#xD;&#xA;literalString.setValue(&quot;&quot;);&#xD;&#xA;return literalString;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//Information Flow source constraint&#xD;&#xA;if (source != null) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if (!((source instanceof org.eclipse.uml2.uml.Actor)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Node)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.UseCase)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Artifact)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Class)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Component)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Port)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Property)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Interface)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Package)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.ActivityNode)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.ActivityPartition) || (source instanceof org.eclipse.uml2.uml.InstanceSpecification))) {&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if (source instanceof org.eclipse.uml2.uml.InstanceSpecification) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;org.eclipse.emf.common.util.EList&lt; org.eclipse.uml2.uml.Classifier> classes = ((org.eclipse.uml2.uml.InstanceSpecification) source).getClassifiers();&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;for (int i = 0; i &lt; classes.size(); i++) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if (classes.get(i) instanceof org.eclipse.uml2.uml.Relationship) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//Information Flow target constraint&#xD;&#xA;if (target != null) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if (!((target instanceof org.eclipse.uml2.uml.Actor)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Node)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.UseCase)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Artifact)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Class)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Component)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Port)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Property)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Interface)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Package)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.ActivityNode)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.ActivityPartition) || (target instanceof org.eclipse.uml2.uml.InstanceSpecification))) {&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if (target instanceof org.eclipse.uml2.uml.InstanceSpecification) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;org.eclipse.emf.common.util.EList&lt; org.eclipse.uml2.uml.Classifier> classes = ((org.eclipse.uml2.uml.InstanceSpecification) target).getClassifiers();&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;for (int i = 0; i &lt; classes.size(); i++) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if (classes.get(i) instanceof org.eclipse.uml2.uml.Relationship) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}"/>
- </providers>
- <providers
- xsi:type="gmfgen:GenExpressionInterpreter">
- <expressions
- body="' '"/>
- </providers>
- <providers
- xsi:type="gmfgen:GenJavaExpressionProvider"
- injectExpressionBody="true">
- <expressions
- body="if (it.getImportedElement() != null) {&#xD;&#xA;&#x9;&#x9;&#x9;return (it.getImportedElement().getLabel());&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return &quot;elementimport&quot;;"/>
- </providers>
- <providers
- xsi:type="gmfgen:GenLiteralExpressionProvider">
- <expressions
- body="0"/>
- <expressions
- body="1"/>
- </providers>
- </expressionProviders>
- <labelParsers
- packageName="org.eclipse.papyrus.uml.diagram.clazz.providers"
- className="UMLParserProvider"
- extensibleViaService="true">
- <implementations
- xsi:type="gmfgen:ExternalParser"
- uses="/0/@diagram/@links.3/@labels.0/@modelFacet /0/@diagram/@childNodes.0/@labelModelFacet /0/@diagram/@childNodes.9/@labelModelFacet /0/@diagram/@links.25/@labels.0/@modelFacet /0/@diagram/@links.26/@labels.0/@modelFacet"/>
- <implementations
- xsi:type="gmfgen:PredefinedParser"
- uses="/0/@diagram/@childNodes.1/@labelModelFacet /0/@diagram/@childNodes.10/@labelModelFacet /0/@diagram/@childNodes.7/@labelModelFacet /0/@diagram/@childNodes.2/@labelModelFacet /0/@diagram/@childNodes.3/@labelModelFacet /0/@diagram/@childNodes.11/@labelModelFacet /0/@diagram/@childNodes.8/@labelModelFacet /0/@diagram/@childNodes.18/@labelModelFacet /0/@diagram/@childNodes.19/@labelModelFacet /0/@diagram/@childNodes.6/@labelModelFacet /0/@diagram/@childNodes.5/@labelModelFacet /0/@diagram/@childNodes.13/@labelModelFacet /0/@diagram/@childNodes.25/@labels.0/@modelFacet /0/@diagram/@childNodes.26/@labels.0/@modelFacet /0/@diagram/@childNodes.27/@labels.0/@modelFacet /0/@diagram/@childNodes.28/@labels.0/@modelFacet /0/@diagram/@childNodes.29/@labels.0/@modelFacet /0/@diagram/@childNodes.30/@labels.0/@modelFacet /0/@diagram/@childNodes.31/@labels.0/@modelFacet /0/@diagram/@childNodes.33/@labels.0/@modelFacet /0/@diagram/@childNodes.34/@labels.0/@modelFacet /0/@diagram/@childNodes.35/@labels.0/@modelFacet /0/@diagram/@childNodes.37/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.1/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.3/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.4/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.7/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.8/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.9/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.11/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.12/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.13/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.14/@labels.0/@modelFacet /0/@diagram/@links.2/@labels.1/@modelFacet /0/@diagram/@links.2/@labels.2/@modelFacet /0/@diagram/@links.2/@labels.3/@modelFacet /0/@diagram/@links.4/@labels.0/@modelFacet /0/@diagram/@links.5/@labels.1/@modelFacet /0/@diagram/@links.6/@labels.1/@modelFacet /0/@diagram/@links.7/@labels.1/@modelFacet /0/@diagram/@links.8/@labels.0/@modelFacet /0/@diagram/@links.9/@labels.0/@modelFacet /0/@diagram/@links.10/@labels.0/@modelFacet /0/@diagram/@links.12/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.1/@modelFacet /0/@diagram/@links.1/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.17/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.18/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.19/@labels.0/@modelFacet /0/@diagram/@links.2/@labels.4/@modelFacet /0/@diagram/@links.2/@labels.5/@modelFacet /0/@diagram/@links.3/@labels.1/@modelFacet /0/@diagram/@childNodes.38/@labelModelFacet /0/@diagram/@childNodes.39/@labelModelFacet /0/@diagram/@childNodes.40/@labelModelFacet /0/@diagram/@childNodes.20/@labelModelFacet /0/@diagram/@topLevelNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.32/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labelModelFacet /0/@diagram/@childNodes.12/@labelModelFacet /0/@diagram/@childNodes.49/@labelModelFacet /0/@diagram/@childNodes.44/@labelModelFacet /0/@diagram/@childNodes.45/@labelModelFacet /0/@diagram/@childNodes.48/@labelModelFacet /0/@diagram/@childNodes.47/@labelModelFacet /0/@diagram/@childNodes.46/@labelModelFacet /0/@diagram/@childNodes.52/@labelModelFacet /0/@diagram/@childNodes.50/@labelModelFacet /0/@diagram/@childNodes.51/@labelModelFacet /0/@diagram/@childNodes.41/@labelModelFacet /0/@diagram/@childNodes.42/@labelModelFacet /0/@diagram/@childNodes.43/@labelModelFacet"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.19/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.GeneralizationSetConstraintParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.2/@labels.0/@modelFacet /0/@diagram/@links.5/@labels.0/@modelFacet /0/@diagram/@links.6/@labels.0/@modelFacet /0/@diagram/@links.7/@labels.0/@modelFacet /0/@diagram/@links.8/@labels.1/@modelFacet /0/@diagram/@links.9/@labels.1/@modelFacet /0/@diagram/@links.10/@labels.1/@modelFacet /0/@diagram/@links.12/@labels.1/@modelFacet /0/@diagram/@links.14/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.18/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.17/@labels.1/@modelFacet /0/@diagram/@links.18/@labels.1/@modelFacet /0/@diagram/@links.19/@labels.1/@modelFacet /0/@diagram/@links.25/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.13/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.packageimport.PackageImportVisibilityParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.21/@labelModelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.SlotParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.17/@labelModelFacet /0/@diagram/@childNodes.16/@labelModelFacet /0/@diagram/@childNodes.14/@labelModelFacet /0/@diagram/@childNodes.15/@labelModelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.TemplateParameterParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.36/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.15/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@topLevelNodes.14/@labels.1/@modelFacet /0/@diagram/@childNodes.37/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@topLevelNodes.16/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ShortcutDiagramParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.18/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.TemplateBindingParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.20/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.RoleInstanceSpecificationSourceLinkParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.20/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.RoleInstanceSpecificationTargetLinkParser"/>
- </labelParsers>
- <contextMenus
- context="/0/@diagram">
- <items
- xsi:type="gmfgen:LoadResourceAction"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.part.LoadResourceAction"/>
- </contextMenus>
- </gmfgen:GenEditorGenerator>
- <papyrusgmfgenextension:PapyrusExtensionRootNode
- comment="&quot;Required Comment&quot;">
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Adds a superclass for DurationObservationEditPart, TimeObservationEditPart"
- genView="/0/@diagram/@topLevelNodes.17 /0/@diagram/@topLevelNodes.18"
- name="EP_Observation_NODE"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AbstractObservationEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Manage the class"
- genView="/0/@diagram/@childNodes.33 /0/@diagram/@topLevelNodes.11"
- name="Extended class editpart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart">
- <propRefreshHook
- comment="set the figure active when the feature of the of a class is true"
- classpath=""
- triggeringCondition="resolveSemanticElement().equals(event.getNotifier()) &amp;&amp; (event.getFeature() instanceof org.eclipse.emf.ecore.EAttribute)&amp;&amp; ((org.eclipse.emf.ecore.EAttribute) (event.getFeature())).getName().equals(&quot;isActive&quot;)"
- action="((org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure) getPrimaryShape()).setActive(event.getNewBooleanValue())"/>
- </extensionNodes>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Elements that inherits Classifier"
- genView="/0/@diagram/@childNodes.34 /0/@diagram/@childNodes.26 /0/@diagram/@topLevelNodes.12 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.30 /0/@diagram/@topLevelNodes.8 /0/@diagram/@topLevelNodes.13 /0/@diagram/@childNodes.35 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.32"
- name="Classifier inheritance"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocator"
- comment="precise the locator for a template signature"
- classpath="org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator"
- genChildSideAffixedNode="/0/@diagram/@childNodes.22"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="adding to manange otherNamedElement"
- genView="/0/@diagram/@childNodes.25 /0/@diagram/@topLevelNodes.3 /0/@diagram/@childNodes.31 /0/@diagram/@topLevelNodes.9 /0/@diagram /0/@diagram/@childNodes.29 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.19"
- name="OtherNamedElementEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Manages stereotype shown with External Label"
- genView="/0/@diagram/@topLevelNodes.17/@labels.1 /0/@diagram/@topLevelNodes.18/@labels.1"
- name="EP_Stereotypes_EXT_NODE"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Label in charge to display applied stereotypes on links"
- genView="/0/@diagram/@links.4 /0/@diagram/@links.5 /0/@diagram/@links.6 /0/@diagram/@links.7 /0/@diagram/@links.8 /0/@diagram/@links.9 /0/@diagram/@links.10 /0/@diagram/@links.12 /0/@diagram/@links.13 /0/@diagram/@links.14 /0/@diagram/@links.15 /0/@diagram/@links.18 /0/@diagram/@links.19 /0/@diagram/@links.25"
- name="ExtendedUMLLinks"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="used to add its own superclass"
- genView="/0/@diagram/@links.2 /0/@diagram/@links.1"
- name="AbstractAssociationEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AbstractAssociationEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="add superclass for short cut"
- genView="/0/@diagram/@topLevelNodes.16"
- name="AbstractShortCutDiagramEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortCutDiagramEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="abstract association branch for the association"
- genView="/0/@diagram/@links.3"
- name="AbstractAssociationBranchEditPat"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AbstractAssociationBranchEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="precise super to listen parameters"
- genView="/0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17"
- name="AbstractTemplateParameterEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AbstractTemplateParameterEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="ensure the refresh of the figure"
- genView="/0/@diagram/@childNodes.22"
- name="AbstractRedefinableTemplateSignatureEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AbstractRedefinableTemplateSignatureEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="add superclass for compartment"
- genView="/0/@diagram/@compartments.31 /0/@diagram/@compartments.21 /0/@diagram/@compartments.22 /0/@diagram/@compartments.23 /0/@diagram/@compartments.24 /0/@diagram/@compartments.25 /0/@diagram/@compartments.26 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.18 /0/@diagram/@compartments.19 /0/@diagram/@compartments.20 /0/@diagram/@compartments.29 /0/@diagram/@compartments.30 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.27 /0/@diagram/@compartments.28"
- name="ResizeableListCompartmentEditPart"
- superOwnedEditPart="org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
- comment="External node label locator"
- classpath="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator"
- genExternalNodeLabel="/0/@diagram/@topLevelNodes.18/@labels.1 /0/@diagram/@topLevelNodes.17/@labels.1 /0/@diagram/@topLevelNodes.17/@labels.0 /0/@diagram/@topLevelNodes.18/@labels.0"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocator"
- comment="Affixed Containment locator"
- classpath="org.eclipse.papyrus.uml.diagram.clazz.custom.locator.ContainmentPositionLocator"
- genChildSideAffixedNode="/0/@diagram/@childNodes.23"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="With the mecanism of around, the methods hasborderItems(self) is never call on the template. To have the right superclass, we declare it here."
- genView="/0/@diagram/@childNodes.23"
- name="AbstractBorderItemEditPart"
- superOwnedEditPart="org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="this is an extension to manage the comment"
- genView="/0/@diagram/@childNodes.36 /0/@diagram/@topLevelNodes.15"
- name="comment extended node"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="this is an extension for constraint "
- genView="/0/@diagram/@childNodes.37 /0/@diagram/@topLevelNodes.14"
- name="ConstraintEditPart extension"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Name of the shorcut diagram"
- genView="/0/@diagram/@topLevelNodes.16/@labels.0"
- name="AbstractShortcutDiagramNameEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortcutDiagramNameEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Extended Gen View For UML compartments child label nodes, like properties in classifier representation of class diagram"
- genView="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.21 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.50 /0/@diagram/@childNodes.51 /0/@diagram/@childNodes.52"
- name="UMLCompartmentEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocator"
- comment="precise the locator for a template signature"
- classpath="org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator"
- genChildSideAffixedNode="/0/@diagram/@childNodes.24"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:EditPartUsingDeleteService"
- comment="List of editpart using the delete service"
- name="DeleteService editpart List"
- genView="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.22 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.21 /0/@diagram/@childNodes.24 /0/@diagram/@topLevelNodes.0 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.6 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.8 /0/@diagram/@topLevelNodes.9 /0/@diagram/@topLevelNodes.11 /0/@diagram/@topLevelNodes.12 /0/@diagram/@topLevelNodes.13 /0/@diagram/@topLevelNodes.14 /0/@diagram/@topLevelNodes.15 /0/@diagram/@topLevelNodes.16 /0/@diagram/@topLevelNodes.17 /0/@diagram/@topLevelNodes.18 /0/@diagram/@topLevelNodes.19 /0/@diagram/@links.0 /0/@diagram/@links.1 /0/@diagram/@links.2 /0/@diagram/@links.3 /0/@diagram/@links.4 /0/@diagram/@links.5 /0/@diagram/@links.6 /0/@diagram/@links.7 /0/@diagram/@links.8 /0/@diagram/@links.9 /0/@diagram/@links.10 /0/@diagram/@links.11 /0/@diagram/@links.12 /0/@diagram/@links.13 /0/@diagram/@links.14 /0/@diagram/@links.15 /0/@diagram/@links.16 /0/@diagram/@links.17 /0/@diagram/@links.18 /0/@diagram/@links.19 /0/@diagram/@links.20 /0/@diagram/@links.21 /0/@diagram/@links.23 /0/@diagram/@links.24 /0/@diagram/@childNodes.20 /0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.32 /0/@diagram/@links.25 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.50 /0/@diagram/@childNodes.51 /0/@diagram/@childNodes.52"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:EditPartUsingReorientService"
- comment="use the reorient service for Generalization"
- name="ReorientService for Generalization"
- genView="/0/@diagram/@links.4"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:CompartmentTitleVisibilityPreference"
- comment="Hidden Compartments Title"
- visibleByDefault="false"
- compartments="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /0/@diagram/@compartments.17 /0/@diagram/@compartments.18 /0/@diagram/@compartments.19 /0/@diagram/@compartments.20 /0/@diagram/@compartments.21 /0/@diagram/@compartments.22 /0/@diagram/@compartments.23 /0/@diagram/@compartments.24 /0/@diagram/@compartments.25 /0/@diagram/@compartments.26 /0/@diagram/@compartments.29 /0/@diagram/@compartments.30 /0/@diagram/@compartments.31 /0/@diagram/@compartments.32 /0/@diagram/@compartments.33 /0/@diagram/@compartments.34 /0/@diagram/@compartments.35 /0/@diagram/@compartments.36 /0/@diagram/@compartments.37 /0/@diagram/@compartments.38 /0/@diagram/@compartments.39 /0/@diagram/@compartments.40 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.27 /0/@diagram/@compartments.28"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="This edit part allow double click on this XYlayout compartment"
- genView="/0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.35"
- name="PackageableElementCompartment"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AbstractPackageableElementCompartmentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment=""
- genView="/0/@diagram/@topLevelNodes.2"
- name="AssociationNodeEditPart"
- superOwnedEditPart="org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:CustomDiagramUpdaterSingleton"
- comment="Override the generated UMLDiagramUpdater, to change generated code for multi association, multi dependency and context link"
- singletonPath="org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater.INSTANCE"/>
- </papyrusgmfgenextension:PapyrusExtensionRootNode>
-</xmi:XMI>
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
+ xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
+ <gmfgen:GenEditorGenerator
+ packageNamePrefix="org.eclipse.papyrus.uml.diagram.clazz"
+ modelID="PapyrusUMLClassDiagram"
+ domainFileExtension="PapyrusUMLClass"
+ dynamicTemplates="true"
+ templateDirectory="/org.eclipse.papyrus.def/xtend/"
+ copyrightText="Copyright (c) 2014 CEA LIST.&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation">
+ <diagram
+ visualID="1000"
+ editPartClassName="ModelEditPart"
+ itemSemanticEditPolicyClassName="ModelItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ModelCanonicalEditPolicy"
+ iconProviderPriority="Low"
+ validationEnabled="true"
+ validationDecorators="true"
+ liveValidationUIFeedback="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="PackageEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.AbstractShowHideRelatedLinkEditPolicy.SHOW_HIDE_RELATED_LINK_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ShowHideRelatedLinkEditPolicy"/>
+ <domainDiagramElement
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3012"
+ editPartClassName="PropertyForClassEditPart"
+ itemSemanticEditPolicyClassName="PropertyForClassItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PropertyForClassCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PropertyForClassGraphicalNodeEditPolicy"
+ createCommandClassName="PropertyForClassCreateCommand"
+ containers="/0/@diagram/@compartments.18 /0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.1/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.PropertyFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedAttribute"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedAttribute"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3002"
+ editPartClassName="PropertyForComponentEditPart"
+ itemSemanticEditPolicyClassName="PropertyForComponentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PropertyCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PropertyForComponentGraphicalNodeEditPolicy"
+ createCommandClassName="PropertyForComponentCreateCommand"
+ containers="/0/@diagram/@compartments.21 /0/@diagram/@compartments.3 /0/@diagram/@compartments.31">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="PropertyEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.PropertyFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedAttribute"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedAttribute"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3005"
+ editPartClassName="PropertyForSignalEditPart"
+ itemSemanticEditPolicyClassName="PropertyForSignalItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PropertyForSignalCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PropertyForSignalGraphicalNodeEditPolicy"
+ createCommandClassName="PropertyForSignalCreateCommand"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.33">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.1/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.PropertyFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal/ownedAttribute"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal/ownedAttribute"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.3/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/MultiplicityElement/lower"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.3/@expressions.1">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/MultiplicityElement/upper"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3006"
+ editPartClassName="PropertyForInterfaceEditPart"
+ itemSemanticEditPolicyClassName="PropertyForInterfaceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PropertyForInterfaceCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PropertyForInterfaceGraphicalNodeEditPolicy"
+ createCommandClassName="PropertyForInterfaceCreateCommand"
+ containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.24">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.1/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.PropertyFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/ownedAttribute"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/ownedAttribute"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3041"
+ editPartClassName="PropertyforPrimitiveTypeEditPart"
+ itemSemanticEditPolicyClassName="PropertyforPrimitiveTypeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PropertyforPrimitiveTypeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PropertyforPrimitiveTypeGraphicalNodeEditPolicy"
+ createCommandClassName="PropertyforPrimitiveTypeCreateCommand"
+ containers="/0/@diagram/@compartments.27 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.1/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.PropertyFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedAttribute"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedAttribute"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3018"
+ editPartClassName="PropertyforDataTypeEditPart"
+ itemSemanticEditPolicyClassName="PropertyforDataTypeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PropertyforDataTypeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PropertyforDataTypeGraphicalNodeEditPolicy"
+ createCommandClassName="PropertyforDataTypeCreateCommand"
+ containers="/0/@diagram/@compartments.29 /0/@diagram/@compartments.12">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.1/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.PropertyFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedAttribute"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedAttribute"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3014"
+ editPartClassName="NestedClassForClassEditPart"
+ itemSemanticEditPolicyClassName="NestedClassForClassItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedClassForClassCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedClassForClassGraphicalNodeEditPolicy"
+ createCommandClassName="NestedClassForClassCreateCommand"
+ containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.20"
+ labelElementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.7/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3004"
+ editPartClassName="NestedClassForComponentEditPart"
+ itemSemanticEditPolicyClassName="NestedClassForComponentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedClassForComponentCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedClassForComponentGraphicalNodeEditPolicy"
+ createCommandClassName="NestedClassForComponentCreateCommand"
+ containers="/0/@diagram/@compartments.23 /0/@diagram/@compartments.5 /0/@diagram/@compartments.38"
+ labelElementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ClassEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3008"
+ editPartClassName="NestedClassForInterfaceEditPart"
+ itemSemanticEditPolicyClassName="NestedClassForInterfaceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedClassForInterfaceCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedClassForInterfaceGraphicalNodeEditPolicy"
+ createCommandClassName="NestedClassForInterfaceCreateCommand"
+ containers="/0/@diagram/@compartments.26 /0/@diagram/@compartments.9"
+ labelElementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.7/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3013"
+ editPartClassName="OperationForClassEditPart"
+ itemSemanticEditPolicyClassName="OperationForClassItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="OperationForClassCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OperationForClassGraphicalNodeEditPolicy"
+ createCommandClassName="OperationForClassCommand"
+ containers="/0/@diagram/@compartments.19 /0/@diagram/@compartments.1">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.10/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.OperationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedOperation"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedOperation"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3003"
+ editPartClassName="OperationForComponentEditPart"
+ itemSemanticEditPolicyClassName="OperationItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="OperationForComponentCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OperationForComponentGraphicalNodeEditPolicy"
+ createCommandClassName="OperationForComponentCreateCommand"
+ containers="/0/@diagram/@compartments.22 /0/@diagram/@compartments.4 /0/@diagram/@compartments.37">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="OperationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.OperationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedOperation"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedOperation"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3007"
+ editPartClassName="OperationForInterfaceEditpart"
+ itemSemanticEditPolicyClassName="OperationForInterfaceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="OperationForInterfaceCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OperationForInterfaceGraphicalNodeEditPolicy"
+ createCommandClassName="OperationForInterfaceCreateCommand"
+ containers="/0/@diagram/@compartments.25 /0/@diagram/@compartments.8">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.10/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.OperationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/ownedOperation"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/ownedOperation"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3042"
+ editPartClassName="OperationForPrimitiveTypeEditPart"
+ itemSemanticEditPolicyClassName="OperationForPrimitiveTypeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="OperationForPrimitiveTypeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OperationForPrimitiveTypeGraphicalNodeEditPolicy"
+ createCommandClassName="OperationForPrimitiveTypeCreateCommand"
+ containers="/0/@diagram/@compartments.28 /0/@diagram/@compartments.11">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.10/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.OperationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedOperation"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedOperation"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3019"
+ editPartClassName="OperationForDataTypeEditPart"
+ itemSemanticEditPolicyClassName="OperationForDataTypeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="OperationForDataTypeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OperationForDataTypeGraphicalNodeEditPolicy"
+ createCommandClassName="OperationForDataTypeCreateCommand"
+ containers="/0/@diagram/@compartments.13 /0/@diagram/@compartments.30">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.10/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.OperationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedOperation"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedOperation"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3034"
+ editPartClassName="ConnectableElementTemplateParameterEditPart"
+ itemSemanticEditPolicyClassName="ConnectableElementTemplateParameterItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ConnectableElementTemplateParameterCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ConnectableElementTemplateParameterGraphicalNodeEditPolicy"
+ createCommandClassName="ConnectableElementTemplateParameterCreateCommand"
+ containers="/0/@diagram/@compartments.39">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ClassifierTemplateParameterEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateParameterFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy.TEMPLATE_PARAMETER_DISPLAY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ConnectableElementTemplateParameter"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/ownedParameter"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/parameter"/>
+ </modelFacet>
+ <labelModelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3035"
+ editPartClassName="OperationTemplateParameterEditPart"
+ itemSemanticEditPolicyClassName="OperationTemplateParameterItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="OperationTemplateParameterCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="OperationTemplateParameterGraphicalNodeEditPolicy"
+ createCommandClassName="OperationTemplateParameterCreateCommand"
+ containers="/0/@diagram/@compartments.40 /0/@diagram/@compartments.39">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ClassifierTemplateParameterEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateParameterFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy.TEMPLATE_PARAMETER_DISPLAY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.OperationTemplateParamaterDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/OperationTemplateParameter"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/ownedParameter"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/parameter"/>
+ </modelFacet>
+ <labelModelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3031"
+ editPartClassName="ClassifierTemplateParameterEditPart"
+ itemSemanticEditPolicyClassName="ClassifierTemplateParameterItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ClassifierTemplateParameterCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ClassifierTemplateParameterGraphicalNodeEditPolicy"
+ createCommandClassName="ClassifierTemplateParameterCreateCommand"
+ containers="/0/@diagram/@compartments.39 /0/@diagram/@compartments.40">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ClassifierTemplateParameterEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateParameterFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy.TEMPLATE_PARAMETER_DISPLAY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ClassifierTemplateParameter"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/ownedParameter"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/parameter"/>
+ </modelFacet>
+ <labelModelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3016"
+ editPartClassName="TemplateParameterEditPart"
+ itemSemanticEditPolicyClassName="TemplateParameterItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="TemplateParameterCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="TemplateParameterGraphicalNodeEditPolicy"
+ createCommandClassName="TemplateParameterCreateCommand"
+ containers="/0/@diagram/@compartments.39 /0/@diagram/@compartments.40">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="TemplateParameterEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateParameterFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy.TEMPLATE_PARAMETER_DISPLAY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateParamaterDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateParameter"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/ownedParameter"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature/parameter"/>
+ </modelFacet>
+ <labelModelFacet
+ parser="/0/@labelParsers/@implementations.6"/>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3017"
+ editPartClassName="EnumerationLiteralEditPart"
+ itemSemanticEditPolicyClassName="EnumerationLiteralItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="EnumerationLiteralCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="EnumerationLiteralGraphicalNodeEditPolicy"
+ createCommandClassName="EnumerationLiteralCreateCommand"
+ containers="/0/@diagram/@compartments.16 /0/@diagram/@compartments.36"
+ labelElementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="EnumerationLiteralEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.LiteralEnumerationFigure"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/EnumerationLiteral"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration/ownedLiteral"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration/ownedLiteral"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3011"
+ editPartClassName="ReceptionEditPart"
+ itemSemanticEditPolicyClassName="ReceptionItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ReceptionCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ReceptionGraphicalNodeEditPolicy"
+ createCommandClassName="ReceptionCreateCommand"
+ containers="/0/@diagram/@compartments.19 /0/@diagram/@compartments.1 /0/@diagram/@compartments.4 /0/@diagram/@compartments.22"
+ labelElementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ReceptionEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.ReceptionFigure"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Reception"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedReception"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedReception"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="\u00ABSignal\u00BB {0}"
+ editorPattern="{0}"
+ editPattern="{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3039"
+ editPartClassName="ReceptionInInterfaceEditPart"
+ itemSemanticEditPolicyClassName="ReceptionInInterfaceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ReceptionInInterfaceCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ReceptionInInterfaceGraphicalNodeEditPolicy"
+ createCommandClassName="ReceptionInInterfaceCreateCommand"
+ containers="/0/@diagram/@compartments.8 /0/@diagram/@compartments.25"
+ labelElementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ReceptionEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.ReceptionFigure"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Reception"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/ownedReception"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/ownedReception"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="\u00ABSignal\u00BB {0}"
+ editorPattern="{0}"
+ editPattern="{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3030"
+ editPartClassName="SlotEditPart"
+ itemSemanticEditPolicyClassName="SlotItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="SlotCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="SlotGraphicalNodeEditPolicy"
+ createCommandClassName="SlotCreateCommand"
+ containers="/0/@diagram/@compartments.32 /0/@diagram/@compartments.17">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Slot_3030"
+ displayName="Slot"
+ editHelperClassName="SlotEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.SlotDisplayEditPolicy.SLOT_DISPLAY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.SlotDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Slot"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification/slot"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification/slot"/>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.5"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Slot/definingFeature"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3015"
+ editPartClassName="RedefinableTemplateSignatureEditPart"
+ itemSemanticEditPolicyClassName="RedefinableTemplateSignatureItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="RedefinableTemplateSignatureCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.39"
+ graphicalNodeEditPolicyClassName="RedefinableTemplateSignatureGraphicalNodeEditPolicy"
+ createCommandClassName="RedefinableTemplateSignatureCreateCommand"
+ containers="/0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.27 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.13 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.35 /0/@diagram/@topLevelNodes.6 /0/@diagram/@topLevelNodes.9 /0/@diagram/@childNodes.29 /0/@diagram/@topLevelNodes.11 /0/@diagram/@topLevelNodes.4"
+ preferredSideName="EAST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="RedefinableTemplateSignatureEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomRedefinableTemplateSignatureItemSemanticEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/RedefinableTemplateSignature"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateableElement/ownedTemplateSignature"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateableElement/ownedTemplateSignature"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3032"
+ editPartClassName="ContainmentCircleEditPart"
+ itemSemanticEditPolicyClassName="ContainmentCircleItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ContainmentCircleCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ContainmentCircleGraphicalNodeEditPolicy"
+ createCommandClassName="ContainmentCircleCreateCommand"
+ containers="/0/@diagram/@topLevelNodes.11"
+ preferredSideName="NORTH">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:NotationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.ContainmentCircle_3032"
+ displayName="ContainmentCircle"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.ContainmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomContainmentCircleItemSemanticEditPolicy"/>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="3033"
+ editPartClassName="TemplateSignatureEditPart"
+ itemSemanticEditPolicyClassName="TemplateSignatureItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="TemplateSignatureCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.40"
+ graphicalNodeEditPolicyClassName="TemplateSignatureGraphicalNodeEditPolicy"
+ createCommandClassName="TemplateSignatureCreateCommand"
+ containers="/0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.9 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.31"
+ preferredSideName="EAST">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="RedefinableTemplateSignatureEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomRedefinableTemplateSignatureItemSemanticEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateSignature"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateableElement/ownedTemplateSignature"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateableElement/ownedTemplateSignature"/>
+ </modelFacet>
+ </childNodes>
+ <childNodes
+ visualID="3020"
+ editPartClassName="InstanceSpecificationEditPartCN"
+ itemSemanticEditPolicyClassName="InstanceSpecificationItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="InstanceSpecificationCanonicalEditPolicyCN"
+ compartments="/0/@diagram/@compartments.17"
+ graphicalNodeEditPolicyClassName="InstanceSpecificationGraphicalNodeEditPolicyCN"
+ createCommandClassName="InstanceSpecificationCreateCommandCN"
+ containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.3/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.InstanceSpecificationFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInstanceSpecificationItemSemanticEditPolicyCN"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5040"
+ editPartClassName="InstanceSpecificationNameEditPartCN"
+ itemSemanticEditPolicyClassName="InstanceSpecificationNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InstanceSpecificationNameLabelEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8509"
+ editPartClassName="InstanceSpecificationFloatingNameEditPartCN"
+ itemSemanticEditPolicyClassName="InstanceSpecificationFloatingNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3021"
+ editPartClassName="ComponentEditPartCN"
+ itemSemanticEditPolicyClassName="ComponentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ComponentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.22"
+ compartments="/0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5"
+ graphicalNodeEditPolicyClassName="ComponentGraphicalNodeEditPolicyCN"
+ createCommandClassName="ComponentCreateCommandCN"
+ containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.4/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ComponentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomComponentItemSemanticEditPolicyCN"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5043"
+ editPartClassName="ComponentNameEditPartCN"
+ itemSemanticEditPolicyClassName="ComponentNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8513"
+ editPartClassName="ComponentFloatingNameEditPartCN"
+ itemSemanticEditPolicyClassName="ComponentFloatingNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3022"
+ editPartClassName="SignalEditPartCN"
+ itemSemanticEditPolicyClassName="SignalItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="SignalCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.22"
+ compartments="/0/@diagram/@compartments.6"
+ graphicalNodeEditPolicyClassName="SignalGraphicalNodeEditPolicyCN"
+ createCommandClassName="SignalCreateCommandCN"
+ containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.5/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.SignalFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomSignalItemSemanticEditPolicyCN"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5046"
+ editPartClassName="SignalNameEditPartCN"
+ itemSemanticEditPolicyClassName="SignalNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8514"
+ editPartClassName="SignalFloatingNameEditPartCN"
+ itemSemanticEditPolicyClassName="SignalFloatingNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3023"
+ editPartClassName="InterfaceEditPartCN"
+ itemSemanticEditPolicyClassName="InterfaceItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="InterfaceCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.22"
+ compartments="/0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9"
+ graphicalNodeEditPolicyClassName="InterfaceGraphicalNodeEditPolicyCN"
+ createCommandClassName="InterfaceCreateCommandCN"
+ containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.6/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.InterfaceFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInterfaceItemSemanticEditPolicyCN"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5049"
+ editPartClassName="InterfaceNameEditPartCN"
+ itemSemanticEditPolicyClassName="InterfaceNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8515"
+ editPartClassName="InterfaceFloatingNameEditPartCN"
+ itemSemanticEditPolicyClassName="InterfaceFloatingNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3024"
+ editPartClassName="ModelEditPartCN"
+ itemSemanticEditPolicyClassName="ModelItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ModelCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.22 /0/@diagram/@childNodes.24"
+ compartments="/0/@diagram/@compartments.14"
+ graphicalNodeEditPolicyClassName="ModelGraphicalNodeEditPolicyCN"
+ createCommandClassName="ModelCreateCommandCN"
+ containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.7/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="200"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomModelItemSemanticEditPolicyCN"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Model"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5052"
+ editPartClassName="ModelNameEditPartCN"
+ itemSemanticEditPolicyClassName="ModelNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3025"
+ editPartClassName="EnumerationEditPartCN"
+ itemSemanticEditPolicyClassName="EnumerationItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="EnumerationCanonicalEditPolicyCN"
+ compartments="/0/@diagram/@compartments.16"
+ graphicalNodeEditPolicyClassName="EnumerationGraphicalNodeEditPolicyCN"
+ createCommandClassName="EnumerationCreateCommandCN"
+ containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="EnumerationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomEnumerationItemSemanticEditPolicyCN"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5055"
+ editPartClassName="EnumerationNameEditPartCN"
+ itemSemanticEditPolicyClassName="EnumerationNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8516"
+ editPartClassName="EnumerationFloatingNameEditPartCN"
+ itemSemanticEditPolicyClassName="EnumerationFloatingNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3009"
+ editPartClassName="PackageEditPartCN"
+ itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="PackageCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.22 /0/@diagram/@childNodes.24"
+ compartments="/0/@diagram/@compartments.15"
+ graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicyCN"
+ createCommandClassName="PackageCreateCommandCN"
+ containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="200"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5017"
+ editPartClassName="PackageNameEditPartCN"
+ itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3040"
+ editPartClassName="InformationItemEditPartCN"
+ itemSemanticEditPolicyClassName="InformationItemItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="InformationItemCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="InformationItemGraphicalNodeEditPolicyCN"
+ createCommandClassName="InformationItemCreateCommandCN"
+ containers="/0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.nodes.InformationItemFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInformationItemItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InformationItem"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5162"
+ editPartClassName="InformationItemNameEditPartCN"
+ itemSemanticEditPolicyClassName="InformationItemNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8517"
+ editPartClassName="InformationItemFloatingNameEditPartCN"
+ itemSemanticEditPolicyClassName="InformationItemFloatingNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3010"
+ editPartClassName="ClassEditPartCN"
+ itemSemanticEditPolicyClassName="ClassItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ClassCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.22"
+ compartments="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.2"
+ graphicalNodeEditPolicyClassName="ClassGraphicalNodeEditPolicyCN"
+ createCommandClassName="ClassCreateCommandCN"
+ containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.7/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicyCN"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5014"
+ editPartClassName="ClassNameEditPartCN"
+ itemSemanticEditPolicyClassName="ClassNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8518"
+ editPartClassName="ClassFloatingNameEditPartCN"
+ itemSemanticEditPolicyClassName="ClassFloatingNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3026"
+ editPartClassName="PrimitiveTypeEditPartCN"
+ itemSemanticEditPolicyClassName="PrimitiveTypeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="PrimitiveTypeCanonicalEditPolicyCN"
+ compartments="/0/@diagram/@compartments.10 /0/@diagram/@compartments.11"
+ graphicalNodeEditPolicyClassName="PrimitiveTypeGraphicalNodeEditPolicyCN"
+ createCommandClassName="PrimitiveTypeCreateCommandCN"
+ containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="PrimitiveTypeEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="50"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicyCN"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5058"
+ editPartClassName="PrimitiveTypeNameEditPartCN"
+ itemSemanticEditPolicyClassName="PrimitiveTypeNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8519"
+ editPartClassName="PrimitiveTypeFloatingNameEditPartCN"
+ itemSemanticEditPolicyClassName="PrimitiveTypeFloatingNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3027"
+ editPartClassName="DataTypeEditPartCN"
+ itemSemanticEditPolicyClassName="DataTypeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="DataTypeCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.22"
+ compartments="/0/@diagram/@compartments.12 /0/@diagram/@compartments.13"
+ graphicalNodeEditPolicyClassName="DataTypeGraphicalNodeEditPolicyCN"
+ createCommandClassName="DataTypeCreateCommandCN"
+ containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="DataTypeEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomDataTypeItemSemanticEditPolicyCN"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5061"
+ editPartClassName="DataTypeNameEditPartCN"
+ itemSemanticEditPolicyClassName="DataTypeNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8520"
+ editPartClassName="DataTypeFloatingNameEditPartCN"
+ itemSemanticEditPolicyClassName="DataTypeFloatingNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3028"
+ editPartClassName="CommentEditPartCN"
+ itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="CommentCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyCN"
+ createCommandClassName="CommentCreateCommandCN"
+ containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="CommentEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5063"
+ editPartClassName="CommentBodyEditPartCN"
+ itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCornerBentFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.7"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3029"
+ editPartClassName="ConstraintEditPartCN"
+ itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyCN"
+ createCommandClassName="ConstraintCreateCommandCN"
+ containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.14 /0/@diagram/@compartments.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ConstraintEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomConstraint2ItemSemanticEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5064"
+ editPartClassName="ConstraintNameEditPartCN"
+ itemSemanticEditPolicyClassName="ConstraintName2ItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5160"
+ editPartClassName="ConstraintBodyEditPartCN"
+ itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.8"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3036"
+ editPartClassName="NestedInterfaceForClassEditPart"
+ itemSemanticEditPolicyClassName="NestedInterfaceForClassItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedInterfaceForClassCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedInterfaceForClassGraphicalNodeEditPolicy"
+ createCommandClassName="NestedInterfaceForClassCreateCommand"
+ containers="/0/@diagram/@compartments.20 /0/@diagram/@compartments.2">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.6/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3037"
+ editPartClassName="NestedInterfaceForComponentEditPart"
+ itemSemanticEditPolicyClassName="NestedInterfaceForComponentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedInterfaceForComponentCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedInterfaceForComponentGraphicalNodeEditPolicy"
+ createCommandClassName="NestedInterfaceForComponentCreateCommand"
+ containers="/0/@diagram/@compartments.23 /0/@diagram/@compartments.5">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_3037"
+ displayName="Interface"
+ editHelperClassName="InterfaceEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3038"
+ editPartClassName="NestedInterfaceForInterfaceEditPart"
+ itemSemanticEditPolicyClassName="NestedInterfaceForInterfaceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedInterfaceForInterfaceCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedInterfaceForInterfaceGraphicalNodeEditPolicy"
+ createCommandClassName="NestedInterfaceForInterfaceCreateCommand"
+ containers="/0/@diagram/@compartments.26 /0/@diagram/@compartments.9">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Interface_3038"
+ displayName="Interface"
+ metamodelType="/0/@diagram/@childNodes.39/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3052"
+ editPartClassName="NestedEnumerationForClassEditPart"
+ itemSemanticEditPolicyClassName="NestedEnumerationForClassItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedEnumerationForClassCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedEnumerationForClassGraphicalNodeEditPolicy"
+ createCommandClassName="NestedEnumerationForClassCreateCommand"
+ containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.20">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3052"
+ displayName="Enumeration"
+ metamodelType="/0/@diagram/@childNodes.30/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3053"
+ editPartClassName="NestedEnumerationForComponentEditPart"
+ itemSemanticEditPolicyClassName="NestedEnumerationForComponentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedEnumerationForComponentCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedEnumerationForComponentGraphicalNodeEditPolicy"
+ createCommandClassName="NestedEnumerationForComponentCreateCommand"
+ containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.23">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3053"
+ displayName="Enumeration"
+ metamodelType="/0/@diagram/@childNodes.30/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3054"
+ editPartClassName="NestedEnumerationForInterfaceEditPart"
+ itemSemanticEditPolicyClassName="NestedEnumerationForInterfaceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedEnumerationForInterfaceCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedEnumerationForInterfaceGraphicalNodeEditPolicy"
+ createCommandClassName="NestedEnumerationForInterfaceCreateCommand"
+ containers="/0/@diagram/@compartments.9 /0/@diagram/@compartments.26">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3054"
+ displayName="Enumeration"
+ metamodelType="/0/@diagram/@childNodes.30/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3047"
+ editPartClassName="NestedPrimitiveTypeForClassEditPart"
+ itemSemanticEditPolicyClassName="NestedPrimitiveTypeForClassItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedPrimitiveTypeForClassCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedPrimitiveTypeForClassGraphicalNodeEditPolicy"
+ createCommandClassName="NestedPrimitiveTypeForClassCreateCommand"
+ containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.20">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3047"
+ displayName="PrimitiveType"
+ metamodelType="/0/@diagram/@childNodes.34/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3046"
+ editPartClassName="NestedPrimitiveTypeForComponentEditPart"
+ itemSemanticEditPolicyClassName="NestedPrimitiveTypeForComponentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedPrimitiveTypeForComponentCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedPrimitiveTypeForComponentGraphicalNodeEditPolicy"
+ createCommandClassName="NestedPrimitiveTypeForComponentCreateCommand"
+ containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.23">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3046"
+ displayName="PrimitiveType"
+ metamodelType="/0/@diagram/@childNodes.34/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3048"
+ editPartClassName="NestedPrimitiveTypeForInterfaceEditPart"
+ itemSemanticEditPolicyClassName="NestedPrimitiveTypeForInterfaceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedPrimitiveTypeForInterfaceCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedPrimitiveTypeForInterfaceGraphicalNodeEditPolicy"
+ createCommandClassName="NestedPrimitiveTypeForInterfaceCreateCommand"
+ containers="/0/@diagram/@compartments.9 /0/@diagram/@compartments.26">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3048"
+ displayName="PrimitiveType"
+ metamodelType="/0/@diagram/@childNodes.34/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3044"
+ editPartClassName="NestedDataTypeForClassEditPart"
+ itemSemanticEditPolicyClassName="NestedDataTypeForClassItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedDataTypeForClassCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedDataTypeForClassGraphicalNodeEditPolicy"
+ createCommandClassName="NestedDataTypeForClassCreateCommand"
+ containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.20">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3044"
+ displayName="DataType"
+ metamodelType="/0/@diagram/@childNodes.35/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3045"
+ editPartClassName="NestedDataTypeForComponentEditPart"
+ itemSemanticEditPolicyClassName="NestedDataTypeForComponentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedDataTypeForComponentCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedDataTypeForComponentGraphicalNodeEditPolicy"
+ createCommandClassName="NestedDataTypeForComponentCreateCommand"
+ containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.23">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3045"
+ displayName="DataType"
+ metamodelType="/0/@diagram/@childNodes.35/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3043"
+ editPartClassName="NestedDataTypeForInterfaceEditPart"
+ itemSemanticEditPolicyClassName="NestedDataTypeForInterfaceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedDataTypeForInterfaceCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedDataTypeForInterfaceGraphicalNodeEditPolicy"
+ createCommandClassName="NestedDataTypeForInterfaceCreateCommand"
+ containers="/0/@diagram/@compartments.9 /0/@diagram/@compartments.26">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.DataType_3043"
+ displayName="DataType"
+ metamodelType="/0/@diagram/@childNodes.35/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3050"
+ editPartClassName="NestedSignalForClassEditPart"
+ itemSemanticEditPolicyClassName="NestedSignalForClassItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedSignalForClassCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedSignalForClassGraphicalNodeEditPolicy"
+ createCommandClassName="NestedSignalForClassCreateCommand"
+ containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.20">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3050"
+ displayName="Signal"
+ metamodelType="/0/@diagram/@topLevelNodes.5/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3051"
+ editPartClassName="NestedSignalForComponentEditPart"
+ itemSemanticEditPolicyClassName="NestedSignalForComponentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedSignalForComponentCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedSignalForComponentGraphicalNodeEditPolicy"
+ createCommandClassName="NestedSignalForComponentCreateCommand"
+ containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.23">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3051"
+ displayName="Signal"
+ metamodelType="/0/@diagram/@topLevelNodes.5/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3049"
+ editPartClassName="NestedSignalForInterfaceEditPart"
+ itemSemanticEditPolicyClassName="NestedSignalForInterfaceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NestedSignalForInterfaceCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="NestedSignalForInterfaceGraphicalNodeEditPolicy"
+ createCommandClassName="NestedSignalForInterfaceCreateCommand"
+ containers="/0/@diagram/@compartments.9 /0/@diagram/@compartments.26">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.Signal_3049"
+ displayName="Signal"
+ metamodelType="/0/@diagram/@topLevelNodes.5/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <topLevelNodes
+ visualID="2014"
+ editPartClassName="DependencyNodeEditPart"
+ itemSemanticEditPolicyClassName="DependencyNodeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DependencyCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DependencyGraphicalNodeEditPolicy"
+ createCommandClassName="DependencyNodeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ displayName="DependencyNode"
+ editHelperClassName="DependencyEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="10"
+ height="10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="1"
+ editPartClassName="MultiDependencyLabelEditPart"
+ itemSemanticEditPolicyClassName="MultiDependencyLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8522"
+ editPartClassName="DependencyFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="DependencyFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2013"
+ editPartClassName="AssociationClassEditPart"
+ itemSemanticEditPolicyClassName="AssociationClassItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AssociationClassCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.31 /0/@diagram/@compartments.37 /0/@diagram/@compartments.38"
+ graphicalNodeEditPolicyClassName="AssociationClassGraphicalNodeEditPolicy"
+ createCommandClassName="AssociationClassCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="AssociationClassEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAssociationClassItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AssociationClass"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5066"
+ editPartClassName="AssociationClassNameEditPart"
+ itemSemanticEditPolicyClassName="AssociationClassNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8504"
+ editPartClassName="AssociationClassFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="AssociationClassFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2015"
+ editPartClassName="AssociationNodeEditPart"
+ itemSemanticEditPolicyClassName="AssociationNodeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AssociationCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="AssociationGraphicalNodeEditPolicy"
+ createCommandClassName="AssociationNodeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ displayName="AssociationNode"
+ editHelperClassName="AssociationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAssociationNodeItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8521"
+ editPartClassName="AssociationFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="AssociationFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2001"
+ editPartClassName="InstanceSpecificationEditPart"
+ itemSemanticEditPolicyClassName="InstanceSpecificationItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InstanceSpecificationCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.32"
+ graphicalNodeEditPolicyClassName="InstanceSpecificationGraphicalNodeEditPolicy"
+ createCommandClassName="InstanceSpecificationCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="InstanceSpecificationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.InstanceSpecificationFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInstanceSpecificationItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5002"
+ editPartClassName="InstanceSpecificationNameEditPart"
+ itemSemanticEditPolicyClassName="InstanceSpecificationNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InstanceSpecificationNameLabelEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8505"
+ editPartClassName="InstanceSpecificationFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="InstanceSpecificationFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2002"
+ editPartClassName="ComponentEditPart"
+ itemSemanticEditPolicyClassName="ComponentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ComponentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.22"
+ compartments="/0/@diagram/@compartments.21 /0/@diagram/@compartments.22 /0/@diagram/@compartments.23"
+ graphicalNodeEditPolicyClassName="ComponentGraphicalNodeEditPolicy"
+ createCommandClassName="ComponentCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ComponentEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ComponentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomComponentItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5005"
+ editPartClassName="ComponentNameEditPart"
+ itemSemanticEditPolicyClassName="ComponentNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8503"
+ editPartClassName="ComponentFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="ComponentFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2003"
+ editPartClassName="SignalEditPart"
+ itemSemanticEditPolicyClassName="SignalItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="SignalCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.22"
+ compartments="/0/@diagram/@compartments.33"
+ graphicalNodeEditPolicyClassName="SignalGraphicalNodeEditPolicy"
+ createCommandClassName="SignalCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="SignalEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.SignalFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomSignalItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Signal"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5008"
+ editPartClassName="SignalNameEditPart"
+ itemSemanticEditPolicyClassName="SignalNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8506"
+ editPartClassName="SignalFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="SignalFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2004"
+ editPartClassName="InterfaceEditPart"
+ itemSemanticEditPolicyClassName="InterfaceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InterfaceCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.22"
+ compartments="/0/@diagram/@compartments.24 /0/@diagram/@compartments.25 /0/@diagram/@compartments.26"
+ graphicalNodeEditPolicyClassName="InterfaceGraphicalNodeEditPolicy"
+ createCommandClassName="InterfaceCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="InterfaceEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.InterfaceFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInterfaceItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5011"
+ editPartClassName="InterfaceNameEditPart"
+ itemSemanticEditPolicyClassName="InterfaceNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8507"
+ editPartClassName="InterfaceFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="InterfaceFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2005"
+ editPartClassName="ModelEditPartTN"
+ itemSemanticEditPolicyClassName="ModelItemSemanticEditPolicyTN"
+ canonicalEditPolicyClassName="ModelCanonicalEditPolicyTN"
+ childNodes="/0/@diagram/@childNodes.22 /0/@diagram/@childNodes.24"
+ compartments="/0/@diagram/@compartments.34"
+ graphicalNodeEditPolicyClassName="ModelGraphicalNodeEditPolicyTN"
+ createCommandClassName="ModelCreateCommandTN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ModelEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="200"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomModelItemSemanticEditPolicyTN"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Model"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5020"
+ editPartClassName="ModelNameEditPartTN"
+ itemSemanticEditPolicyClassName="ModelNameItemSemanticEditPolicyTN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2006"
+ editPartClassName="EnumerationEditPart"
+ itemSemanticEditPolicyClassName="EnumerationItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="EnumerationCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.36"
+ graphicalNodeEditPolicyClassName="EnumerationGraphicalNodeEditPolicy"
+ createCommandClassName="EnumerationCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.30/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomEnumerationItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5023"
+ editPartClassName="EnumerationNameEditPart"
+ itemSemanticEditPolicyClassName="EnumerationNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8508"
+ editPartClassName="EnumerationFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="EnumerationFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2007"
+ editPartClassName="PackageEditPart"
+ itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PackageCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.22 /0/@diagram/@childNodes.24"
+ compartments="/0/@diagram/@compartments.35"
+ graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicy"
+ createCommandClassName="PackageCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="200"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomViewComponentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomPackageItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5026"
+ editPartClassName="PackageNameEditPart"
+ itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2099">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.nodes.InformationItemFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInformationItemItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InformationItem"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5161"
+ editPartClassName="InformationItemNameEditPart"
+ itemSemanticEditPolicyClassName="InformationItemNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8512"
+ editPartClassName="InformationItemFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="InformationItemFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2008"
+ editPartClassName="ClassEditPart"
+ itemSemanticEditPolicyClassName="ClassItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ClassCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.22 /0/@diagram/@childNodes.23"
+ compartments="/0/@diagram/@compartments.18 /0/@diagram/@compartments.19 /0/@diagram/@compartments.20"
+ graphicalNodeEditPolicyClassName="ClassGraphicalNodeEditPolicy"
+ createCommandClassName="ClassCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.7/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomViewComponentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5029"
+ editPartClassName="ClassNameEditPart"
+ itemSemanticEditPolicyClassName="ClassNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8510"
+ editPartClassName="ClassFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="ClassFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2009"
+ editPartClassName="PrimitiveTypeEditPart"
+ itemSemanticEditPolicyClassName="PrimitiveTypeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PrimitiveTypeCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.27 /0/@diagram/@compartments.28"
+ graphicalNodeEditPolicyClassName="PrimitiveTypeGraphicalNodeEditPolicy"
+ createCommandClassName="PrimitiveTypeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.34/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="50"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomViewComponentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5032"
+ editPartClassName="PrimitiveTypeNameEditPart"
+ itemSemanticEditPolicyClassName="PrimitiveTypeNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8511"
+ editPartClassName="PrimitiveTypeFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="PrimitiveTypeFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2010"
+ editPartClassName="DataTypeEditPart"
+ itemSemanticEditPolicyClassName="DataTypeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DataTypeCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.22"
+ compartments="/0/@diagram/@compartments.29 /0/@diagram/@compartments.30"
+ graphicalNodeEditPolicyClassName="DataTypeGraphicalNodeEditPolicy"
+ createCommandClassName="DataTypeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.35/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomDataTypeItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5035"
+ editPartClassName="DataTypeNameEditPart"
+ itemSemanticEditPolicyClassName="DataTypeNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8502"
+ editPartClassName="DataTypeFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="DataTypeFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2011"
+ editPartClassName="ConstraintEditPart"
+ itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ConstraintCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicy"
+ createCommandClassName="ConstraintCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.37/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomConstraintItemSemanticEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5037"
+ editPartClassName="ConstraintNameEditPart"
+ itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5159"
+ editPartClassName="ConstraintBodyEditPart"
+ itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.8"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2012"
+ editPartClassName="CommentEditPart"
+ itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="CommentCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicy"
+ createCommandClassName="CommentCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.36/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5038"
+ editPartClassName="CommentBodyEditPart"
+ itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCornerBentFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.7"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2016"
+ editPartClassName="ShortCutDiagramEditPart"
+ itemSemanticEditPolicyClassName="ShortCutDiagramItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ShortCutDiagramCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ShortCutDiagramGraphicalNodeEditPolicy"
+ createCommandClassName="ShortCutDiagramCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ displayName="ShortCutDiagram"
+ editHelperClassName="ShortCutDiagramEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DiagramNodeFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.OPEN_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShortCutDiagramEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomShortcutDiagramItemSemanticEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.9">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2095"
+ editPartClassName="DurationObservationEditPart"
+ itemSemanticEditPolicyClassName="DurationObservationItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DurationObservationCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DurationObservationGraphicalNodeEditPolicy"
+ createCommandClassName="DurationObservationCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="DurationObservationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomDurationObservationItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationObservation"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5155"
+ editPartClassName="DurationObservationFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="DurationObservationFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5156"
+ editPartClassName="DurationObservationStereotypeLabelEditPart"
+ itemSemanticEditPolicyClassName="DurationObservationStereotypeLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2096"
+ editPartClassName="TimeObservationEditPart"
+ itemSemanticEditPolicyClassName="TimeObservationItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="TimeObservationCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="TimeObservationGraphicalNodeEditPolicy"
+ createCommandClassName="TimeObservationCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="TimeObservationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomTimeObservationItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeObservation"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5153"
+ editPartClassName="TimeObservationFloatingNameEditPart"
+ itemSemanticEditPolicyClassName="TimeObservationFloatingNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5154"
+ editPartClassName="TimeObservationStereotypeLabelEditPart"
+ itemSemanticEditPolicyClassName="TimeObservationStereotypeLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2097"
+ editPartClassName="DefaultNamedElementEditPart"
+ itemSemanticEditPolicyClassName="DefaultNamedElementItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DefaultNamedElementCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DefaultNamedElementGraphicalNodeEditPolicy"
+ createCommandClassName="DefaultNamedElementCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ displayName="DefaultNamedElement"
+ editHelperClassName="DefaultNamedElementEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="50"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomDefaultNamedElementItemSemanticEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ </modelFacet>
+ <labels
+ visualID="5157"
+ editPartClassName="DefaultNamedElementNameEditPart"
+ itemSemanticEditPolicyClassName="DefaultNamedElementNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <links
+ visualID="4016"
+ editPartClassName="AssociationClassDashedLinkEditPart"
+ itemSemanticEditPolicyClassName="AssociationClassDashedLinkItemSemanticEditPolicy"
+ createCommandClassName="AssociationClassDashedLinkCreateCommand"
+ reorientCommandClassName="AssociationClassDashedLinkReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:NotationType"
+ displayName="AssociationClassDashedLink"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ </links>
+ <links
+ visualID="4017"
+ editPartClassName="AssociationClassLinkEditPart"
+ itemSemanticEditPolicyClassName="AssociationClassLinkItemSemanticEditPolicy"
+ createCommandClassName="AssociationClassLinkCreateCommand"
+ reorientCommandClassName="AssociationClassLinkReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ displayName="AssociationClassLink"
+ metamodelType="/0/@diagram/@topLevelNodes.1/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.AssociationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAssociationClassLinkItemSemanticEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/AssociationClass"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
+ </modelFacet>
+ <labels
+ visualID="6031"
+ editPartClassName="AssociationClassRoleSourceEditPart"
+ itemSemanticEditPolicyClassName="AssociationClassRoleSourceItemSemanticEditPolicy"
+ readOnly="true"
+ alignment="SOURCE">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getRoleSourceLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="srcRole{0}"
+ editorPattern="srcRole{0}"
+ editPattern="srcRole{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6032"
+ editPartClassName="AssociationClassRoleTargetEditPart"
+ itemSemanticEditPolicyClassName="AssociationClassRoleTargetSemanticEditPolicy"
+ readOnly="true"
+ alignment="TARGET">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getRoleTargetLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="targetRole{0}"
+ editorPattern="targetRole{0}"
+ editPattern="targetRole{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4001"
+ editPartClassName="AssociationEditPart"
+ itemSemanticEditPolicyClassName="AssociationItemSemanticEditPolicy"
+ createCommandClassName="AssociationCreateCommand"
+ reorientCommandClassName="AssociationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ displayName="AssociationLink"
+ metamodelType="/0/@diagram/@topLevelNodes.2/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.AssociationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAssociationItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
+ </modelFacet>
+ <labels
+ visualID="6001"
+ editPartClassName="AppliedStereotypeAssociationEditPart"
+ itemSemanticEditPolicyClassName="AssociationNameItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeAssociationLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6002"
+ editPartClassName="AssociationNameEditPart"
+ itemSemanticEditPolicyClassName="AssociationNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAssociationNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6003"
+ editPartClassName="AssociationTargetNameEditPart"
+ itemSemanticEditPolicyClassName="AssociationTargetNameItemSemanticEditPolicy"
+ readOnly="true"
+ alignment="SOURCE">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getRoleTargetLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="srcRole{0}"
+ editorPattern="srcRole{0}"
+ editPattern="srcRole{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6005"
+ editPartClassName="AssociationSourceNameEditPart"
+ itemSemanticEditPolicyClassName="AssociationSourceNameItemSemanticEditPolicy"
+ readOnly="true"
+ alignment="TARGET">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getRoleSourceLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="targMul{0}"
+ editorPattern="targMul{0}"
+ editPattern="targMul{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6033"
+ editPartClassName="AssociationMultiplicitySourceEditPart"
+ itemSemanticEditPolicyClassName="AssociationMultiplicitySourceSemanticEditPolicy"
+ readOnly="true"
+ alignment="TARGET">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getMultiplicitySourceLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceMultiplicityEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="srcMul{0}"
+ editorPattern="srcMul{0}"
+ editPattern="srcMul{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6034"
+ editPartClassName="AssociationMultiplicityTargetEditPart"
+ itemSemanticEditPolicyClassName="AssociationMultiplicityTargetSemanticEditPolicy"
+ readOnly="true"
+ alignment="SOURCE">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getMultiplicityTargetLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetMultiplicityEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="srcMul{0}"
+ editorPattern="srcMul{0}"
+ editPattern="srcMul{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4019"
+ editPartClassName="AssociationBranchEditPart"
+ itemSemanticEditPolicyClassName="AssociationBranchItemSemanticEditPolicy"
+ createCommandClassName="AssociationBranchCreateCommand"
+ reorientCommandClassName="AssociationBranchReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ displayName="AssociationBranchLink"
+ metamodelType="/0/@diagram/@topLevelNodes.2/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.AssociationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAssociationBranchItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
+ </modelFacet>
+ <labels
+ visualID="6024"
+ editPartClassName="AssociationBranchRoleEditPart"
+ itemSemanticEditPolicyClassName="AssociationBranchRoleItemSemanticEditPolicy"
+ readOnly="true"
+ alignment="SOURCE">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getRoleSourceLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern="srcRole{0}"
+ editorPattern="srcRole{0}"
+ editPattern="srcRole{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6035"
+ editPartClassName="AssociationBranchMutliplicityEditPart"
+ itemSemanticEditPolicyClassName="AssociationBranchRoleItemSemanticEditPolicy"
+ readOnly="true"
+ alignment="SOURCE">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getMultiplicitySourceLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetMultiplicityEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="srcRole{0}"
+ editorPattern="srcRole{0}"
+ editPattern="srcRole{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4002"
+ editPartClassName="GeneralizationEditPart"
+ itemSemanticEditPolicyClassName="GeneralizationItemSemanticEditPolicy"
+ createCommandClassName="GeneralizationCreateCommand"
+ reorientCommandClassName="GeneralizationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="GeneralizationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.GeneralizationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomGeneralizationItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/general"/>
+ </modelFacet>
+ <labels
+ visualID="6007"
+ editPartClassName="AppliedStereotyperGeneralizationEditPart"
+ itemSemanticEditPolicyClassName="GeneralizationIsSubstitutableItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/isSubstitutable"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4003"
+ editPartClassName="InterfaceRealizationEditPart"
+ itemSemanticEditPolicyClassName="InterfaceRealizationItemSemanticEditPolicy"
+ createCommandClassName="InterfaceRealizationCreateCommand"
+ reorientCommandClassName="InterfaceRealizationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="InterfaceRealizationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.InterfaceRealizationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInterfaceRealizationItemSemanticEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InterfaceRealization"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/BehavioredClassifier/interfaceRealization"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/BehavioredClassifier/interfaceRealization"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InterfaceRealization/contract"/>
+ </modelFacet>
+ <labels
+ visualID="6008"
+ editPartClassName="AppliedStereotypeInterfaceRealizationEditPart"
+ itemSemanticEditPolicyClassName="AppliedStereotypeInterfaceRealizationNameItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6009"
+ editPartClassName="InterfaceRealizationNameEditPart"
+ itemSemanticEditPolicyClassName="InterfaceRealizationNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4004"
+ editPartClassName="SubstitutionEditPart"
+ itemSemanticEditPolicyClassName="SubstitutionItemSemanticEditPolicy"
+ createCommandClassName="SubstitutionCreateCommand"
+ reorientCommandClassName="SubstitutionReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="SubstitutionEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomSubstitutionItemSemanticEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Substitution"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/substitution"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/substitution"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Substitution/substitutingClassifier"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Substitution/contract"/>
+ </modelFacet>
+ <labels
+ visualID="6010"
+ editPartClassName="AppliedStereotypeSubstitutionEditPart"
+ itemSemanticEditPolicyClassName="SubstitutionNameItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6011"
+ editPartClassName="SubstitutionNameEditPart"
+ itemSemanticEditPolicyClassName="SubstitutionNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4005"
+ editPartClassName="RealizationEditPart"
+ itemSemanticEditPolicyClassName="RealizationItemSemanticEditPolicy"
+ createCommandClassName="RealizationCreateCommand"
+ reorientCommandClassName="RealizationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="RealizationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.InterfaceRealizationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomRealizationItemSemanticEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Realization"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ </modelFacet>
+ <labels
+ visualID="6012"
+ editPartClassName="AppliedStereotypeRealizationEditPart"
+ itemSemanticEditPolicyClassName="RealizationNameItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6013"
+ editPartClassName="RealizationNameEditPart"
+ itemSemanticEditPolicyClassName="RealizationNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4006"
+ editPartClassName="AbstractionEditPart"
+ itemSemanticEditPolicyClassName="AbstractionItemSemanticEditPolicy"
+ createCommandClassName="AbstractionCreateCommand"
+ reorientCommandClassName="AbstractionReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="AbstractionEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeAbstractionLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAbstractionItemSemanticEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Abstraction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ </modelFacet>
+ <labels
+ visualID="6014"
+ editPartClassName="AbstractionNameEditPart"
+ itemSemanticEditPolicyClassName="AbstractionNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6015"
+ editPartClassName="AppliedStereotypeAbstractionEditPart"
+ itemSemanticEditPolicyClassName="AbstractionName2ItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4007"
+ editPartClassName="UsageEditPart"
+ itemSemanticEditPolicyClassName="UsageItemSemanticEditPolicy"
+ createCommandClassName="UsageCreateCommand"
+ reorientCommandClassName="UsageReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="UsageEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeUsageLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomUsageItemSemanticEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Usage"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ </modelFacet>
+ <labels
+ visualID="6016"
+ editPartClassName="UsageNameEditPart"
+ itemSemanticEditPolicyClassName="UsageNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6017"
+ editPartClassName="AppliedStereotypeUsageEditPart"
+ itemSemanticEditPolicyClassName="UsageName2ItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4008"
+ editPartClassName="DependencyEditPart"
+ itemSemanticEditPolicyClassName="DependencyItemSemanticEditPolicy"
+ createCommandClassName="DependencyCreateCommand"
+ reorientCommandClassName="DependencyReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ displayName="DependencyLink"
+ metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ </modelFacet>
+ <labels
+ visualID="6026"
+ editPartClassName="DependencyNameEditPart"
+ itemSemanticEditPolicyClassName="DependencyNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6027"
+ editPartClassName="AppliedStereotypeDependencyEditPart"
+ itemSemanticEditPolicyClassName="DependencyName2ItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4018"
+ editPartClassName="DependencyBranchEditPart"
+ itemSemanticEditPolicyClassName="DependencyBranchSemanticEditPolicy"
+ createCommandClassName="Dependency3CreateCommand"
+ reorientCommandClassName="Dependency2ReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ displayName="DependencyBranchLink"
+ metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4009"
+ editPartClassName="ElementImportEditPart"
+ itemSemanticEditPolicyClassName="ElementImportItemSemanticEditPolicy"
+ createCommandClassName="ElementImportCreateCommand"
+ reorientCommandClassName="ElementImportReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ElementImportEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeElementImportLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/elementImport"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/elementImport"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.2/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/alias"/>
+ </initializers>
+ </modelElementInitializer>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/importedElement"/>
+ </modelFacet>
+ <labels
+ visualID="6020"
+ editPartClassName="ElementImportAliasEditPart"
+ itemSemanticEditPolicyClassName="ElementImportAliasItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/alias"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6021"
+ editPartClassName="AppliedStereotypeElementImportEditPart"
+ itemSemanticEditPolicyClassName="ElementImportAlias2ItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/alias"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4010"
+ editPartClassName="PackageImportEditPart"
+ itemSemanticEditPolicyClassName="PackageImportItemSemanticEditPolicy"
+ createCommandClassName="PackageImportCreateCommand"
+ reorientCommandClassName="PackageImportReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="PackageImportEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypePackageImportLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/packageImport"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/packageImport"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport/importedPackage"/>
+ </modelFacet>
+ <labels
+ visualID="6022"
+ editPartClassName="AppliedStereotypePackageImportEditPart"
+ itemSemanticEditPolicyClassName="PackageImportVisibilityItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.4"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport/visibility"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4011"
+ editPartClassName="PackageMergeEditPart"
+ itemSemanticEditPolicyClassName="PackageMergeItemSemanticEditPolicy"
+ createCommandClassName="PackageMergeCreateCommand"
+ reorientCommandClassName="PackageMergeReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="PackageMergeEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypePackageMergeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageMerge"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packageMerge"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packageMerge"/>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageMerge/receivingPackage"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageMerge/mergedPackage"/>
+ </modelFacet>
+ <labels
+ visualID="6030"
+ editPartClassName="AppliedStereotypePackageMergeEditPart"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.3"/>
+ </labels>
+ </links>
+ <links
+ visualID="4012"
+ editPartClassName="ProfileApplicationEditPart"
+ itemSemanticEditPolicyClassName="ProfileApplicationItemSemanticEditPolicy"
+ createCommandClassName="ProfileApplicationCreateCommand"
+ reorientCommandClassName="ProfileApplicationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ProfileApplicationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ProfileApplication"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/profileApplication"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/profileApplication"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ProfileApplication/appliedProfile"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4013"
+ editPartClassName="CommentAnnotatedElementEditPart"
+ itemSemanticEditPolicyClassName="CommentAnnotatedElementItemSemanticEditPolicy"
+ createCommandClassName="CommentAnnotatedElementCreateCommand"
+ reorientCommandClassName="CommentAnnotatedElementReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4014"
+ editPartClassName="ConstraintConstrainedElementEditPart"
+ itemSemanticEditPolicyClassName="ConstraintConstrainedElementItemSemanticEditPolicy"
+ createCommandClassName="ConstraintConstrainedElementCreateCommand"
+ reorientCommandClassName="ConstraintConstrainedElementReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4015"
+ editPartClassName="TemplateBindingEditPart"
+ itemSemanticEditPolicyClassName="TemplateBindingItemSemanticEditPolicy"
+ createCommandClassName="TemplateBindingCreateCommand"
+ reorientCommandClassName="TemplateBindingReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="TemplateBindingEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateBindingFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateBinding"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateableElement/templateBinding"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateableElement/templateBinding"/>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateBinding/boundElement"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TemplateBinding/boundElement"/>
+ </modelFacet>
+ <labels
+ visualID="6023"
+ editPartClassName="BindingSubstitutionEditPart"
+ itemSemanticEditPolicyClassName="BindingSubstitutionItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getBindingSubstitutionFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.BindingSubstitutionFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateBindingDisplayEditPolicy.TEMPLATE_PARAMETER_DISPLAY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateBindingDisplayEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.10"/>
+ </labels>
+ <labels
+ visualID="6036"
+ editPartClassName="AppliedStereotypeTemplateBindingEditPart"
+ itemSemanticEditPolicyClassName="AppliedStereotypeTemplateBindingItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.3"/>
+ </labels>
+ </links>
+ <links
+ visualID="4020"
+ editPartClassName="GeneralizationSetEditPart"
+ itemSemanticEditPolicyClassName="GeneralizationSetItemSemanticEditPolicy"
+ createCommandClassName="GeneralizationSetCreateCommand"
+ reorientCommandClassName="GeneralizationSetReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ displayName="GeneralizationSet"
+ editHelperClassName="GeneralizationSetEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.GeneralizationSet"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;CustomDisplay&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.GeneralizationSetLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/GeneralizationSet"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/GeneralizationSet/generalization"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/GeneralizationSet/generalization"/>
+ </modelFacet>
+ <labels
+ visualID="5067"
+ editPartClassName="ConstraintLabelEditPart"
+ itemSemanticEditPolicyClassName="ConstraintLabelItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.2"
+ viewPattern="{0},{1}"
+ editorPattern="{0},{1}"
+ editPattern="{0},{1}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/GeneralizationSet/isCovering"/>
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/GeneralizationSet/isDisjoint"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6037"
+ editPartClassName="AppliedStereotypeGeneralizationSetLabelEditPart"
+ itemSemanticEditPolicyClassName="AppliedStereotypeGeneralizationSetLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.3"/>
+ </labels>
+ </links>
+ <links
+ visualID="4021"
+ editPartClassName="InstanceSpecificationLinkEditPart"
+ itemSemanticEditPolicyClassName="InstanceSpecificationLinkItemSemanticEditPolicy"
+ createCommandClassName="InstanceSpecificationLinkCreateCommand"
+ reorientCommandClassName="InstanceSpecificationLinkReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecificationLink_4021"
+ displayName="InstanceSpecificationLink"
+ editHelperClassName="InstanceSpecificationLinkEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.InstanceSpecificationLinkFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification/slot"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InstanceSpecification/slot"/>
+ </modelFacet>
+ <labels
+ visualID="6039"
+ editPartClassName="SourceISLinkLabelEditPart"
+ itemSemanticEditPolicyClassName="SourceISLinkLabelItemSemanticEditPolicy"
+ readOnly="true"
+ alignment="SOURCE">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/DecorationNode"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getSourceLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InstanceSpecificationRoleDisplayEditPolicy.INSTANCE_SPECIFICATION_ROLE_DISPLAY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ISRoleSourceDisplayEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.11"/>
+ </labels>
+ <labels
+ visualID="6038"
+ editPartClassName="TargetISLinkLabelEditPart"
+ itemSemanticEditPolicyClassName="TargetISLinkLabelItemSemanticEditPolicy"
+ readOnly="true"
+ alignment="TARGET">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/DecorationNode"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getTargetLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InstanceSpecificationRoleDisplayEditPolicy.INSTANCE_SPECIFICATION_ROLE_DISPLAY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ISRoleTargetDisplayEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.12"/>
+ </labels>
+ </links>
+ <links
+ visualID="4022"
+ editPartClassName="ContainmentSubLinkEditPart"
+ itemSemanticEditPolicyClassName="ContainmentSubLinkCreateCommandItemSemanticEditPolicy"
+ createCommandClassName="ContainmentSubLinkCreateCommand"
+ reorientCommandClassName="ContainmentSubLinkCreateCommandReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:NotationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.AddedLink_4022"
+ displayName="ContainmentSubLink"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.AddedLinkFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomViewComponentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomContainmentSubLinkItemSemanticEditPolicy"/>
+ </links>
+ <links
+ visualID="4023"
+ editPartClassName="ContainmentLinkEditPart"
+ itemSemanticEditPolicyClassName="ContainmentLinkItemSemanticEditPolicy"
+ createCommandClassName="ContainmentLinkCreateCommand"
+ reorientCommandClassName="ContainmentLinkReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:NotationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.clazz.ContainmentLink_4023"
+ displayName="ContainmentLink"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.AddedLinkFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomViewComponentEditPolicy"/>
+ </links>
+ <links
+ visualID="4024"
+ editPartClassName="ConnectorTimeObservationEditPart"
+ itemSemanticEditPolicyClassName="ConnectorTimeObservationItemSemanticEditPolicy"
+ createCommandClassName="ConnectorTimeObservationCreateCommand"
+ reorientCommandClassName="ConnectorTimeObservationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeObservation/event"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4025"
+ editPartClassName="ConnectorDurationObservationEditPart"
+ itemSemanticEditPolicyClassName="ConnectorDurationObservationItemSemanticEditPolicy"
+ createCommandClassName="ConnectorDurationObservationCreateCommand"
+ reorientCommandClassName="ConnectorDurationObservationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationObservation/event"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4026">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.InformationFlowFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AppliedStereotypeInformationFlowLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InformationFlow"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InformationFlow/informationSource"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/InformationFlow/informationTarget"/>
+ </modelFacet>
+ <labels
+ visualID="6040"
+ editPartClassName="InformationFlowConveyedLabelEditPart"
+ itemSemanticEditPolicyClassName="InformationFlowConveyedLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConveyedLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="30"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InformationFlowCustomLabelEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6041"
+ editPartClassName="InformationFlowAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="InformationFlowAppliedStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="15"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.NoSemanticParserEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <creationConstraints
+ sourceEnd="/0/@expressionProviders/@providers.0/@expressions.2"
+ targetEnd="/0/@expressionProviders/@providers.0/@expressions.3"/>
+ </links>
+ <links
+ visualID="8500"
+ editPartClassName="ContextLinkEditPart"
+ itemSemanticEditPolicyClassName="ContextLinkItemSemanticEditPolicy"
+ createCommandClassName="ContextLinkCreateCommand"
+ reorientCommandClassName="ContextLinkReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ displayName="Undefined"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.figure.CustomContextLinkFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/context"/>
+ </modelFacet>
+ <labels
+ visualID="8501"
+ editPartClassName="ContextLinkAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ContextLinkAppliedStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="15"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.NoSemanticParserEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <compartments
+ visualID="7011"
+ editPartClassName="ClassAttributeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ClassAttributeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ClassAttributeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.0"
+ title="attributes"
+ node="/0/@diagram/@childNodes.33">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAttributeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7012"
+ editPartClassName="ClassOperationCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ClassOperationCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ClassOperationCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.19 /0/@diagram/@childNodes.9"
+ title="operations"
+ node="/0/@diagram/@childNodes.33">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getOperationCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7013"
+ editPartClassName="ClassNestedClassifierCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ClassNestedClassifierCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ClassNestedClassifierCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.6 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.50"
+ title="nested classifiers"
+ node="/0/@diagram/@childNodes.33">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNestedClassifierFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7023"
+ editPartClassName="ComponentAttributeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ComponentAttributeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ComponentAttributeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1"
+ title="attributes"
+ node="/0/@diagram/@childNodes.26">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAttributeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7024"
+ editPartClassName="ComponentOperationCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ComponentOperationCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ComponentOperationCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.10 /0/@diagram/@childNodes.19"
+ title="operations"
+ node="/0/@diagram/@childNodes.26">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getOperationCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7025"
+ editPartClassName="ComponentNestedClassifierCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ComponentNestedClassifierCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ComponentNestedClassifierCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.51"
+ title="nested classifiers"
+ node="/0/@diagram/@childNodes.26">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNestedClassifierFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7026"
+ editPartClassName="SignalAttributeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="SignalAttributeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="SignalAttributeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.2"
+ title="attributes"
+ node="/0/@diagram/@childNodes.27">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAttributeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7027"
+ editPartClassName="InterfaceAttributeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="InterfaceAttributeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="InterfaceAttributeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.3"
+ title="attributes"
+ node="/0/@diagram/@childNodes.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAttributeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7028"
+ editPartClassName="InterfaceOperationCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="InterfaceOperationCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="InterfaceOperationCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.11 /0/@diagram/@childNodes.20"
+ title="operations"
+ node="/0/@diagram/@childNodes.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getOperationCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7029"
+ editPartClassName="InterfaceNestedClassifierCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="InterfaceNestedClassifierCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.52"
+ title="nested classifiers"
+ node="/0/@diagram/@childNodes.28">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNestedClassifierFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7041"
+ editPartClassName="PrimitiveTypeAttributeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="PrimitiveTypeAttributeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="PrimitiveTypeAttributeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.4"
+ title="attributes"
+ node="/0/@diagram/@childNodes.34">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAttributeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7042"
+ editPartClassName="PrimitiveTypeOperationCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="PrimitiveTypeOperationCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="PrimitiveTypeOperationCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.12"
+ title="operations"
+ node="/0/@diagram/@childNodes.34">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getOperationCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7032"
+ editPartClassName="DataTypeAttributeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.5"
+ title="attributes"
+ node="/0/@diagram/@childNodes.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAttributeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7033"
+ editPartClassName="DataTypeOperationCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.13"
+ title="operations"
+ node="/0/@diagram/@childNodes.35">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getOperationCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7030"
+ editPartClassName="ModelPackageableElementCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.32"
+ title="packaged elements"
+ canCollapse="false"
+ node="/0/@diagram/@childNodes.29"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPackageableElementFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomContainmentCreationEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7010"
+ editPartClassName="PackagePackageableElementCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.32"
+ title="packaged elements"
+ canCollapse="false"
+ node="/0/@diagram/@childNodes.31"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPackageableElementFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomContainmentCreationEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7031"
+ editPartClassName="EnumerationEnumerationLiteralCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.18"
+ title="EnumerationLiteralCompartment"
+ node="/0/@diagram/@childNodes.30">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getEnumerationLiteralCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7035"
+ editPartClassName="InstanceSpecificationSlotCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="InstanceSpecificationSlotCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="InstanceSpecificationSlotCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.21"
+ title="slots"
+ node="/0/@diagram/@childNodes.25">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getSlotCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7017"
+ editPartClassName="ClassAttributeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ClassAttributeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ClassAttributeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.0"
+ title="attributes"
+ node="/0/@diagram/@topLevelNodes.11">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAttributeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7018"
+ editPartClassName="ClassOperationCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ClassOperationCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ClassOperationCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.19 /0/@diagram/@childNodes.9"
+ title="operations"
+ node="/0/@diagram/@topLevelNodes.11">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getOperationCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7019"
+ editPartClassName="ClassNestedClassifierCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ClassNestedClassifierCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ClassNestedClassifierCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.6 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.50"
+ title="nested classifiers"
+ node="/0/@diagram/@topLevelNodes.11">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNestedClassifierFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7002"
+ editPartClassName="ComponentAttributeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ComponentAttributeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ComponentAttributeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1"
+ title="attributes"
+ node="/0/@diagram/@topLevelNodes.4">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAttributeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7003"
+ editPartClassName="ComponentOperationCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ComponentOperationCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ComponentOperationCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.10 /0/@diagram/@childNodes.19"
+ title="operations"
+ node="/0/@diagram/@topLevelNodes.4">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getOperationCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7004"
+ editPartClassName="ComponentNestedClassifierCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ComponentNestedClassifierCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ComponentNestedClassifierCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.51"
+ title="nested classifiers"
+ node="/0/@diagram/@topLevelNodes.4">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNestedClassifierFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7006"
+ editPartClassName="InterfaceAttributeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="InterfaceAttributeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InterfaceAttributeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3"
+ title="attributes"
+ node="/0/@diagram/@topLevelNodes.6">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAttributeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7007"
+ editPartClassName="InterfaceOperationCompartmentEditPart"
+ itemSemanticEditPolicyClassName="InterfaceOperationCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InterfaceOperationCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.11 /0/@diagram/@childNodes.20"
+ title="operations"
+ node="/0/@diagram/@topLevelNodes.6">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getOperationCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7008"
+ editPartClassName="InterfaceNestedClassifierCompartmentEditPart"
+ itemSemanticEditPolicyClassName="InterfaceNestedClassifierCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InterfaceNestedClassifierCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.52"
+ title="nested classifiers"
+ node="/0/@diagram/@topLevelNodes.6">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNestedClassifierFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7039"
+ editPartClassName="PrimitiveTypeAttributeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="PrimitiveTypeAttributeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PrimitiveTypeAttributeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.4"
+ title="attributes"
+ node="/0/@diagram/@topLevelNodes.12">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAttributeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7040"
+ editPartClassName="PrimitiveTypeOperationCompartmentEditPart"
+ itemSemanticEditPolicyClassName="PrimitiveTypeOperationCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PrimitiveTypeOperationCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.12"
+ title="operations"
+ node="/0/@diagram/@topLevelNodes.12">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getOperationCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7020"
+ editPartClassName="DataTypeAttributeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.5"
+ title="attributes"
+ node="/0/@diagram/@topLevelNodes.13">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAttributeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7021"
+ editPartClassName="DataTypeOperationCompartmentEditPart"
+ itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.13"
+ title="operations"
+ node="/0/@diagram/@topLevelNodes.13">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getOperationCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7034"
+ editPartClassName="AssociationClassAttributeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="AssociationClassAttributeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AssociationClassAttributeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1"
+ title="attributes"
+ node="/0/@diagram/@topLevelNodes.1">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAttributeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7001"
+ editPartClassName="InstanceSpecificationSlotCompartmentEditPart"
+ itemSemanticEditPolicyClassName="InstanceSpecificationSlotCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InstanceSpecificationSlotCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.21"
+ title="slots"
+ node="/0/@diagram/@topLevelNodes.3">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getSlotCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7005"
+ editPartClassName="SignalAttributeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="SignalAttributeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="SignalAttributeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.2"
+ title="attributes"
+ node="/0/@diagram/@topLevelNodes.5">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAttributeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7009"
+ editPartClassName="ModelPackageableElementCompartmentEditPartTN"
+ itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyTN"
+ canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyTN"
+ childNodes="/0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.32"
+ title="packaged elements"
+ canCollapse="false"
+ node="/0/@diagram/@topLevelNodes.7"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPackageableElementFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomContainmentCreationEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7016"
+ editPartClassName="PackagePackageableElementCompartmentEditPart"
+ itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.32"
+ title="packaged elements"
+ canCollapse="false"
+ node="/0/@diagram/@topLevelNodes.9"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPackageableElementFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomContainmentCreationEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7015"
+ editPartClassName="EnumerationEnumerationLiteralCompartmentEditPart"
+ itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.18"
+ title="EnumerationLiteralCompartment"
+ node="/0/@diagram/@topLevelNodes.8">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getEnumerationLiteralCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7036"
+ editPartClassName="AssociationClassOperationCompartmentEditPart"
+ itemSemanticEditPolicyClassName="AssociationClassOperationCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AssociationClassOperationCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.10"
+ title="operations"
+ node="/0/@diagram/@topLevelNodes.1">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getOperationCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7037"
+ editPartClassName="AssociationClassNestedClassifierCompartmentEditPart"
+ itemSemanticEditPolicyClassName="AssociationClassNestedClassifierCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="AssociationClassNestedClassifierCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.7"
+ title="nested classifiers"
+ node="/0/@diagram/@topLevelNodes.1">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNestedClassifierFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.NestedClazzCompartmentCreationEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7014"
+ editPartClassName="RedefinableTemplateSignatureTemplateParameterCompartmentEditPart"
+ itemSemanticEditPolicyClassName="RedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="RedefinableTemplateSignatureTemplateParameterCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.16 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.17"
+ title="TemplateParameterCompartment"
+ canCollapse="false"
+ node="/0/@diagram/@childNodes.22">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getTemplateParameterRectangle"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CRedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7038"
+ editPartClassName="TemplateSignatureTemplateParameterCompartmentEditPart"
+ itemSemanticEditPolicyClassName="TemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="TemplateSignatureTemplateParameterCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.16 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.17"
+ title="TemplateParameterCompartment"
+ canCollapse="false"
+ node="/0/@diagram/@childNodes.24">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getTemplateParameterRectangle"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy"/>
+ </compartments>
+ <palette>
+ <groups
+ title="Nodes"
+ description="Nodes"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="&quot;clazz.group.nodes&quot;"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Class"
+ description="Create a new Class"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif"
+ id="&quot;clazz.tool.class&quot;"
+ genNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.6 /0/@diagram/@topLevelNodes.11"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="ClassifierTemplateParameter"
+ description="Create a ClassifiertemplateParameter"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ClassifierTemplateParameter.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ClassifierTemplateParameter.gif"
+ id="&quot;clazz.tool.classifiertemplateparameter&quot;"
+ genNodes="/0/@diagram/@childNodes.16"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Comment"
+ description="Create a comment"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ createMethodName="createComment5CreationTool"
+ id="&quot;clazz.tool.comment&quot;"
+ genNodes="/0/@diagram/@childNodes.36 /0/@diagram/@topLevelNodes.15"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Component"
+ description="Create a component"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
+ id="&quot;clazz.tool.component&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.4 /0/@diagram/@childNodes.26"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Constraint"
+ description="Create a constraint"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ id="&quot;clazz.tool.constraint&quot;"
+ genNodes="/0/@diagram/@childNodes.37 /0/@diagram/@topLevelNodes.14"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="DataType"
+ description="Create a new DataType"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
+ id="&quot;clazz.tool.datatype&quot;"
+ genNodes="/0/@diagram/@childNodes.35 /0/@diagram/@topLevelNodes.13 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.49"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="DurationObservation"
+ description="Create new DurationObservation"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
+ genNodes="/0/@diagram/@topLevelNodes.17"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Enumeration"
+ description="Create an enumeration"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"
+ id="&quot;clazz.tool.enumeration&quot;"
+ genNodes="/0/@diagram/@childNodes.30 /0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.43"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Enumeration literal"
+ description="Create an enumeration literal"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif"
+ id="&quot;clazz.tool.enumerationliteral&quot;"
+ genNodes="/0/@diagram/@childNodes.18"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Interface"
+ description="Create an interface"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
+ id="&quot;clazz.tool.interface&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.40"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="InstanceSpecification"
+ description="Create an InstanceSpecification"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InstanceSpecification.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InstanceSpecification.gif"
+ id="&quot;clazz.tool.instancespecification&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.3 /0/@diagram/@childNodes.25"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="InformationItem"
+ description="Create an InformationItem"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationItem.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationItem.gif"
+ id="&quot;clazz.tool.informationitem&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.32"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="PrimitiveType"
+ description="Create a Primitivetype"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"
+ id="&quot;clazz.tool.primitivetype&quot;"
+ genNodes="/0/@diagram/@childNodes.34 /0/@diagram/@topLevelNodes.12 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.46"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Model"
+ description="Create a model"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
+ id="&quot;clazz.tool.model&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.29"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Operation"
+ description="Create an operation"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
+ id="&quot;clazz.tool.operation&quot;"
+ genNodes="/0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.12"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="OperationTemplateParameter"
+ description="Create an OperationTemplateParameter"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OperationTemplateParameter.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OperationTemplateParameter.gif"
+ createMethodName="createOperationTemplateParameterCreationTool"
+ id="&quot;clazz.tool.OperationTemplateParameter&quot;"
+ genNodes="/0/@diagram/@childNodes.15"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Package"
+ description="Create new Package"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
+ id="&quot;clazz.tool.package&quot;"
+ genNodes="/0/@diagram/@childNodes.31 /0/@diagram/@topLevelNodes.9"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Property"
+ description="Create a new Property"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ id="&quot;clazz.tool.property&quot;"
+ genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.4"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Reception"
+ description="Create a reception"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif"
+ id="&quot;clazz.tool.reception&quot;"
+ genNodes="/0/@diagram/@childNodes.19 /0/@diagram/@childNodes.20"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="RedefinableTemplateSignature"
+ description="Create a RedefinableTemplateSignature"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/RedefinableTemplateSignature.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/RedefinableTemplateSignature.gif"
+ id="&quot;clazz.tool.redefinabletemplatesignature&quot;"
+ genNodes="/0/@diagram/@childNodes.22"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Signal"
+ description="Create a signal"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif"
+ id="&quot;clazz.tool.signal&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.50 /0/@diagram/@childNodes.51 /0/@diagram/@childNodes.52"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Slot"
+ description="Create a Slot"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Slot.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Slot.gif"
+ id="&quot;clazz.tool.slot&quot;"
+ genNodes="/0/@diagram/@childNodes.21"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="TemplateParameter"
+ description="Create a templateParameter"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateParameter.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateParameter.gif"
+ id="&quot;clazz.tool.templateparameter&quot;"
+ genNodes="/0/@diagram/@childNodes.17"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="TemplateSignature"
+ description="Create a TemplateSignature"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateSignature.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateSignature.gif"
+ createMethodName="createTemplateSignatureCreationTool"
+ id="&quot;clazz.tool.templatesignature&quot;"
+ genNodes="/0/@diagram/@childNodes.24"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="TimeObservation"
+ description="Create new TimeObservation"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
+ createMethodName="createTimeObservation22CreationTool"
+ id="&quot;createTimeObservation22CreationTool&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.18"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="ConnectableElementTemplateParameter"
+ description="Create a ConnectableElementTemplateParameter"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectableElementTemplateParameter.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectableElementTemplateParameter.gif"
+ id="&quot;clazz.tool.connectableelementtemplateparameter&quot;"
+ genNodes="/0/@diagram/@childNodes.14"/>
+ </groups>
+ <groups
+ title="Edges"
+ description="Edges"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="&quot;clazz.group.relationships&quot;"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Abstraction"
+ description="Create an Abstraction"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
+ id="&quot;clazz.tool.abstraction&quot;"
+ genLinks="/0/@diagram/@links.8"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Association"
+ description="Create an association"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ id="&quot;clazz.tool.association&quot;"
+ genLinks="/0/@diagram/@links.2"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="AssociationBranch"
+ description="Create an association branch"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ id="&quot;clazz.tool.associationbranch&quot;"
+ genLinks="/0/@diagram/@links.3"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="AssociationClass"
+ description="AssociationClass"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AssociationClass.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AssociationClass.gif"
+ id="&quot;clazz.tool.associationclass&quot;"
+ genLinks="/0/@diagram/@links.1"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="ContainmentLink"
+ description="Create a ContainmentLink"
+ largeIconPath="icons/obj16/ContainmentConnection.gif"
+ smallIconPath="icons/obj16/ContainmentConnection.gif"
+ id="&quot;clazz.tool.containmentlink&quot;"
+ genLinks="/0/@diagram/@links.22"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="ContextLink"
+ description="Creation of a context link for a Constraint"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ id="&quot;clazz.tool.contextlink&quot;"
+ genLinks="/0/@diagram/@links.26"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Dependency"
+ description="Create a dependency"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ id="&quot;clazz.tool.dependency&quot;"
+ genLinks="/0/@diagram/@links.10"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="DependencyBranch"
+ description="Create a dependency branch"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ id="&quot;clazz.tool.dependencybranch&quot;"
+ genLinks="/0/@diagram/@links.11"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="ElementImport"
+ description="Create a elementImport"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ElementImport.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ElementImport.gif"
+ id="&quot;clazz.tool.elementimport&quot;"
+ genLinks="/0/@diagram/@links.12"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Generalization"
+ description=" Create a generalization"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
+ id="&quot;clazz.tool.generalization&quot;"
+ genLinks="/0/@diagram/@links.4"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="GeneralizationSet"
+ description="GeneralizationSet"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralizationSet.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralizationSet.gif"
+ id="&quot;clazz.tool.generalizationset&quot;"
+ genLinks="/0/@diagram/@links.19"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="InformationFlow link"
+ description="Create an InformationFlow link"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationFlow.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationFlow.gif"
+ createMethodName="createInformationFlowLinkCreationTool"
+ id="&quot;clazz.tool.informationflowlink&quot;"
+ genLinks="/0/@diagram/@links.25"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="InstanceSpecification link"
+ description="Create an InstanceSpecification link"
+ largeIconPath="icons/obj16/InstanceLink.gif"
+ smallIconPath="icons/obj16/InstanceLink.gif"
+ createMethodName="createInstanceSpecificationLinkCreationTool"
+ id="&quot;clazz.tool.instancespecificationlink&quot;"
+ genLinks="/0/@diagram/@links.20"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="InterfaceRealization"
+ description="Create an InterfaceRealization"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif"
+ id="&quot;clazz.tool.interfacerealization&quot;"
+ genLinks="/0/@diagram/@links.5"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Link"
+ description="Creation of a link for comment, constraint, TimeObservation, DurationObservation"
+ largeIconPath="icons/obj16/Link.gif"
+ smallIconPath="icons/obj16/Link.gif"
+ id="&quot;clazz.tool.link&quot;"
+ genLinks="/0/@diagram/@links.16 /0/@diagram/@links.23 /0/@diagram/@links.24 /0/@diagram/@links.17"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="PackageImport"
+ description=" Create a packageImport"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif"
+ id="&quot;clazz.tool.packageimport&quot;"
+ genLinks="/0/@diagram/@links.13"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="PackageMerge"
+ description="Create a packageMerge"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif"
+ id="&quot;clazz.tool.packagemerge&quot;"
+ genLinks="/0/@diagram/@links.14"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="ProfileApplication"
+ description="Create a profileApplication"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif"
+ id="&quot;clazz.tool.profileapplication&quot;"
+ genLinks="/0/@diagram/@links.15"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Realization"
+ description="Create a Realization"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
+ id="&quot;clazz.tool.realization&quot;"
+ genLinks="/0/@diagram/@links.7"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Substitution"
+ description="Create a substitution"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Substitution.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Substitution.gif"
+ id="&quot;clazz.tool.substitution&quot;"
+ genLinks="/0/@diagram/@links.6"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="TemplateBinding"
+ description="Create a TemplateBinding"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateBinding.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateBinding.gif"
+ id="&quot;clazz.tool.templatebinding&quot;"
+ genLinks="/0/@diagram/@links.18"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Usage"
+ description="Create an Usage"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
+ id="&quot;clazz.tool.usage&quot;"
+ genLinks="/0/@diagram/@links.9"/>
+ </groups>
+ </palette>
+ <preferencePages
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.general"
+ name="UML Diagram">
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.appearance"
+ name="Appearance"
+ kind="Appearance"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.connections"
+ name="Connections"
+ kind="Connections"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.printing"
+ name="Printing"
+ kind="Printing"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
+ name="Rulers And Grid"
+ kind="RulersAndGrid"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.pathmaps"
+ name="Pathmaps"
+ kind="Pathmaps"/>
+ </preferencePages>
+ </diagram>
+ <plugin
+ iD="org.eclipse.papyrus.uml.diagram.clazz"
+ name="PapyrusUMLClassDiagram"
+ version="1.1.0.qualifier"/>
+ <editor/>
+ <navigator/>
+ <diagramUpdater/>
+ <propertySheet>
+ <tabs
+ xsi:type="gmfgen:GenStandardPropertyTab"
+ iD="appearance"/>
+ <tabs
+ xsi:type="gmfgen:GenStandardPropertyTab"
+ iD="diagram"/>
+ <tabs
+ xsi:type="gmfgen:GenCustomPropertyTab"
+ iD="domain"
+ label="Core">
+ <filter
+ xsi:type="gmfgen:TypeTabFilter">
+ <types>org.eclipse.gmf.runtime.notation.View</types>
+ <types>org.eclipse.gef.EditPart</types>
+ <generatedTypes>abstractNavigatorItem</generatedTypes>
+ </filter>
+ </tabs>
+ </propertySheet>
+ <domainGenModel
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
+ <expressionProviders>
+ <providers
+ xsi:type="gmfgen:GenJavaExpressionProvider"
+ injectExpressionBody="true">
+ <expressions
+ body="return org.eclipse.papyrus.uml.tools.utils.NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());"/>
+ <expressions
+ body="org.eclipse.uml2.uml.LiteralString literalString=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();&#xD;&#xA;literalString.setValue(&quot;&quot;);&#xD;&#xA;return literalString;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="//Information Flow source constraint&#xD;&#xA;if (source != null) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if (!((source instanceof org.eclipse.uml2.uml.Actor)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Node)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.UseCase)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Artifact)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Class)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Component)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Port)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Property)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Interface)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.Package)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.ActivityNode)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (source instanceof org.eclipse.uml2.uml.ActivityPartition) || (source instanceof org.eclipse.uml2.uml.InstanceSpecification))) {&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if (source instanceof org.eclipse.uml2.uml.InstanceSpecification) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;org.eclipse.emf.common.util.EList&lt; org.eclipse.uml2.uml.Classifier> classes = ((org.eclipse.uml2.uml.InstanceSpecification) source).getClassifiers();&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;for (int i = 0; i &lt; classes.size(); i++) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if (classes.get(i) instanceof org.eclipse.uml2.uml.Relationship) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="//Information Flow target constraint&#xD;&#xA;if (target != null) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if (!((target instanceof org.eclipse.uml2.uml.Actor)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Node)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.UseCase)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Artifact)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Class)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Component)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Port)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Property)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Interface)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.Package)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.ActivityNode)&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;|| (target instanceof org.eclipse.uml2.uml.ActivityPartition) || (target instanceof org.eclipse.uml2.uml.InstanceSpecification))) {&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if (target instanceof org.eclipse.uml2.uml.InstanceSpecification) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;org.eclipse.emf.common.util.EList&lt; org.eclipse.uml2.uml.Classifier> classes = ((org.eclipse.uml2.uml.InstanceSpecification) target).getClassifiers();&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;for (int i = 0; i &lt; classes.size(); i++) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if (classes.get(i) instanceof org.eclipse.uml2.uml.Relationship) {&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return false;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}"/>
+ </providers>
+ <providers
+ xsi:type="gmfgen:GenExpressionInterpreter">
+ <expressions
+ body="' '"/>
+ </providers>
+ <providers
+ xsi:type="gmfgen:GenJavaExpressionProvider"
+ injectExpressionBody="true">
+ <expressions
+ body="if (it.getImportedElement() != null) {&#xD;&#xA;&#x9;&#x9;&#x9;return (it.getImportedElement().getLabel());&#xD;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return &quot;elementimport&quot;;"/>
+ </providers>
+ <providers
+ xsi:type="gmfgen:GenLiteralExpressionProvider">
+ <expressions
+ body="0"/>
+ <expressions
+ body="1"/>
+ </providers>
+ </expressionProviders>
+ <labelParsers
+ packageName="org.eclipse.papyrus.uml.diagram.clazz.providers"
+ className="UMLParserProvider"
+ extensibleViaService="true">
+ <implementations
+ xsi:type="gmfgen:ExternalParser"
+ uses="/0/@diagram/@links.3/@labels.0/@modelFacet /0/@diagram/@childNodes.0/@labelModelFacet /0/@diagram/@childNodes.9/@labelModelFacet /0/@diagram/@links.25/@labels.0/@modelFacet /0/@diagram/@links.26/@labels.0/@modelFacet"/>
+ <implementations
+ xsi:type="gmfgen:PredefinedParser"
+ uses="/0/@diagram/@childNodes.1/@labelModelFacet /0/@diagram/@childNodes.10/@labelModelFacet /0/@diagram/@childNodes.7/@labelModelFacet /0/@diagram/@childNodes.2/@labelModelFacet /0/@diagram/@childNodes.3/@labelModelFacet /0/@diagram/@childNodes.11/@labelModelFacet /0/@diagram/@childNodes.8/@labelModelFacet /0/@diagram/@childNodes.18/@labelModelFacet /0/@diagram/@childNodes.19/@labelModelFacet /0/@diagram/@childNodes.6/@labelModelFacet /0/@diagram/@childNodes.5/@labelModelFacet /0/@diagram/@childNodes.13/@labelModelFacet /0/@diagram/@childNodes.25/@labels.0/@modelFacet /0/@diagram/@childNodes.26/@labels.0/@modelFacet /0/@diagram/@childNodes.27/@labels.0/@modelFacet /0/@diagram/@childNodes.28/@labels.0/@modelFacet /0/@diagram/@childNodes.29/@labels.0/@modelFacet /0/@diagram/@childNodes.30/@labels.0/@modelFacet /0/@diagram/@childNodes.31/@labels.0/@modelFacet /0/@diagram/@childNodes.33/@labels.0/@modelFacet /0/@diagram/@childNodes.34/@labels.0/@modelFacet /0/@diagram/@childNodes.35/@labels.0/@modelFacet /0/@diagram/@childNodes.37/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.1/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.3/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.7/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.8/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.9/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.11/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.12/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.13/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.14/@labels.0/@modelFacet /0/@diagram/@links.2/@labels.1/@modelFacet /0/@diagram/@links.2/@labels.2/@modelFacet /0/@diagram/@links.2/@labels.3/@modelFacet /0/@diagram/@links.4/@labels.0/@modelFacet /0/@diagram/@links.5/@labels.1/@modelFacet /0/@diagram/@links.6/@labels.1/@modelFacet /0/@diagram/@links.7/@labels.1/@modelFacet /0/@diagram/@links.8/@labels.0/@modelFacet /0/@diagram/@links.9/@labels.0/@modelFacet /0/@diagram/@links.10/@labels.0/@modelFacet /0/@diagram/@links.12/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.1/@modelFacet /0/@diagram/@links.1/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.19/@labels.0/@modelFacet /0/@diagram/@links.2/@labels.4/@modelFacet /0/@diagram/@links.2/@labels.5/@modelFacet /0/@diagram/@links.3/@labels.1/@modelFacet /0/@diagram/@childNodes.38/@labelModelFacet /0/@diagram/@childNodes.39/@labelModelFacet /0/@diagram/@childNodes.40/@labelModelFacet /0/@diagram/@childNodes.20/@labelModelFacet /0/@diagram/@topLevelNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.32/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labelModelFacet /0/@diagram/@childNodes.12/@labelModelFacet /0/@diagram/@childNodes.49/@labelModelFacet /0/@diagram/@childNodes.44/@labelModelFacet /0/@diagram/@childNodes.45/@labelModelFacet /0/@diagram/@childNodes.48/@labelModelFacet /0/@diagram/@childNodes.47/@labelModelFacet /0/@diagram/@childNodes.46/@labelModelFacet /0/@diagram/@childNodes.52/@labelModelFacet /0/@diagram/@childNodes.50/@labelModelFacet /0/@diagram/@childNodes.51/@labelModelFacet /0/@diagram/@childNodes.41/@labelModelFacet /0/@diagram/@childNodes.42/@labelModelFacet /0/@diagram/@childNodes.43/@labelModelFacet /0/@diagram/@topLevelNodes.13/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.4/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.8/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.11/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.18/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.17/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.1/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.3/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.12/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.4/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.10/@labels.1/@modelFacet /0/@diagram/@childNodes.25/@labels.1/@modelFacet /0/@diagram/@childNodes.26/@labels.1/@modelFacet /0/@diagram/@childNodes.27/@labels.1/@modelFacet /0/@diagram/@childNodes.28/@labels.1/@modelFacet /0/@diagram/@childNodes.30/@labels.1/@modelFacet /0/@diagram/@childNodes.32/@labels.1/@modelFacet /0/@diagram/@childNodes.33/@labels.1/@modelFacet /0/@diagram/@childNodes.34/@labels.1/@modelFacet /0/@diagram/@childNodes.35/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.2/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.1/@modelFacet"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.19/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.GeneralizationSetConstraintParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.2/@labels.0/@modelFacet /0/@diagram/@links.5/@labels.0/@modelFacet /0/@diagram/@links.6/@labels.0/@modelFacet /0/@diagram/@links.7/@labels.0/@modelFacet /0/@diagram/@links.8/@labels.1/@modelFacet /0/@diagram/@links.9/@labels.1/@modelFacet /0/@diagram/@links.10/@labels.1/@modelFacet /0/@diagram/@links.12/@labels.1/@modelFacet /0/@diagram/@links.14/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.18/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.17/@labels.1/@modelFacet /0/@diagram/@links.18/@labels.1/@modelFacet /0/@diagram/@links.19/@labels.1/@modelFacet /0/@diagram/@links.25/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.13/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.packageimport.PackageImportVisibilityParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.21/@labelModelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.SlotParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.17/@labelModelFacet /0/@diagram/@childNodes.16/@labelModelFacet /0/@diagram/@childNodes.14/@labelModelFacet /0/@diagram/@childNodes.15/@labelModelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.TemplateParameterParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.36/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.15/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@topLevelNodes.14/@labels.1/@modelFacet /0/@diagram/@childNodes.37/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@topLevelNodes.16/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ShortcutDiagramParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.18/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.TemplateBindingParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.20/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.RoleInstanceSpecificationSourceLinkParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.20/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.RoleInstanceSpecificationTargetLinkParser"/>
+ </labelParsers>
+ <contextMenus
+ context="/0/@diagram">
+ <items
+ xsi:type="gmfgen:LoadResourceAction"
+ qualifiedClassName="org.eclipse.papyrus.uml.diagram.clazz.part.LoadResourceAction"/>
+ </contextMenus>
+ </gmfgen:GenEditorGenerator>
+ <papyrusgmfgenextension:PapyrusExtensionRootNode
+ comment="&quot;Required Comment&quot;">
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Manage the class"
+ genView="/0/@diagram/@childNodes.33 /0/@diagram/@topLevelNodes.11"
+ name="Extended class editpart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.ClassEditPart">
+ <propRefreshHook
+ comment="set the figure active when the feature of the of a class is true"
+ classpath=""
+ triggeringCondition="resolveSemanticElement().equals(event.getNotifier()) &amp;&amp; (event.getFeature() instanceof org.eclipse.emf.ecore.EAttribute)&amp;&amp; ((org.eclipse.emf.ecore.EAttribute) (event.getFeature())).getName().equals(&quot;isActive&quot;)"
+ action="((org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure) getPrimaryShape()).setActive(event.getNewBooleanValue())"/>
+ </extensionNodes>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Elements that inherits Classifier"
+ genView="/0/@diagram/@childNodes.34 /0/@diagram/@childNodes.26 /0/@diagram/@topLevelNodes.12 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.30 /0/@diagram/@topLevelNodes.8 /0/@diagram/@topLevelNodes.13 /0/@diagram/@childNodes.35 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.32"
+ name="Classifier inheritance"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocator"
+ comment="precise the locator for a template signature"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator"
+ genChildSideAffixedNode="/0/@diagram/@childNodes.22"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="adding to manange otherNamedElement"
+ genView="/0/@diagram/@childNodes.25 /0/@diagram/@childNodes.31 /0/@diagram/@topLevelNodes.9 /0/@diagram /0/@diagram/@childNodes.29 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.19"
+ name="OtherNamedElementEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Manages stereotype shown with External Label"
+ genView="/0/@diagram/@topLevelNodes.17/@labels.1 /0/@diagram/@topLevelNodes.18/@labels.1"
+ name="EP_Stereotypes_EXT_NODE"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Label in charge to display applied stereotypes on links"
+ genView="/0/@diagram/@links.4 /0/@diagram/@links.5 /0/@diagram/@links.6 /0/@diagram/@links.7 /0/@diagram/@links.8 /0/@diagram/@links.9 /0/@diagram/@links.10 /0/@diagram/@links.12 /0/@diagram/@links.13 /0/@diagram/@links.14 /0/@diagram/@links.15 /0/@diagram/@links.18 /0/@diagram/@links.19 /0/@diagram/@links.25"
+ name="ExtendedUMLLinks"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="used to add its own superclass"
+ genView="/0/@diagram/@links.2 /0/@diagram/@links.1"
+ name="AbstractAssociationEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AbstractAssociationEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add superclass for short cut"
+ genView="/0/@diagram/@topLevelNodes.16"
+ name="AbstractShortCutDiagramEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortCutDiagramEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="abstract association branch for the association"
+ genView="/0/@diagram/@links.3"
+ name="AbstractAssociationBranchEditPat"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AbstractAssociationBranchEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="precise super to listen parameters"
+ genView="/0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17"
+ name="AbstractTemplateParameterEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AbstractTemplateParameterEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="ensure the refresh of the figure"
+ genView="/0/@diagram/@childNodes.22"
+ name="AbstractRedefinableTemplateSignatureEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AbstractRedefinableTemplateSignatureEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add superclass for compartment"
+ genView="/0/@diagram/@compartments.31 /0/@diagram/@compartments.21 /0/@diagram/@compartments.22 /0/@diagram/@compartments.23 /0/@diagram/@compartments.24 /0/@diagram/@compartments.25 /0/@diagram/@compartments.26 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.18 /0/@diagram/@compartments.19 /0/@diagram/@compartments.20 /0/@diagram/@compartments.29 /0/@diagram/@compartments.30 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.27 /0/@diagram/@compartments.28"
+ name="ResizeableListCompartmentEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
+ comment="External node label locator"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator"
+ genExternalNodeLabel="/0/@diagram/@topLevelNodes.18/@labels.1 /0/@diagram/@topLevelNodes.17/@labels.1"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocator"
+ comment="Affixed Containment locator"
+ classpath="org.eclipse.papyrus.uml.diagram.clazz.custom.locator.ContainmentPositionLocator"
+ genChildSideAffixedNode="/0/@diagram/@childNodes.23"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="With the mecanism of around, the methods hasborderItems(self) is never call on the template. To have the right superclass, we declare it here."
+ genView="/0/@diagram/@childNodes.23"
+ name="AbstractBorderItemEditPart"
+ superOwnedEditPart="org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="this is an extension to manage the comment"
+ genView="/0/@diagram/@childNodes.36 /0/@diagram/@topLevelNodes.15"
+ name="comment extended node"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="this is an extension for constraint "
+ genView="/0/@diagram/@childNodes.37 /0/@diagram/@topLevelNodes.14"
+ name="ConstraintEditPart extension"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Name of the shorcut diagram"
+ genView="/0/@diagram/@topLevelNodes.16/@labels.0"
+ name="AbstractShortcutDiagramNameEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortcutDiagramNameEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Extended Gen View For UML compartments child label nodes, like properties in classifier representation of class diagram"
+ genView="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.21 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.50 /0/@diagram/@childNodes.51 /0/@diagram/@childNodes.52"
+ name="UMLCompartmentEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocator"
+ comment="precise the locator for a template signature"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator"
+ genChildSideAffixedNode="/0/@diagram/@childNodes.24"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:EditPartUsingDeleteService"
+ comment="List of editpart using the delete service"
+ name="DeleteService editpart List"
+ genView="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.22 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.17 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.25 /0/@diagram/@childNodes.26 /0/@diagram/@childNodes.27 /0/@diagram/@childNodes.28 /0/@diagram/@childNodes.29 /0/@diagram/@childNodes.30 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.31 /0/@diagram/@childNodes.33 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.34 /0/@diagram/@childNodes.35 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.36 /0/@diagram/@childNodes.37 /0/@diagram/@childNodes.21 /0/@diagram/@childNodes.24 /0/@diagram/@topLevelNodes.0 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.6 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.8 /0/@diagram/@topLevelNodes.9 /0/@diagram/@topLevelNodes.11 /0/@diagram/@topLevelNodes.12 /0/@diagram/@topLevelNodes.13 /0/@diagram/@topLevelNodes.14 /0/@diagram/@topLevelNodes.15 /0/@diagram/@topLevelNodes.16 /0/@diagram/@topLevelNodes.17 /0/@diagram/@topLevelNodes.18 /0/@diagram/@topLevelNodes.19 /0/@diagram/@links.0 /0/@diagram/@links.1 /0/@diagram/@links.2 /0/@diagram/@links.3 /0/@diagram/@links.4 /0/@diagram/@links.5 /0/@diagram/@links.6 /0/@diagram/@links.7 /0/@diagram/@links.8 /0/@diagram/@links.9 /0/@diagram/@links.10 /0/@diagram/@links.11 /0/@diagram/@links.12 /0/@diagram/@links.13 /0/@diagram/@links.14 /0/@diagram/@links.15 /0/@diagram/@links.16 /0/@diagram/@links.17 /0/@diagram/@links.18 /0/@diagram/@links.19 /0/@diagram/@links.20 /0/@diagram/@links.21 /0/@diagram/@links.23 /0/@diagram/@links.24 /0/@diagram/@childNodes.20 /0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.32 /0/@diagram/@links.25 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.38 /0/@diagram/@childNodes.39 /0/@diagram/@childNodes.40 /0/@diagram/@childNodes.41 /0/@diagram/@childNodes.42 /0/@diagram/@childNodes.43 /0/@diagram/@childNodes.44 /0/@diagram/@childNodes.45 /0/@diagram/@childNodes.46 /0/@diagram/@childNodes.47 /0/@diagram/@childNodes.48 /0/@diagram/@childNodes.49 /0/@diagram/@childNodes.50 /0/@diagram/@childNodes.51 /0/@diagram/@childNodes.52"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:EditPartUsingReorientService"
+ comment="use the reorient service for Generalization"
+ name="ReorientService for Generalization"
+ genView="/0/@diagram/@links.4"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:CompartmentTitleVisibilityPreference"
+ comment="Hidden Compartments Title"
+ visibleByDefault="false"
+ compartments="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.16 /0/@diagram/@compartments.17 /0/@diagram/@compartments.18 /0/@diagram/@compartments.19 /0/@diagram/@compartments.20 /0/@diagram/@compartments.21 /0/@diagram/@compartments.22 /0/@diagram/@compartments.23 /0/@diagram/@compartments.24 /0/@diagram/@compartments.25 /0/@diagram/@compartments.26 /0/@diagram/@compartments.29 /0/@diagram/@compartments.30 /0/@diagram/@compartments.31 /0/@diagram/@compartments.32 /0/@diagram/@compartments.33 /0/@diagram/@compartments.34 /0/@diagram/@compartments.35 /0/@diagram/@compartments.36 /0/@diagram/@compartments.37 /0/@diagram/@compartments.38 /0/@diagram/@compartments.39 /0/@diagram/@compartments.40 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.27 /0/@diagram/@compartments.28"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="This edit part allow double click on this XYlayout compartment"
+ genView="/0/@diagram/@compartments.14 /0/@diagram/@compartments.15 /0/@diagram/@compartments.34 /0/@diagram/@compartments.35"
+ name="PackageableElementCompartment"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.AbstractPackageableElementCompartmentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:CustomDiagramUpdaterSingleton"
+ comment="Override the generated UMLDiagramUpdater, to change generated code for multi association, multi dependency and context link"
+ singletonPath="org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater.INSTANCE"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add superclass for floating Label"
+ genView="/0/@diagram/@topLevelNodes.13/@labels.1 /0/@diagram/@topLevelNodes.6/@labels.1 /0/@diagram/@topLevelNodes.8/@labels.1 /0/@diagram/@topLevelNodes.11/@labels.1 /0/@diagram/@topLevelNodes.18/@labels.0 /0/@diagram/@topLevelNodes.17/@labels.0 /0/@diagram/@topLevelNodes.1/@labels.1 /0/@diagram/@topLevelNodes.3/@labels.1 /0/@diagram/@topLevelNodes.4/@labels.1 /0/@diagram/@topLevelNodes.5/@labels.1 /0/@diagram/@topLevelNodes.10/@labels.1 /0/@diagram/@topLevelNodes.12/@labels.1 /0/@diagram/@childNodes.25/@labels.1 /0/@diagram/@childNodes.26/@labels.1 /0/@diagram/@childNodes.27/@labels.1 /0/@diagram/@childNodes.28/@labels.1 /0/@diagram/@childNodes.30/@labels.1 /0/@diagram/@childNodes.32/@labels.1 /0/@diagram/@childNodes.33/@labels.1 /0/@diagram/@childNodes.34/@labels.1 /0/@diagram/@childNodes.35/@labels.1 /0/@diagram/@topLevelNodes.2/@labels.0 /0/@diagram/@topLevelNodes.0/@labels.1"
+ name="FloatingLabelEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Elements that inherits RoundedCompartmentEditPart"
+ genView="/0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.18 /0/@diagram/@topLevelNodes.17 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.0"
+ name="Rounded Compartment EP inheritance"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
+ comment="Locator for external Floating label of RoundedCompartment EP"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator"
+ genExternalNodeLabel="/0/@diagram/@topLevelNodes.13/@labels.1 /0/@diagram/@topLevelNodes.6/@labels.1 /0/@diagram/@topLevelNodes.8/@labels.1 /0/@diagram/@topLevelNodes.11/@labels.1 /0/@diagram/@topLevelNodes.18/@labels.0 /0/@diagram/@topLevelNodes.17/@labels.0 /0/@diagram/@topLevelNodes.1/@labels.1 /0/@diagram/@topLevelNodes.3/@labels.1 /0/@diagram/@topLevelNodes.4/@labels.1 /0/@diagram/@topLevelNodes.5/@labels.1 /0/@diagram/@topLevelNodes.10/@labels.1 /0/@diagram/@topLevelNodes.12/@labels.1 /0/@diagram/@childNodes.25/@labels.1 /0/@diagram/@childNodes.26/@labels.1 /0/@diagram/@childNodes.27/@labels.1 /0/@diagram/@childNodes.28/@labels.1 /0/@diagram/@childNodes.30/@labels.1 /0/@diagram/@childNodes.32/@labels.1 /0/@diagram/@childNodes.33/@labels.1 /0/@diagram/@childNodes.34/@labels.1 /0/@diagram/@childNodes.35/@labels.1 /0/@diagram/@topLevelNodes.2/@labels.0 /0/@diagram/@topLevelNodes.0/@labels.1"/>
+ </papyrusgmfgenextension:PapyrusExtensionRootNode>
+</xmi:XMI>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml
index 74124e38155..0d9c06c18db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml
@@ -15,89 +15,89 @@
-->
<plugin>
- <extension point="org.eclipse.ui.contexts" id="ui-context">
- <?gmfgen generated="true"?>
- <context
- description="%context.description"
- id="org.eclipse.papyrus.uml.diagram.clazz.ui.diagramContext"
- name="%context.name"
- parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
- </context>
- </extension>
-
-<extension point="org.eclipse.core.runtime.preferences" id="prefs">
- <?gmfgen generated="true"?>
- <initializer class="org.eclipse.papyrus.uml.diagram.clazz.preferences.DiagramPreferenceInitializer"/>
- </extension>
-<extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
- <?gmfgen generated="true"?>
- <propertyContributor
- contributorId="org.eclipse.papyrus.uml.diagram.clazz"
- labelProvider="org.eclipse.papyrus.uml.diagram.clazz.sheet.UMLSheetLabelProvider">
- <propertyCategory category="domain"/>
- <propertyCategory category="visual"/>
- <propertyCategory category="extra"/>
- </propertyContributor>
- </extension>
-<extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
- <?gmfgen generated="true"?>
- <propertyTabs contributorId="org.eclipse.papyrus.uml.diagram.clazz">
- <propertyTab
- category="visual"
- id="property.tab.AppearancePropertySection"
- label="%tab.appearance"/>
- <propertyTab
- category="visual"
- id="property.tab.DiagramPropertySection"
- label="%tab.diagram"/>
- <propertyTab
- category="domain"
- id="property.tab.domain"
- label="%tab.domain"/>
- </propertyTabs>
- </extension>
-<extension point="org.eclipse.ui.views.properties.tabbed.propertySections" id="propsections">
- <?gmfgen generated="true"?>
- <propertySections contributorId="org.eclipse.papyrus.uml.diagram.clazz">
- <propertySection id="property.section.ConnectorAppearancePropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.ShapeColorAndFontPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.DiagramColorsAndFontsPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.RulerGridPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection"
- tab="property.tab.DiagramPropertySection">
- </propertySection>
- <propertySection
- id="property.section.domain"
- tab="property.tab.domain"
- class="org.eclipse.papyrus.uml.diagram.clazz.sheet.UMLPropertySection">
- <input type="org.eclipse.gmf.runtime.notation.View"/>
- <input type="org.eclipse.gef.EditPart"/>
- <input type="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLAbstractNavigatorItem"/>
- </propertySection>
- </propertySections>
- </extension>
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
- <?gmfgen generated="true"?>
- <viewProvider class="org.eclipse.papyrus.uml.diagram.clazz.providers.UMLViewProvider">
- <Priority name="Lowest"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLClassDiagram"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2014,2013,2015,2001,2002,2003,2004,2005,2006,2007,2099,2008,2009,2010,2011,2012,2016,2095,2096,2097,3012,3002,3005,3006,3041,3018,3014,3004,3008,3013,3003,3007,3042,3019,3034,3035,3031,3016,3017,3011,3039,3030,3015,3032,3033,3020,3021,3022,3023,3024,3025,3009,3040,3010,3026,3027,3028,3029,3036,3037,3038,3052,3053,3054,3047,3046,3048,3044,3045,3043,3050,3051,3049"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4016,4017,4001,4019,4002,4003,4004,4005,4006,4007,4008,4018,4009,4010,4011,4012,4013,4014,4015,4020,4021,4022,4023,4024,4025,4026,8500"/>
- </viewProvider>
- </extension>
+ <extension point="org.eclipse.ui.contexts" id="ui-context">
+ <?gmfgen generated="true"?>
+ <context
+ description="%context.description"
+ id="org.eclipse.papyrus.uml.diagram.clazz.ui.diagramContext"
+ name="%context.name"
+ parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
+ </context>
+ </extension>
+
+<extension point="org.eclipse.core.runtime.preferences" id="prefs">
+ <?gmfgen generated="true"?>
+ <initializer class="org.eclipse.papyrus.uml.diagram.clazz.preferences.DiagramPreferenceInitializer"/>
+ </extension>
+<extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
+ <?gmfgen generated="true"?>
+ <propertyContributor
+ contributorId="org.eclipse.papyrus.uml.diagram.clazz"
+ labelProvider="org.eclipse.papyrus.uml.diagram.clazz.sheet.UMLSheetLabelProvider">
+ <propertyCategory category="domain"/>
+ <propertyCategory category="visual"/>
+ <propertyCategory category="extra"/>
+ </propertyContributor>
+ </extension>
+<extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
+ <?gmfgen generated="true"?>
+ <propertyTabs contributorId="org.eclipse.papyrus.uml.diagram.clazz">
+ <propertyTab
+ category="visual"
+ id="property.tab.AppearancePropertySection"
+ label="%tab.appearance"/>
+ <propertyTab
+ category="visual"
+ id="property.tab.DiagramPropertySection"
+ label="%tab.diagram"/>
+ <propertyTab
+ category="domain"
+ id="property.tab.domain"
+ label="%tab.domain"/>
+ </propertyTabs>
+ </extension>
+<extension point="org.eclipse.ui.views.properties.tabbed.propertySections" id="propsections">
+ <?gmfgen generated="true"?>
+ <propertySections contributorId="org.eclipse.papyrus.uml.diagram.clazz">
+ <propertySection id="property.section.ConnectorAppearancePropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.ShapeColorAndFontPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.DiagramColorsAndFontsPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.RulerGridPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection"
+ tab="property.tab.DiagramPropertySection">
+ </propertySection>
+ <propertySection
+ id="property.section.domain"
+ tab="property.tab.domain"
+ class="org.eclipse.papyrus.uml.diagram.clazz.sheet.UMLPropertySection">
+ <input type="org.eclipse.gmf.runtime.notation.View"/>
+ <input type="org.eclipse.gef.EditPart"/>
+ <input type="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLAbstractNavigatorItem"/>
+ </propertySection>
+ </propertySections>
+ </extension>
+<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
+ <?gmfgen generated="true"?>
+ <viewProvider class="org.eclipse.papyrus.uml.diagram.clazz.providers.UMLViewProvider">
+ <Priority name="Lowest"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLClassDiagram"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2014,2013,2015,2001,2002,2003,2004,2005,2006,2007,2099,2008,2009,2010,2011,2012,2016,2095,2096,2097,3012,3002,3005,3006,3041,3018,3014,3004,3008,3013,3003,3007,3042,3019,3034,3035,3031,3016,3017,3011,3039,3030,3015,3032,3033,3020,3021,3022,3023,3024,3025,3009,3040,3010,3026,3027,3028,3029,3036,3037,3038,3052,3053,3054,3047,3046,3048,3044,3045,3043,3050,3051,3049"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4016,4017,4001,4019,4002,4003,4004,4005,4006,4007,4008,4018,4009,4010,4011,4012,4013,4014,4015,4020,4021,4022,4023,4024,4025,4026,8500"/>
+ </viewProvider>
+ </extension>
<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
<?gmfgen generated="false"?>
<editpartProvider class="org.eclipse.papyrus.uml.diagram.clazz.custom.providers.CustomUMLEditPartProvider">
@@ -120,970 +120,970 @@
<context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
</editpartProvider>
</extension>
-<extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
- <?gmfgen generated="true"?>
- <IconProvider class="org.eclipse.papyrus.uml.diagram.clazz.providers.UMLIconProvider">
- <Priority name="Low"/>
- </IconProvider>
- </extension>
-<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
- <?gmfgen generated="true"?>
- <ParserProvider class="org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider">
- <Priority name="Lowest"/>
- </ParserProvider>
- </extension>
-<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
- <?gmfgen generated="true"?>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Package_1000"
- name="%metatype.name.Package_1000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Package"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.PackageEditHelper">
- <param name="semanticHint" value="1000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014"
- name="%metatype.name.Dependency_2014"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Dependency"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.DependencyEditHelper">
- <param name="semanticHint" value="2014"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.AssociationClass_2013"
- name="%metatype.name.AssociationClass_2013"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="AssociationClass"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.AssociationClassEditHelper">
- <param name="semanticHint" value="2013"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Association_2015"
- name="%metatype.name.Association_2015"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Association"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.AssociationEditHelper">
- <param name="semanticHint" value="2015"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_2001"
- name="%metatype.name.InstanceSpecification_2001"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InstanceSpecification"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InstanceSpecificationEditHelper">
- <param name="semanticHint" value="2001"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Component_2002"
- name="%metatype.name.Component_2002"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Component"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ComponentEditHelper">
- <param name="semanticHint" value="2002"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Signal_2003"
- name="%metatype.name.Signal_2003"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Signal"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.SignalEditHelper">
- <param name="semanticHint" value="2003"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Interface_2004"
- name="%metatype.name.Interface_2004"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Interface"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InterfaceEditHelper">
- <param name="semanticHint" value="2004"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Model_2005"
- name="%metatype.name.Model_2005"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Model"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ModelEditHelper">
- <param name="semanticHint" value="2005"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_2006"
- name="%metatype.name.Enumeration_2006"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025"/>
- <param name="semanticHint" value="2006"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Package_2007"
- name="%metatype.name.Package_2007"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Package_1000"/>
- <param name="semanticHint" value="2007"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.InformationItem_2099"
- name="%metatype.name.InformationItem_2099"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InformationItem"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InformationItemEditHelper">
- <param name="semanticHint" value="2099"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Class_2008"
- name="%metatype.name.Class_2008"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Class_3004"/>
- <param name="semanticHint" value="2008"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_2009"
- name="%metatype.name.PrimitiveType_2009"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3026"/>
- <param name="semanticHint" value="2009"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.DataType_2010"
- name="%metatype.name.DataType_2010"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3027"/>
- <param name="semanticHint" value="2010"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Constraint_2011"
- name="%metatype.name.Constraint_2011"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Constraint_3029"/>
- <param name="semanticHint" value="2011"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Comment_2012"
- name="%metatype.name.Comment_2012"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Comment_3028"/>
- <param name="semanticHint" value="2012"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/gmf/runtime/1.0.2/notation">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Diagram_2016"
- name="%metatype.name.Diagram_2016"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Diagram"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ShortCutDiagramEditHelper">
- <param name="semanticHint" value="2016"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.DurationObservation_2095"
- name="%metatype.name.DurationObservation_2095"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="DurationObservation"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.DurationObservationEditHelper">
- <param name="semanticHint" value="2095"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.TimeObservation_2096"
- name="%metatype.name.TimeObservation_2096"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="TimeObservation"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.TimeObservationEditHelper">
- <param name="semanticHint" value="2096"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.NamedElement_2097"
- name="%metatype.name.NamedElement_2097"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="NamedElement"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.DefaultNamedElementEditHelper">
- <param name="semanticHint" value="2097"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Property_3012"
- name="%metatype.name.Property_3012"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Property_3002"/>
- <param name="semanticHint" value="3012"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Property_3002"
- name="%metatype.name.Property_3002"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Property"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.PropertyEditHelper">
- <param name="semanticHint" value="3002"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Property_3005"
- name="%metatype.name.Property_3005"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Property_3002"/>
- <param name="semanticHint" value="3005"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Property_3006"
- name="%metatype.name.Property_3006"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Property_3002"/>
- <param name="semanticHint" value="3006"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Property_3041"
- name="%metatype.name.Property_3041"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Property_3002"/>
- <param name="semanticHint" value="3041"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Property_3018"
- name="%metatype.name.Property_3018"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Property_3002"/>
- <param name="semanticHint" value="3018"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Class_3014"
- name="%metatype.name.Class_3014"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Class_3004"/>
- <param name="semanticHint" value="3014"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Class_3004"
- name="%metatype.name.Class_3004"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Class"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ClassEditHelper">
- <param name="semanticHint" value="3004"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Class_3008"
- name="%metatype.name.Class_3008"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Class_3004"/>
- <param name="semanticHint" value="3008"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3013"
- name="%metatype.name.Operation_3013"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3003"/>
- <param name="semanticHint" value="3013"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3003"
- name="%metatype.name.Operation_3003"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Operation"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.OperationEditHelper">
- <param name="semanticHint" value="3003"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3007"
- name="%metatype.name.Operation_3007"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3003"/>
- <param name="semanticHint" value="3007"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3042"
- name="%metatype.name.Operation_3042"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3003"/>
- <param name="semanticHint" value="3042"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3019"
- name="%metatype.name.Operation_3019"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3003"/>
- <param name="semanticHint" value="3019"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.ConnectableElementTemplateParameter_3034"
- name="%metatype.name.ConnectableElementTemplateParameter_3034"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ConnectableElementTemplateParameter"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ClassifierTemplateParameterEditHelper">
- <param name="semanticHint" value="3034"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.OperationTemplateParameter_3035"
- name="%metatype.name.OperationTemplateParameter_3035"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="OperationTemplateParameter"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ClassifierTemplateParameterEditHelper">
- <param name="semanticHint" value="3035"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.ClassifierTemplateParameter_3031"
- name="%metatype.name.ClassifierTemplateParameter_3031"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ClassifierTemplateParameter"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ClassifierTemplateParameterEditHelper">
- <param name="semanticHint" value="3031"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.TemplateParameter_3016"
- name="%metatype.name.TemplateParameter_3016"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="TemplateParameter"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.TemplateParameterEditHelper">
- <param name="semanticHint" value="3016"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.EnumerationLiteral_3017"
- name="%metatype.name.EnumerationLiteral_3017"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="EnumerationLiteral"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.EnumerationLiteralEditHelper">
- <param name="semanticHint" value="3017"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Reception_3011"
- name="%metatype.name.Reception_3011"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Reception"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ReceptionEditHelper">
- <param name="semanticHint" value="3011"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Reception_3039"
- name="%metatype.name.Reception_3039"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Reception"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ReceptionEditHelper">
- <param name="semanticHint" value="3039"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Slot_3030"
- name="%metatype.name.Slot_3030"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Slot"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.SlotEditHelper">
- <param name="semanticHint" value="3030"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.RedefinableTemplateSignature_3015"
- name="%metatype.name.RedefinableTemplateSignature_3015"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="RedefinableTemplateSignature"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.RedefinableTemplateSignatureEditHelper">
- <param name="semanticHint" value="3015"/>
- </metamodelType>
- </metamodel>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.ContainmentCircle_3032"
- name="%metatype.name.Node_3032"
- kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="3032"/>
- </specializationType>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.TemplateSignature_3033"
- name="%metatype.name.TemplateSignature_3033"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="TemplateSignature"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.RedefinableTemplateSignatureEditHelper">
- <param name="semanticHint" value="3033"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_3020"
- name="%metatype.name.InstanceSpecification_3020"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_2001"/>
- <param name="semanticHint" value="3020"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Component_3021"
- name="%metatype.name.Component_3021"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Component_2002"/>
- <param name="semanticHint" value="3021"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Signal_3022"
- name="%metatype.name.Signal_3022"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Signal_2003"/>
- <param name="semanticHint" value="3022"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Interface_3023"
- name="%metatype.name.Interface_3023"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Interface_2004"/>
- <param name="semanticHint" value="3023"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Model_3024"
- name="%metatype.name.Model_3024"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Model_2005"/>
- <param name="semanticHint" value="3024"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025"
- name="%metatype.name.Enumeration_3025"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Enumeration"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.EnumerationEditHelper">
- <param name="semanticHint" value="3025"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Package_3009"
- name="%metatype.name.Package_3009"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Package_1000"/>
- <param name="semanticHint" value="3009"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.InformationItem_3040"
- name="%metatype.name.InformationItem_3040"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InformationItem"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InformationItemEditHelper">
- <param name="semanticHint" value="3040"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Class_3010"
- name="%metatype.name.Class_3010"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Class_3004"/>
- <param name="semanticHint" value="3010"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3026"
- name="%metatype.name.PrimitiveType_3026"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="PrimitiveType"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.PrimitiveTypeEditHelper">
- <param name="semanticHint" value="3026"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3027"
- name="%metatype.name.DataType_3027"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="DataType"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.DataTypeEditHelper">
- <param name="semanticHint" value="3027"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Comment_3028"
- name="%metatype.name.Comment_3028"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Comment"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.CommentEditHelper">
- <param name="semanticHint" value="3028"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Constraint_3029"
- name="%metatype.name.Constraint_3029"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Constraint"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ConstraintEditHelper">
- <param name="semanticHint" value="3029"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Interface_3036"
- name="%metatype.name.Interface_3036"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Interface_2004"/>
- <param name="semanticHint" value="3036"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Interface_3037"
- name="%metatype.name.Interface_3037"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Interface"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InterfaceEditHelper">
- <param name="semanticHint" value="3037"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Interface_3038"
- name="%metatype.name.Interface_3038"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Interface_3037"/>
- <param name="semanticHint" value="3038"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3052"
- name="%metatype.name.Enumeration_3052"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025"/>
- <param name="semanticHint" value="3052"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3053"
- name="%metatype.name.Enumeration_3053"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025"/>
- <param name="semanticHint" value="3053"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3054"
- name="%metatype.name.Enumeration_3054"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025"/>
- <param name="semanticHint" value="3054"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3047"
- name="%metatype.name.PrimitiveType_3047"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3026"/>
- <param name="semanticHint" value="3047"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3046"
- name="%metatype.name.PrimitiveType_3046"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3026"/>
- <param name="semanticHint" value="3046"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3048"
- name="%metatype.name.PrimitiveType_3048"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3026"/>
- <param name="semanticHint" value="3048"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3044"
- name="%metatype.name.DataType_3044"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3027"/>
- <param name="semanticHint" value="3044"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3045"
- name="%metatype.name.DataType_3045"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3027"/>
- <param name="semanticHint" value="3045"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3043"
- name="%metatype.name.DataType_3043"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3027"/>
- <param name="semanticHint" value="3043"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Signal_3050"
- name="%metatype.name.Signal_3050"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Signal_2003"/>
- <param name="semanticHint" value="3050"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Signal_3051"
- name="%metatype.name.Signal_3051"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Signal_2003"/>
- <param name="semanticHint" value="3051"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Signal_3049"
- name="%metatype.name.Signal_3049"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Signal_2003"/>
- <param name="semanticHint" value="3049"/>
- </specializationType>
- </metamodel>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Link_4016"
- name="%metatype.name.Link_4016"
- kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4016"/>
- </specializationType>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.AssociationClass_4017"
- name="%metatype.name.AssociationClass_4017"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.AssociationClass_2013"/>
- <param name="semanticHint" value="4017"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Association_4001"
- name="%metatype.name.Association_4001"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Association_2015"/>
- <param name="semanticHint" value="4001"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Association_4019"
- name="%metatype.name.Association_4019"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Association_2015"/>
- <param name="semanticHint" value="4019"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Generalization_4002"
- name="%metatype.name.Generalization_4002"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Generalization"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.GeneralizationEditHelper">
- <param name="semanticHint" value="4002"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.InterfaceRealization_4003"
- name="%metatype.name.InterfaceRealization_4003"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InterfaceRealization"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InterfaceRealizationEditHelper">
- <param name="semanticHint" value="4003"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Substitution_4004"
- name="%metatype.name.Substitution_4004"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Substitution"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.SubstitutionEditHelper">
- <param name="semanticHint" value="4004"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Realization_4005"
- name="%metatype.name.Realization_4005"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Realization"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.RealizationEditHelper">
- <param name="semanticHint" value="4005"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Abstraction_4006"
- name="%metatype.name.Abstraction_4006"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Abstraction"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.AbstractionEditHelper">
- <param name="semanticHint" value="4006"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.Usage_4007"
- name="%metatype.name.Usage_4007"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Usage"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.UsageEditHelper">
- <param name="semanticHint" value="4007"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4008"
- name="%metatype.name.Dependency_4008"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014"/>
- <param name="semanticHint" value="4008"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4018"
- name="%metatype.name.Dependency_4018"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014"/>
- <param name="semanticHint" value="4018"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.ElementImport_4009"
- name="%metatype.name.ElementImport_4009"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ElementImport"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ElementImportEditHelper">
- <param name="semanticHint" value="4009"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.PackageImport_4010"
- name="%metatype.name.PackageImport_4010"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="PackageImport"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.PackageImportEditHelper">
- <param name="semanticHint" value="4010"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.PackageMerge_4011"
- name="%metatype.name.PackageMerge_4011"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="PackageMerge"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.PackageMergeEditHelper">
- <param name="semanticHint" value="4011"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.ProfileApplication_4012"
- name="%metatype.name.ProfileApplication_4012"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ProfileApplication"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ProfileApplicationEditHelper">
- <param name="semanticHint" value="4012"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.CommentAnnotatedElement_4013"
- name="%metatype.name.CommentAnnotatedElement_4013"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4013"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.ConstraintConstrainedElement_4014"
- name="%metatype.name.ConstraintConstrainedElement_4014"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4014"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.TemplateBinding_4015"
- name="%metatype.name.TemplateBinding_4015"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="TemplateBinding"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.TemplateBindingEditHelper">
- <param name="semanticHint" value="4015"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.GeneralizationSet_4020"
- name="%metatype.name.GeneralizationSet_4020"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="GeneralizationSet"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.GeneralizationSetEditHelper">
- <param name="semanticHint" value="4020"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecificationLink_4021"
- name="%metatype.name.InstanceSpecification_4021"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InstanceSpecification"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InstanceSpecificationLinkEditHelper">
- <param name="semanticHint" value="4021"/>
- </metamodelType>
- </metamodel>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.AddedLink_4022"
- name="%metatype.name.Link_4022"
- kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4022"/>
- </specializationType>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.ContainmentLink_4023"
- name="%metatype.name.Link_4023"
- kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4023"/>
- </specializationType>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.TimeObservationEvent_4024"
- name="%metatype.name.TimeObservationEvent_4024"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4024"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.DurationObservationEvent_4025"
- name="%metatype.name.DurationObservationEvent_4025"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4025"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.clazz.InformationFlow_4026"
- name="%metatype.name.InformationFlow_4026"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InformationFlow"
- edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InformationFlowEditHelper">
- <param name="semanticHint" value="4026"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.clazz.ConstraintContext_8500"
- name="%metatype.name.ConstraintContext_8500"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="8500"/>
- </specializationType>
- </metamodel>
- </extension>
+<extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
+ <?gmfgen generated="true"?>
+ <IconProvider class="org.eclipse.papyrus.uml.diagram.clazz.providers.UMLIconProvider">
+ <Priority name="Low"/>
+ </IconProvider>
+ </extension>
+<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
+ <?gmfgen generated="true"?>
+ <ParserProvider class="org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider">
+ <Priority name="Lowest"/>
+ </ParserProvider>
+ </extension>
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
+ <?gmfgen generated="true"?>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Package_1000"
+ name="%metatype.name.Package_1000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Package"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.PackageEditHelper">
+ <param name="semanticHint" value="1000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014"
+ name="%metatype.name.Dependency_2014"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Dependency"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.DependencyEditHelper">
+ <param name="semanticHint" value="2014"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.AssociationClass_2013"
+ name="%metatype.name.AssociationClass_2013"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="AssociationClass"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.AssociationClassEditHelper">
+ <param name="semanticHint" value="2013"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Association_2015"
+ name="%metatype.name.Association_2015"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Association"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.AssociationEditHelper">
+ <param name="semanticHint" value="2015"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_2001"
+ name="%metatype.name.InstanceSpecification_2001"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="InstanceSpecification"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InstanceSpecificationEditHelper">
+ <param name="semanticHint" value="2001"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Component_2002"
+ name="%metatype.name.Component_2002"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Component"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ComponentEditHelper">
+ <param name="semanticHint" value="2002"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Signal_2003"
+ name="%metatype.name.Signal_2003"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Signal"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.SignalEditHelper">
+ <param name="semanticHint" value="2003"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Interface_2004"
+ name="%metatype.name.Interface_2004"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Interface"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InterfaceEditHelper">
+ <param name="semanticHint" value="2004"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Model_2005"
+ name="%metatype.name.Model_2005"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Model"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ModelEditHelper">
+ <param name="semanticHint" value="2005"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_2006"
+ name="%metatype.name.Enumeration_2006"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025"/>
+ <param name="semanticHint" value="2006"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Package_2007"
+ name="%metatype.name.Package_2007"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Package_1000"/>
+ <param name="semanticHint" value="2007"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.InformationItem_2099"
+ name="%metatype.name.InformationItem_2099"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="InformationItem"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InformationItemEditHelper">
+ <param name="semanticHint" value="2099"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Class_2008"
+ name="%metatype.name.Class_2008"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Class_3004"/>
+ <param name="semanticHint" value="2008"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_2009"
+ name="%metatype.name.PrimitiveType_2009"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3026"/>
+ <param name="semanticHint" value="2009"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.DataType_2010"
+ name="%metatype.name.DataType_2010"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3027"/>
+ <param name="semanticHint" value="2010"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Constraint_2011"
+ name="%metatype.name.Constraint_2011"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Constraint_3029"/>
+ <param name="semanticHint" value="2011"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Comment_2012"
+ name="%metatype.name.Comment_2012"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Comment_3028"/>
+ <param name="semanticHint" value="2012"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/gmf/runtime/1.0.2/notation">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Diagram_2016"
+ name="%metatype.name.Diagram_2016"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Diagram"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ShortCutDiagramEditHelper">
+ <param name="semanticHint" value="2016"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.DurationObservation_2095"
+ name="%metatype.name.DurationObservation_2095"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="DurationObservation"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.DurationObservationEditHelper">
+ <param name="semanticHint" value="2095"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.TimeObservation_2096"
+ name="%metatype.name.TimeObservation_2096"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="TimeObservation"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.TimeObservationEditHelper">
+ <param name="semanticHint" value="2096"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.NamedElement_2097"
+ name="%metatype.name.NamedElement_2097"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="NamedElement"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.DefaultNamedElementEditHelper">
+ <param name="semanticHint" value="2097"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Property_3012"
+ name="%metatype.name.Property_3012"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Property_3002"/>
+ <param name="semanticHint" value="3012"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Property_3002"
+ name="%metatype.name.Property_3002"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Property"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.PropertyEditHelper">
+ <param name="semanticHint" value="3002"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Property_3005"
+ name="%metatype.name.Property_3005"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Property_3002"/>
+ <param name="semanticHint" value="3005"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Property_3006"
+ name="%metatype.name.Property_3006"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Property_3002"/>
+ <param name="semanticHint" value="3006"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Property_3041"
+ name="%metatype.name.Property_3041"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Property_3002"/>
+ <param name="semanticHint" value="3041"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Property_3018"
+ name="%metatype.name.Property_3018"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Property_3002"/>
+ <param name="semanticHint" value="3018"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Class_3014"
+ name="%metatype.name.Class_3014"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Class_3004"/>
+ <param name="semanticHint" value="3014"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Class_3004"
+ name="%metatype.name.Class_3004"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Class"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ClassEditHelper">
+ <param name="semanticHint" value="3004"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Class_3008"
+ name="%metatype.name.Class_3008"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Class_3004"/>
+ <param name="semanticHint" value="3008"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3013"
+ name="%metatype.name.Operation_3013"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3003"/>
+ <param name="semanticHint" value="3013"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3003"
+ name="%metatype.name.Operation_3003"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Operation"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.OperationEditHelper">
+ <param name="semanticHint" value="3003"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3007"
+ name="%metatype.name.Operation_3007"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3003"/>
+ <param name="semanticHint" value="3007"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3042"
+ name="%metatype.name.Operation_3042"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3003"/>
+ <param name="semanticHint" value="3042"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3019"
+ name="%metatype.name.Operation_3019"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Operation_3003"/>
+ <param name="semanticHint" value="3019"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.ConnectableElementTemplateParameter_3034"
+ name="%metatype.name.ConnectableElementTemplateParameter_3034"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="ConnectableElementTemplateParameter"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ClassifierTemplateParameterEditHelper">
+ <param name="semanticHint" value="3034"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.OperationTemplateParameter_3035"
+ name="%metatype.name.OperationTemplateParameter_3035"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="OperationTemplateParameter"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ClassifierTemplateParameterEditHelper">
+ <param name="semanticHint" value="3035"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.ClassifierTemplateParameter_3031"
+ name="%metatype.name.ClassifierTemplateParameter_3031"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="ClassifierTemplateParameter"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ClassifierTemplateParameterEditHelper">
+ <param name="semanticHint" value="3031"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.TemplateParameter_3016"
+ name="%metatype.name.TemplateParameter_3016"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="TemplateParameter"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.TemplateParameterEditHelper">
+ <param name="semanticHint" value="3016"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.EnumerationLiteral_3017"
+ name="%metatype.name.EnumerationLiteral_3017"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="EnumerationLiteral"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.EnumerationLiteralEditHelper">
+ <param name="semanticHint" value="3017"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Reception_3011"
+ name="%metatype.name.Reception_3011"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Reception"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ReceptionEditHelper">
+ <param name="semanticHint" value="3011"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Reception_3039"
+ name="%metatype.name.Reception_3039"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Reception"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ReceptionEditHelper">
+ <param name="semanticHint" value="3039"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Slot_3030"
+ name="%metatype.name.Slot_3030"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Slot"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.SlotEditHelper">
+ <param name="semanticHint" value="3030"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.RedefinableTemplateSignature_3015"
+ name="%metatype.name.RedefinableTemplateSignature_3015"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="RedefinableTemplateSignature"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.RedefinableTemplateSignatureEditHelper">
+ <param name="semanticHint" value="3015"/>
+ </metamodelType>
+ </metamodel>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.ContainmentCircle_3032"
+ name="%metatype.name.Node_3032"
+ kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="3032"/>
+ </specializationType>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.TemplateSignature_3033"
+ name="%metatype.name.TemplateSignature_3033"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="TemplateSignature"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.RedefinableTemplateSignatureEditHelper">
+ <param name="semanticHint" value="3033"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_3020"
+ name="%metatype.name.InstanceSpecification_3020"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_2001"/>
+ <param name="semanticHint" value="3020"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Component_3021"
+ name="%metatype.name.Component_3021"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Component_2002"/>
+ <param name="semanticHint" value="3021"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Signal_3022"
+ name="%metatype.name.Signal_3022"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Signal_2003"/>
+ <param name="semanticHint" value="3022"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Interface_3023"
+ name="%metatype.name.Interface_3023"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Interface_2004"/>
+ <param name="semanticHint" value="3023"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Model_3024"
+ name="%metatype.name.Model_3024"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Model_2005"/>
+ <param name="semanticHint" value="3024"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025"
+ name="%metatype.name.Enumeration_3025"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Enumeration"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.EnumerationEditHelper">
+ <param name="semanticHint" value="3025"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Package_3009"
+ name="%metatype.name.Package_3009"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Package_1000"/>
+ <param name="semanticHint" value="3009"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.InformationItem_3040"
+ name="%metatype.name.InformationItem_3040"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="InformationItem"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InformationItemEditHelper">
+ <param name="semanticHint" value="3040"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Class_3010"
+ name="%metatype.name.Class_3010"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Class_3004"/>
+ <param name="semanticHint" value="3010"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3026"
+ name="%metatype.name.PrimitiveType_3026"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="PrimitiveType"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.PrimitiveTypeEditHelper">
+ <param name="semanticHint" value="3026"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3027"
+ name="%metatype.name.DataType_3027"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="DataType"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.DataTypeEditHelper">
+ <param name="semanticHint" value="3027"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Comment_3028"
+ name="%metatype.name.Comment_3028"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Comment"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.CommentEditHelper">
+ <param name="semanticHint" value="3028"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Constraint_3029"
+ name="%metatype.name.Constraint_3029"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Constraint"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ConstraintEditHelper">
+ <param name="semanticHint" value="3029"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Interface_3036"
+ name="%metatype.name.Interface_3036"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Interface_2004"/>
+ <param name="semanticHint" value="3036"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Interface_3037"
+ name="%metatype.name.Interface_3037"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Interface"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InterfaceEditHelper">
+ <param name="semanticHint" value="3037"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Interface_3038"
+ name="%metatype.name.Interface_3038"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Interface_3037"/>
+ <param name="semanticHint" value="3038"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3052"
+ name="%metatype.name.Enumeration_3052"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025"/>
+ <param name="semanticHint" value="3052"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3053"
+ name="%metatype.name.Enumeration_3053"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025"/>
+ <param name="semanticHint" value="3053"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3054"
+ name="%metatype.name.Enumeration_3054"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025"/>
+ <param name="semanticHint" value="3054"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3047"
+ name="%metatype.name.PrimitiveType_3047"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3026"/>
+ <param name="semanticHint" value="3047"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3046"
+ name="%metatype.name.PrimitiveType_3046"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3026"/>
+ <param name="semanticHint" value="3046"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3048"
+ name="%metatype.name.PrimitiveType_3048"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3026"/>
+ <param name="semanticHint" value="3048"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3044"
+ name="%metatype.name.DataType_3044"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3027"/>
+ <param name="semanticHint" value="3044"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3045"
+ name="%metatype.name.DataType_3045"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3027"/>
+ <param name="semanticHint" value="3045"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3043"
+ name="%metatype.name.DataType_3043"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.DataType_3027"/>
+ <param name="semanticHint" value="3043"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Signal_3050"
+ name="%metatype.name.Signal_3050"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Signal_2003"/>
+ <param name="semanticHint" value="3050"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Signal_3051"
+ name="%metatype.name.Signal_3051"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Signal_2003"/>
+ <param name="semanticHint" value="3051"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Signal_3049"
+ name="%metatype.name.Signal_3049"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Signal_2003"/>
+ <param name="semanticHint" value="3049"/>
+ </specializationType>
+ </metamodel>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Link_4016"
+ name="%metatype.name.Link_4016"
+ kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4016"/>
+ </specializationType>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.AssociationClass_4017"
+ name="%metatype.name.AssociationClass_4017"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.AssociationClass_2013"/>
+ <param name="semanticHint" value="4017"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Association_4001"
+ name="%metatype.name.Association_4001"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Association_2015"/>
+ <param name="semanticHint" value="4001"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Association_4019"
+ name="%metatype.name.Association_4019"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Association_2015"/>
+ <param name="semanticHint" value="4019"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Generalization_4002"
+ name="%metatype.name.Generalization_4002"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Generalization"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.GeneralizationEditHelper">
+ <param name="semanticHint" value="4002"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.InterfaceRealization_4003"
+ name="%metatype.name.InterfaceRealization_4003"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="InterfaceRealization"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InterfaceRealizationEditHelper">
+ <param name="semanticHint" value="4003"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Substitution_4004"
+ name="%metatype.name.Substitution_4004"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Substitution"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.SubstitutionEditHelper">
+ <param name="semanticHint" value="4004"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Realization_4005"
+ name="%metatype.name.Realization_4005"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Realization"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.RealizationEditHelper">
+ <param name="semanticHint" value="4005"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Abstraction_4006"
+ name="%metatype.name.Abstraction_4006"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Abstraction"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.AbstractionEditHelper">
+ <param name="semanticHint" value="4006"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Usage_4007"
+ name="%metatype.name.Usage_4007"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Usage"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.UsageEditHelper">
+ <param name="semanticHint" value="4007"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4008"
+ name="%metatype.name.Dependency_4008"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014"/>
+ <param name="semanticHint" value="4008"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4018"
+ name="%metatype.name.Dependency_4018"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014"/>
+ <param name="semanticHint" value="4018"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.ElementImport_4009"
+ name="%metatype.name.ElementImport_4009"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="ElementImport"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ElementImportEditHelper">
+ <param name="semanticHint" value="4009"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.PackageImport_4010"
+ name="%metatype.name.PackageImport_4010"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="PackageImport"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.PackageImportEditHelper">
+ <param name="semanticHint" value="4010"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.PackageMerge_4011"
+ name="%metatype.name.PackageMerge_4011"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="PackageMerge"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.PackageMergeEditHelper">
+ <param name="semanticHint" value="4011"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.ProfileApplication_4012"
+ name="%metatype.name.ProfileApplication_4012"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="ProfileApplication"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.ProfileApplicationEditHelper">
+ <param name="semanticHint" value="4012"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.CommentAnnotatedElement_4013"
+ name="%metatype.name.CommentAnnotatedElement_4013"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4013"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.ConstraintConstrainedElement_4014"
+ name="%metatype.name.ConstraintConstrainedElement_4014"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4014"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.TemplateBinding_4015"
+ name="%metatype.name.TemplateBinding_4015"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="TemplateBinding"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.TemplateBindingEditHelper">
+ <param name="semanticHint" value="4015"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.GeneralizationSet_4020"
+ name="%metatype.name.GeneralizationSet_4020"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="GeneralizationSet"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.GeneralizationSetEditHelper">
+ <param name="semanticHint" value="4020"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecificationLink_4021"
+ name="%metatype.name.InstanceSpecification_4021"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="InstanceSpecification"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InstanceSpecificationLinkEditHelper">
+ <param name="semanticHint" value="4021"/>
+ </metamodelType>
+ </metamodel>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.AddedLink_4022"
+ name="%metatype.name.Link_4022"
+ kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4022"/>
+ </specializationType>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.ContainmentLink_4023"
+ name="%metatype.name.Link_4023"
+ kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4023"/>
+ </specializationType>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.TimeObservationEvent_4024"
+ name="%metatype.name.TimeObservationEvent_4024"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4024"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.DurationObservationEvent_4025"
+ name="%metatype.name.DurationObservationEvent_4025"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4025"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.clazz.InformationFlow_4026"
+ name="%metatype.name.InformationFlow_4026"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="InformationFlow"
+ edithelper="org.eclipse.papyrus.uml.diagram.clazz.edit.helpers.InformationFlowEditHelper">
+ <param name="semanticHint" value="4026"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.clazz.ConstraintContext_8500"
+ name="%metatype.name.ConstraintContext_8500"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="8500"/>
+ </specializationType>
+ </metamodel>
+ </extension>
<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
<?gmfgen generated="false"?>
<clientContext id="org.eclipse.papyrus.uml.diagram.clazz.TypeContext">
@@ -1199,124 +1199,124 @@
<advice ref="org.eclipse.papyrus.infra.emf.readOnlyAdvice"/>
</binding>
</extension>
-<extension point="org.eclipse.core.expressions.propertyTesters" id="navigator-proptest.isURIEditorInput">
- <?gmfgen generated="true"?>
- <propertyTester
- id="org.eclipse.papyrus.uml.diagram.clazz.URIEditorInputPropertyTester"
- type="org.eclipse.emf.common.ui.URIEditorInput"
- namespace="org.eclipse.papyrus.uml.diagram.clazz"
- properties="isURIEditorInput"
- class="org.eclipse.papyrus.uml.diagram.clazz.part.UMLUriEditorInputTester">
- </propertyTester>
- </extension>
-<extension point="org.eclipse.ui.navigator.viewer" id="navigator-viewbinding">
- <?gmfgen generated="true"?>
- <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <contentExtension pattern="org.eclipse.papyrus.uml.diagram.clazz.resourceContent"/>
- <contentExtension pattern="org.eclipse.papyrus.uml.diagram.clazz.domainResourceContent"/>
- <contentExtension pattern="org.eclipse.papyrus.uml.diagram.clazz.navigatorLinkHelper"/>
- </includes>
- </viewerContentBinding>
- <viewerActionBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <actionExtension pattern="org.eclipse.papyrus.uml.diagram.clazz.navigatorActionProvider"/>
- </includes>
- </viewerActionBinding>
- </extension>
-<extension point="org.eclipse.ui.navigator.navigatorContent" id="navigator-content">
- <?gmfgen generated="true"?>
- <navigatorContent
- id="org.eclipse.papyrus.uml.diagram.clazz.resourceContent"
- name="%navigatorContentName"
- priority="normal"
- contentProvider="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLNavigatorContentProvider"
- labelProvider="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLNavigatorLabelProvider"
- icon="icons/obj16/UMLDiagramFile.gif"
- activeByDefault="true">
- <triggerPoints>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="PapyrusUMLClass_diagram"/>
- </and>
- <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </triggerPoints>
- <possibleChildren>
- <or>
- <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </possibleChildren>
- <commonSorter
- id="org.eclipse.papyrus.uml.diagram.clazz.navigatorSorter"
- class="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLNavigatorSorter">
- <parentExpression>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="PapyrusUMLClass_diagram"/>
- </and>
- <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </parentExpression>
- </commonSorter>
- </navigatorContent>
- <navigatorContent
- id="org.eclipse.papyrus.uml.diagram.clazz.domainResourceContent"
- name="%domainNavigatorContentName"
- priority="normal"
- contentProvider="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLDomainNavigatorContentProvider"
- labelProvider="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLDomainNavigatorLabelProvider"
- icon="icons/obj16/UMLDiagramFile.gif"
- activeByDefault="true">
- <triggerPoints>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="PapyrusUMLClass"/>
- </and>
- <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLDomainNavigatorItem"/>
- </or>
- </triggerPoints>
- <possibleChildren>
- <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLDomainNavigatorItem"/>
- </possibleChildren>
- </navigatorContent>
- <actionProvider
- id="org.eclipse.papyrus.uml.diagram.clazz.navigatorActionProvider"
- class="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLNavigatorActionProvider">
- <enablement>
- <or>
- <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </enablement>
- </actionProvider>
- </extension>
-<extension point="org.eclipse.ui.navigator.linkHelper" id="navigator-linkhelper">
- <?gmfgen generated="true"?>
- <linkHelper
- id="org.eclipse.papyrus.uml.diagram.clazz.navigatorLinkHelper"
- class="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLNavigatorLinkHelper">
- <editorInputEnablement>
- <and>
- <instanceof value="org.eclipse.emf.common.ui.URIEditorInput"/>
- <test property="org.eclipse.papyrus.uml.diagram.clazz.isURIEditorInput"/>
- </and>
- </editorInputEnablement>
- <selectionEnablement>
- <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLAbstractNavigatorItem"/>
- </selectionEnablement>
- </linkHelper>
- </extension>
-<extension point="org.eclipse.ui.commands" id="menu-commands">
- <?gmfgen generated="true"?>
- <category id="org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
- <command id="org.eclipse.papyrus.uml.diagram.clazz.LoadResourceAction"
- name="Load Resource"
- categoryId="org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorID"
- defaultHandler="org.eclipse.papyrus.uml.diagram.clazz.part.LoadResourceAction"/>
- </extension>
+<extension point="org.eclipse.core.expressions.propertyTesters" id="navigator-proptest.isURIEditorInput">
+ <?gmfgen generated="true"?>
+ <propertyTester
+ id="org.eclipse.papyrus.uml.diagram.clazz.URIEditorInputPropertyTester"
+ type="org.eclipse.emf.common.ui.URIEditorInput"
+ namespace="org.eclipse.papyrus.uml.diagram.clazz"
+ properties="isURIEditorInput"
+ class="org.eclipse.papyrus.uml.diagram.clazz.part.UMLUriEditorInputTester">
+ </propertyTester>
+ </extension>
+<extension point="org.eclipse.ui.navigator.viewer" id="navigator-viewbinding">
+ <?gmfgen generated="true"?>
+ <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
+ <includes>
+ <contentExtension pattern="org.eclipse.papyrus.uml.diagram.clazz.resourceContent"/>
+ <contentExtension pattern="org.eclipse.papyrus.uml.diagram.clazz.domainResourceContent"/>
+ <contentExtension pattern="org.eclipse.papyrus.uml.diagram.clazz.navigatorLinkHelper"/>
+ </includes>
+ </viewerContentBinding>
+ <viewerActionBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
+ <includes>
+ <actionExtension pattern="org.eclipse.papyrus.uml.diagram.clazz.navigatorActionProvider"/>
+ </includes>
+ </viewerActionBinding>
+ </extension>
+<extension point="org.eclipse.ui.navigator.navigatorContent" id="navigator-content">
+ <?gmfgen generated="true"?>
+ <navigatorContent
+ id="org.eclipse.papyrus.uml.diagram.clazz.resourceContent"
+ name="%navigatorContentName"
+ priority="normal"
+ contentProvider="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLNavigatorContentProvider"
+ labelProvider="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLNavigatorLabelProvider"
+ icon="icons/obj16/UMLDiagramFile.gif"
+ activeByDefault="true">
+ <triggerPoints>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <test property="org.eclipse.core.resources.extension" value="PapyrusUMLClass_diagram"/>
+ </and>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLAbstractNavigatorItem"/>
+ </or>
+ </triggerPoints>
+ <possibleChildren>
+ <or>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLAbstractNavigatorItem"/>
+ </or>
+ </possibleChildren>
+ <commonSorter
+ id="org.eclipse.papyrus.uml.diagram.clazz.navigatorSorter"
+ class="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLNavigatorSorter">
+ <parentExpression>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <test property="org.eclipse.core.resources.extension" value="PapyrusUMLClass_diagram"/>
+ </and>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLAbstractNavigatorItem"/>
+ </or>
+ </parentExpression>
+ </commonSorter>
+ </navigatorContent>
+ <navigatorContent
+ id="org.eclipse.papyrus.uml.diagram.clazz.domainResourceContent"
+ name="%domainNavigatorContentName"
+ priority="normal"
+ contentProvider="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLDomainNavigatorContentProvider"
+ labelProvider="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLDomainNavigatorLabelProvider"
+ icon="icons/obj16/UMLDiagramFile.gif"
+ activeByDefault="true">
+ <triggerPoints>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <test property="org.eclipse.core.resources.extension" value="PapyrusUMLClass"/>
+ </and>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLDomainNavigatorItem"/>
+ </or>
+ </triggerPoints>
+ <possibleChildren>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLDomainNavigatorItem"/>
+ </possibleChildren>
+ </navigatorContent>
+ <actionProvider
+ id="org.eclipse.papyrus.uml.diagram.clazz.navigatorActionProvider"
+ class="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLNavigatorActionProvider">
+ <enablement>
+ <or>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLAbstractNavigatorItem"/>
+ </or>
+ </enablement>
+ </actionProvider>
+ </extension>
+<extension point="org.eclipse.ui.navigator.linkHelper" id="navigator-linkhelper">
+ <?gmfgen generated="true"?>
+ <linkHelper
+ id="org.eclipse.papyrus.uml.diagram.clazz.navigatorLinkHelper"
+ class="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLNavigatorLinkHelper">
+ <editorInputEnablement>
+ <and>
+ <instanceof value="org.eclipse.emf.common.ui.URIEditorInput"/>
+ <test property="org.eclipse.papyrus.uml.diagram.clazz.isURIEditorInput"/>
+ </and>
+ </editorInputEnablement>
+ <selectionEnablement>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.navigator.UMLAbstractNavigatorItem"/>
+ </selectionEnablement>
+ </linkHelper>
+ </extension>
+<extension point="org.eclipse.ui.commands" id="menu-commands">
+ <?gmfgen generated="true"?>
+ <category id="org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
+ <command id="org.eclipse.papyrus.uml.diagram.clazz.LoadResourceAction"
+ name="Load Resource"
+ categoryId="org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorID"
+ defaultHandler="org.eclipse.papyrus.uml.diagram.clazz.part.LoadResourceAction"/>
+ </extension>
<extension point="org.eclipse.ui.commands">
<command
categoryId="org.eclipse.papyrus.editor.category"
@@ -1507,62 +1507,62 @@
</action>
</objectContribution>
</extension>
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
- <?gmfgen generated="true"?>
-<page
- id="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLClassDiagram"
- name="PapyrusUMLClassDiagram Diagram"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
- class="org.eclipse.papyrus.uml.diagram.clazz.preferences.DiagramGeneralPreferencePage">
-</page>
-<page
- id="org.eclipse.papyrus.uml.diagram.clazz.preferences.DiagramPrintingPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.printing"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLClassDiagram"
- class="org.eclipse.papyrus.uml.diagram.clazz.preferences.DiagramPrintingPreferencePage">
-</page>
-<page
- id="org.eclipse.papyrus.uml.diagram.clazz.preferences.DiagramRulersAndGridPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLClassDiagram"
- class="org.eclipse.papyrus.uml.diagram.clazz.preferences.DiagramRulersAndGridPreferencePage">
-</page>
- </extension>
-
-<extension point="org.eclipse.ui.menus" id="context-menus">
- <?gmfgen generated="true"?>
- <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
- </menuContribution>
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
- </menuContribution -->
- <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
- <command commandId="org.eclipse.papyrus.uml.diagram.clazz.LoadResourceAction">
- <visibleWhen>
- <and>
- <with variable="activePartId"><equals value="org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorID"/></with>
- <with variable="selection"><iterate ifEmpty="false">
- <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPart"/>
- </iterate></with>
- </and>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
-
-
-<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
- <?gmfgen generated="true"?>
- <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.clazz.providers.UMLMarkerNavigationProvider">
- <MarkerType name="org.eclipse.papyrus.uml.diagram.clazz.diagnostic"/>
- <Priority name="Lowest"/>
- </MarkerNavigationProvider>
- </extension>
-
-<extension id="diagnostic" name="PapyrusUMLClassDiagram problems" point="org.eclipse.core.resources.markers">
- <?gmfgen generated="true"?>
- <super type="org.eclipse.core.resources.problemmarker"/>
- <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
- <persistent value="true"/>
+<extension point="org.eclipse.ui.preferencePages" id="prefpages">
+ <?gmfgen generated="true"?>
+<page
+ id="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLClassDiagram"
+ name="PapyrusUMLClassDiagram Diagram"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
+ class="org.eclipse.papyrus.uml.diagram.clazz.preferences.DiagramGeneralPreferencePage">
+</page>
+<page
+ id="org.eclipse.papyrus.uml.diagram.clazz.preferences.DiagramPrintingPreferencePage"
+ name="%prefpage.org.eclipse.uml2.uml.diagram.printing"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLClassDiagram"
+ class="org.eclipse.papyrus.uml.diagram.clazz.preferences.DiagramPrintingPreferencePage">
+</page>
+<page
+ id="org.eclipse.papyrus.uml.diagram.clazz.preferences.DiagramRulersAndGridPreferencePage"
+ name="%prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLClassDiagram"
+ class="org.eclipse.papyrus.uml.diagram.clazz.preferences.DiagramRulersAndGridPreferencePage">
+</page>
+ </extension>
+
+<extension point="org.eclipse.ui.menus" id="context-menus">
+ <?gmfgen generated="true"?>
+ <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
+ </menuContribution>
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
+ </menuContribution -->
+ <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
+ <command commandId="org.eclipse.papyrus.uml.diagram.clazz.LoadResourceAction">
+ <visibleWhen>
+ <and>
+ <with variable="activePartId"><equals value="org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorID"/></with>
+ <with variable="selection"><iterate ifEmpty="false">
+ <instanceof value="org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPart"/>
+ </iterate></with>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+
+
+<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
+ <?gmfgen generated="true"?>
+ <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.clazz.providers.UMLMarkerNavigationProvider">
+ <MarkerType name="org.eclipse.papyrus.uml.diagram.clazz.diagnostic"/>
+ <Priority name="Lowest"/>
+ </MarkerNavigationProvider>
+ </extension>
+
+<extension id="diagnostic" name="PapyrusUMLClassDiagram problems" point="org.eclipse.core.resources.markers">
+ <?gmfgen generated="true"?>
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
+ <persistent value="true"/>
</extension><extension
point="org.eclipse.gmf.runtime.common.ui.services.parserProviders">
<ParserProvider
@@ -1572,749 +1572,749 @@
</Priority>
</ParserProvider>
</extension>
-<extension
- id="PapyrusUMLClassDiagram.palettedefinition"
- name="PapyrusUMLClassDiagram Predefined Entries"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Lowest"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.clazz.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
-
- <entry
- defineOnly="true"
- description="Create a new Class"
- id="clazz.tool.class"
- kind="tool"
- label="Class"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a ClassifiertemplateParameter"
- id="clazz.tool.classifiertemplateparameter"
- kind="tool"
- label="ClassifierTemplateParameter"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ClassifierTemplateParameter.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ClassifierTemplateParameter.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a comment"
- id="clazz.tool.comment"
- kind="tool"
- label="Comment"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a component"
- id="clazz.tool.component"
- kind="tool"
- label="Component"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a constraint"
- id="clazz.tool.constraint"
- kind="tool"
- label="Constraint"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a new DataType"
- id="clazz.tool.datatype"
- kind="tool"
- label="DataType"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new DurationObservation"
- id="createDurationObservation7CreationTool"
- kind="tool"
- label="DurationObservation"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an enumeration"
- id="clazz.tool.enumeration"
- kind="tool"
- label="Enumeration"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an enumeration literal"
- id="clazz.tool.enumerationliteral"
- kind="tool"
- label="Enumeration literal"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an interface"
- id="clazz.tool.interface"
- kind="tool"
- label="Interface"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an InstanceSpecification"
- id="clazz.tool.instancespecification"
- kind="tool"
- label="InstanceSpecification"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InstanceSpecification.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InstanceSpecification.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an InformationItem"
- id="clazz.tool.informationitem"
- kind="tool"
- label="InformationItem"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationItem.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationItem.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Primitivetype"
- id="clazz.tool.primitivetype"
- kind="tool"
- label="PrimitiveType"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a model"
- id="clazz.tool.model"
- kind="tool"
- label="Model"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an operation"
- id="clazz.tool.operation"
- kind="tool"
- label="Operation"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an OperationTemplateParameter"
- id="clazz.tool.OperationTemplateParameter"
- kind="tool"
- label="OperationTemplateParameter"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OperationTemplateParameter.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OperationTemplateParameter.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Package"
- id="clazz.tool.package"
- kind="tool"
- label="Package"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a new Property"
- id="clazz.tool.property"
- kind="tool"
- label="Property"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a reception"
- id="clazz.tool.reception"
- kind="tool"
- label="Reception"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a RedefinableTemplateSignature"
- id="clazz.tool.redefinabletemplatesignature"
- kind="tool"
- label="RedefinableTemplateSignature"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/RedefinableTemplateSignature.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/RedefinableTemplateSignature.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a signal"
- id="clazz.tool.signal"
- kind="tool"
- label="Signal"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Slot"
- id="clazz.tool.slot"
- kind="tool"
- label="Slot"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Slot.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Slot.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a templateParameter"
- id="clazz.tool.templateparameter"
- kind="tool"
- label="TemplateParameter"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateParameter.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateParameter.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a TemplateSignature"
- id="clazz.tool.templatesignature"
- kind="tool"
- label="TemplateSignature"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateSignature.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateSignature.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new TimeObservation"
- id="createTimeObservation22CreationTool"
- kind="tool"
- label="TimeObservation"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a ConnectableElementTemplateParameter"
- id="clazz.tool.connectableelementtemplateparameter"
- kind="tool"
- label="ConnectableElementTemplateParameter"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectableElementTemplateParameter.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectableElementTemplateParameter.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an Abstraction"
- id="clazz.tool.abstraction"
- kind="tool"
- label="Abstraction"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an association"
- id="clazz.tool.association"
- kind="tool"
- label="Association"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an association branch"
- id="clazz.tool.associationbranch"
- kind="tool"
- label="AssociationBranch"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
- </entry>
- <entry
- defineOnly="true"
- description="AssociationClass"
- id="clazz.tool.associationclass"
- kind="tool"
- label="AssociationClass"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AssociationClass.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AssociationClass.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a ContainmentLink"
- id="clazz.tool.containmentlink"
- kind="tool"
- label="ContainmentLink"
- large_icon="icons/obj16/ContainmentConnection.gif"
- path=""
- small_icon="icons/obj16/ContainmentConnection.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Creation of a context link for a Constraint"
- id="clazz.tool.contextlink"
- kind="tool"
- label="ContextLink"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a dependency"
- id="clazz.tool.dependency"
- kind="tool"
- label="Dependency"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a dependency branch"
- id="clazz.tool.dependencybranch"
- kind="tool"
- label="DependencyBranch"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a elementImport"
- id="clazz.tool.elementimport"
- kind="tool"
- label="ElementImport"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ElementImport.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ElementImport.gif">
- </entry>
- <entry
- defineOnly="true"
- description=" Create a generalization"
- id="clazz.tool.generalization"
- kind="tool"
- label="Generalization"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif">
- </entry>
- <entry
- defineOnly="true"
- description="GeneralizationSet"
- id="clazz.tool.generalizationset"
- kind="tool"
- label="GeneralizationSet"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralizationSet.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralizationSet.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an InformationFlow link"
- id="clazz.tool.informationflowlink"
- kind="tool"
- label="InformationFlow link"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationFlow.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationFlow.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an InstanceSpecification link"
- id="clazz.tool.instancespecificationlink"
- kind="tool"
- label="InstanceSpecification link"
- large_icon="icons/obj16/InstanceLink.gif"
- path=""
- small_icon="icons/obj16/InstanceLink.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an InterfaceRealization"
- id="clazz.tool.interfacerealization"
- kind="tool"
- label="InterfaceRealization"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Creation of a link for comment, constraint, TimeObservation, DurationObservation"
- id="clazz.tool.link"
- kind="tool"
- label="Link"
- large_icon="icons/obj16/Link.gif"
- path=""
- small_icon="icons/obj16/Link.gif">
- </entry>
- <entry
- defineOnly="true"
- description=" Create a packageImport"
- id="clazz.tool.packageimport"
- kind="tool"
- label="PackageImport"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a packageMerge"
- id="clazz.tool.packagemerge"
- kind="tool"
- label="PackageMerge"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a profileApplication"
- id="clazz.tool.profileapplication"
- kind="tool"
- label="ProfileApplication"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Realization"
- id="clazz.tool.realization"
- kind="tool"
- label="Realization"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a substitution"
- id="clazz.tool.substitution"
- kind="tool"
- label="Substitution"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Substitution.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Substitution.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a TemplateBinding"
- id="clazz.tool.templatebinding"
- kind="tool"
- label="TemplateBinding"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateBinding.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateBinding.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an Usage"
- id="clazz.tool.usage"
- kind="tool"
- label="Usage"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif">
- </entry>
-
- </contribution>
- </paletteProvider>
-
- </extension>
-
-<extension
- id="PapyrusUMLClassDiagram.standard"
- name="PapyrusUMLClassDiagram Standard Palette"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Low"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.clazz.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
-
- <entry
- description="Nodes"
- id="clazz.group.nodes"
- kind="drawer"
- label="Nodes"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
- <predefinedEntry
- id="clazz.tool.class"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.classifiertemplateparameter"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.comment"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.component"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.constraint"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.datatype"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="createDurationObservation7CreationTool"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.enumeration"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.enumerationliteral"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.interface"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.instancespecification"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.informationitem"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.primitivetype"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.model"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.operation"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.OperationTemplateParameter"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.package"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.property"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.reception"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.redefinabletemplatesignature"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.signal"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.slot"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.templateparameter"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.templatesignature"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="createTimeObservation22CreationTool"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.connectableelementtemplateparameter"
- path="/clazz.group.nodes">
- </predefinedEntry>
- <entry
- description="Edges"
- id="clazz.group.relationships"
- kind="drawer"
- label="Edges"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
- <predefinedEntry
- id="clazz.tool.abstraction"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.association"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.associationbranch"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.associationclass"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.containmentlink"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.contextlink"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.dependency"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.dependencybranch"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.elementimport"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.generalization"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.generalizationset"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.informationflowlink"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.instancespecificationlink"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.interfacerealization"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.link"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.packageimport"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.packagemerge"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.profileapplication"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.realization"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.substitution"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.templatebinding"
- path="/clazz.group.relationships">
- </predefinedEntry>
- <predefinedEntry
- id="clazz.tool.usage"
- path="/clazz.group.relationships">
- </predefinedEntry>
- </contribution>
- <editor id="org.eclipse.papyrus.uml.diagram.clazz"/>
- </paletteProvider>
-
-</extension>
-<extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
- <?gmfgen generated="true"?>
- <decoratorProvider class="org.eclipse.papyrus.uml.diagram.clazz.providers.UMLValidationDecoratorProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
- <context decoratorTargets="PRIMARY_VIEW"/>
- </decoratorProvider>
- </extension>
+<extension
+ id="PapyrusUMLClassDiagram.palettedefinition"
+ name="PapyrusUMLClassDiagram Predefined Entries"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Lowest"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.clazz.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+
+ <entry
+ defineOnly="true"
+ description="Create a new Class"
+ id="clazz.tool.class"
+ kind="tool"
+ label="Class"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a ClassifiertemplateParameter"
+ id="clazz.tool.classifiertemplateparameter"
+ kind="tool"
+ label="ClassifierTemplateParameter"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ClassifierTemplateParameter.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ClassifierTemplateParameter.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a comment"
+ id="clazz.tool.comment"
+ kind="tool"
+ label="Comment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a component"
+ id="clazz.tool.component"
+ kind="tool"
+ label="Component"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a constraint"
+ id="clazz.tool.constraint"
+ kind="tool"
+ label="Constraint"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a new DataType"
+ id="clazz.tool.datatype"
+ kind="tool"
+ label="DataType"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new DurationObservation"
+ id="createDurationObservation7CreationTool"
+ kind="tool"
+ label="DurationObservation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an enumeration"
+ id="clazz.tool.enumeration"
+ kind="tool"
+ label="Enumeration"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an enumeration literal"
+ id="clazz.tool.enumerationliteral"
+ kind="tool"
+ label="Enumeration literal"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an interface"
+ id="clazz.tool.interface"
+ kind="tool"
+ label="Interface"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an InstanceSpecification"
+ id="clazz.tool.instancespecification"
+ kind="tool"
+ label="InstanceSpecification"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InstanceSpecification.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InstanceSpecification.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an InformationItem"
+ id="clazz.tool.informationitem"
+ kind="tool"
+ label="InformationItem"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationItem.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationItem.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Primitivetype"
+ id="clazz.tool.primitivetype"
+ kind="tool"
+ label="PrimitiveType"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a model"
+ id="clazz.tool.model"
+ kind="tool"
+ label="Model"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an operation"
+ id="clazz.tool.operation"
+ kind="tool"
+ label="Operation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an OperationTemplateParameter"
+ id="clazz.tool.OperationTemplateParameter"
+ kind="tool"
+ label="OperationTemplateParameter"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OperationTemplateParameter.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/OperationTemplateParameter.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Package"
+ id="clazz.tool.package"
+ kind="tool"
+ label="Package"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a new Property"
+ id="clazz.tool.property"
+ kind="tool"
+ label="Property"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a reception"
+ id="clazz.tool.reception"
+ kind="tool"
+ label="Reception"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a RedefinableTemplateSignature"
+ id="clazz.tool.redefinabletemplatesignature"
+ kind="tool"
+ label="RedefinableTemplateSignature"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/RedefinableTemplateSignature.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/RedefinableTemplateSignature.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a signal"
+ id="clazz.tool.signal"
+ kind="tool"
+ label="Signal"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Signal.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Slot"
+ id="clazz.tool.slot"
+ kind="tool"
+ label="Slot"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Slot.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Slot.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a templateParameter"
+ id="clazz.tool.templateparameter"
+ kind="tool"
+ label="TemplateParameter"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateParameter.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateParameter.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a TemplateSignature"
+ id="clazz.tool.templatesignature"
+ kind="tool"
+ label="TemplateSignature"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateSignature.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateSignature.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new TimeObservation"
+ id="createTimeObservation22CreationTool"
+ kind="tool"
+ label="TimeObservation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a ConnectableElementTemplateParameter"
+ id="clazz.tool.connectableelementtemplateparameter"
+ kind="tool"
+ label="ConnectableElementTemplateParameter"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectableElementTemplateParameter.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectableElementTemplateParameter.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an Abstraction"
+ id="clazz.tool.abstraction"
+ kind="tool"
+ label="Abstraction"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an association"
+ id="clazz.tool.association"
+ kind="tool"
+ label="Association"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an association branch"
+ id="clazz.tool.associationbranch"
+ kind="tool"
+ label="AssociationBranch"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="AssociationClass"
+ id="clazz.tool.associationclass"
+ kind="tool"
+ label="AssociationClass"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AssociationClass.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/AssociationClass.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a ContainmentLink"
+ id="clazz.tool.containmentlink"
+ kind="tool"
+ label="ContainmentLink"
+ large_icon="icons/obj16/ContainmentConnection.gif"
+ path=""
+ small_icon="icons/obj16/ContainmentConnection.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Creation of a context link for a Constraint"
+ id="clazz.tool.contextlink"
+ kind="tool"
+ label="ContextLink"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a dependency"
+ id="clazz.tool.dependency"
+ kind="tool"
+ label="Dependency"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a dependency branch"
+ id="clazz.tool.dependencybranch"
+ kind="tool"
+ label="DependencyBranch"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a elementImport"
+ id="clazz.tool.elementimport"
+ kind="tool"
+ label="ElementImport"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ElementImport.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ElementImport.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description=" Create a generalization"
+ id="clazz.tool.generalization"
+ kind="tool"
+ label="Generalization"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="GeneralizationSet"
+ id="clazz.tool.generalizationset"
+ kind="tool"
+ label="GeneralizationSet"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralizationSet.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/GeneralizationSet.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an InformationFlow link"
+ id="clazz.tool.informationflowlink"
+ kind="tool"
+ label="InformationFlow link"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationFlow.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InformationFlow.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an InstanceSpecification link"
+ id="clazz.tool.instancespecificationlink"
+ kind="tool"
+ label="InstanceSpecification link"
+ large_icon="icons/obj16/InstanceLink.gif"
+ path=""
+ small_icon="icons/obj16/InstanceLink.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an InterfaceRealization"
+ id="clazz.tool.interfacerealization"
+ kind="tool"
+ label="InterfaceRealization"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Creation of a link for comment, constraint, TimeObservation, DurationObservation"
+ id="clazz.tool.link"
+ kind="tool"
+ label="Link"
+ large_icon="icons/obj16/Link.gif"
+ path=""
+ small_icon="icons/obj16/Link.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description=" Create a packageImport"
+ id="clazz.tool.packageimport"
+ kind="tool"
+ label="PackageImport"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a packageMerge"
+ id="clazz.tool.packagemerge"
+ kind="tool"
+ label="PackageMerge"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a profileApplication"
+ id="clazz.tool.profileapplication"
+ kind="tool"
+ label="ProfileApplication"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Realization"
+ id="clazz.tool.realization"
+ kind="tool"
+ label="Realization"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a substitution"
+ id="clazz.tool.substitution"
+ kind="tool"
+ label="Substitution"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Substitution.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Substitution.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a TemplateBinding"
+ id="clazz.tool.templatebinding"
+ kind="tool"
+ label="TemplateBinding"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateBinding.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TemplateBinding.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an Usage"
+ id="clazz.tool.usage"
+ kind="tool"
+ label="Usage"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif">
+ </entry>
+
+ </contribution>
+ </paletteProvider>
+
+ </extension>
+
+<extension
+ id="PapyrusUMLClassDiagram.standard"
+ name="PapyrusUMLClassDiagram Standard Palette"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Low"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.clazz.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+
+ <entry
+ description="Nodes"
+ id="clazz.group.nodes"
+ kind="drawer"
+ label="Nodes"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="clazz.tool.class"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.classifiertemplateparameter"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.comment"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.component"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.constraint"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.datatype"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createDurationObservation7CreationTool"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.enumeration"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.enumerationliteral"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.interface"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.instancespecification"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.informationitem"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.primitivetype"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.model"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.operation"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.OperationTemplateParameter"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.package"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.property"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.reception"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.redefinabletemplatesignature"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.signal"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.slot"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.templateparameter"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.templatesignature"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createTimeObservation22CreationTool"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.connectableelementtemplateparameter"
+ path="/clazz.group.nodes">
+ </predefinedEntry>
+ <entry
+ description="Edges"
+ id="clazz.group.relationships"
+ kind="drawer"
+ label="Edges"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="clazz.tool.abstraction"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.association"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.associationbranch"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.associationclass"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.containmentlink"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.contextlink"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.dependency"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.dependencybranch"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.elementimport"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.generalization"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.generalizationset"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.informationflowlink"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.instancespecificationlink"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.interfacerealization"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.link"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.packageimport"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.packagemerge"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.profileapplication"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.realization"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.substitution"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.templatebinding"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ <predefinedEntry
+ id="clazz.tool.usage"
+ path="/clazz.group.relationships">
+ </predefinedEntry>
+ </contribution>
+ <editor id="org.eclipse.papyrus.uml.diagram.clazz"/>
+ </paletteProvider>
+
+</extension>
+<extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
+ <?gmfgen generated="true"?>
+ <decoratorProvider class="org.eclipse.papyrus.uml.diagram.clazz.providers.UMLValidationDecoratorProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
+ <context decoratorTargets="PRIMARY_VIEW"/>
+ </decoratorProvider>
+ </extension>
<!-- Diagram specific advices -->
<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
@@ -2892,9 +2892,9 @@
</diagramMappings>
</extension>
-<extension point="org.eclipse.ui.handlers" id="menu-handlers">
- <?gmfgen generated="true"?>
- </extension>
+<extension point="org.eclipse.ui.handlers" id="menu-handlers">
+ <?gmfgen generated="true"?>
+ </extension>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForComponentCreateCommand.java
index c944d6cd889..51db7b5e780 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForComponentCreateCommand.java
@@ -26,8 +26,8 @@ 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.clazz.providers.ElementInitializers;
-import org.eclipse.uml2.uml.AttributeOwner;
import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.StructuredClassifier;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
@@ -77,7 +77,7 @@ public class PropertyForComponentCreateCommand extends EditElementCommand {
}
/**
- * @generated NOT
+ * @generated
*/
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
@@ -93,7 +93,7 @@ public class PropertyForComponentCreateCommand extends EditElementCommand {
}
} else {
- AttributeOwner qualifiedTarget = (AttributeOwner) target;
+ StructuredClassifier qualifiedTarget = (StructuredClassifier) target;
qualifiedTarget.getOwnedAttributes()
.add(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShortCutDiagramCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShortCutDiagramCreateCommand.java
index 73ceba177d7..7edeed0c2d1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShortCutDiagramCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShortCutDiagramCreateCommand.java
@@ -68,9 +68,9 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
// 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();
+ // ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getContainer().eResource();
// if (resource == null) {
- // return null;
+ // return null;
// }
Resource resource = getElementToEdit().eResource();
Diagram newElement = NotationFactory.eINSTANCE.createDiagram();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AbstractionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AbstractionNameEditPart.java
index acfc0e492d0..b8a4ba20625 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AbstractionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AbstractionNameEditPart.java
@@ -1,821 +1,830 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AbstractionNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6014;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AbstractionNameEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public AbstractionNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4006, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AbstractionNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AbstractionNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6014;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AbstractionNameEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public AbstractionNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4006, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AbstractionNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAbstractionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAbstractionEditPart.java
index 7994432d5d0..4889df92124 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAbstractionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAbstractionEditPart.java
@@ -1,813 +1,822 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AppliedStereotypeAbstractionEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6015;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeAbstractionEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypeAbstractionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4006, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeAbstractionEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AppliedStereotypeAbstractionEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6015;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeAbstractionEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypeAbstractionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4006, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeAbstractionEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAssociationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAssociationEditPart.java
index 8c5fee50523..a2e4dae1301 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAssociationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeAssociationEditPart.java
@@ -1,813 +1,822 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AppliedStereotypeAssociationEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6001;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeAssociationEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypeAssociationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Association_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeAssociationEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AppliedStereotypeAssociationEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6001;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeAssociationEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypeAssociationEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Association_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeAssociationEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeDependencyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeDependencyEditPart.java
index 39c5ddb0bb0..4b40e508cd0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeDependencyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeDependencyEditPart.java
@@ -1,813 +1,822 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AppliedStereotypeDependencyEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6027;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeDependencyEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypeDependencyEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeDependencyEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AppliedStereotypeDependencyEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6027;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeDependencyEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypeDependencyEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeDependencyEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.java
index 1c3feb8e14a..91d5d0c5e62 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeElementImportEditPart.java
@@ -1,813 +1,822 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6021;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeElementImportEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypeElementImportEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.ElementImport_4009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeElementImportEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6021;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeElementImportEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypeElementImportEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.ElementImport_4009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeElementImportEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeGeneralizationSetLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeGeneralizationSetLabelEditPart.java
index 0326d923b97..0e7d23c9434 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeGeneralizationSetLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeGeneralizationSetLabelEditPart.java
@@ -1,821 +1,830 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AppliedStereotypeGeneralizationSetLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6037;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeGeneralizationSetLabelEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypeGeneralizationSetLabelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.GeneralizationSet_4020, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeGeneralizationSetLabelEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AppliedStereotypeGeneralizationSetLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6037;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeGeneralizationSetLabelEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypeGeneralizationSetLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.GeneralizationSet_4020, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeGeneralizationSetLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeInterfaceRealizationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeInterfaceRealizationEditPart.java
index d890f630722..6af1620d1d0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeInterfaceRealizationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeInterfaceRealizationEditPart.java
@@ -1,813 +1,822 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AppliedStereotypeInterfaceRealizationEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6008;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeInterfaceRealizationEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypeInterfaceRealizationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.InterfaceRealization_4003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeInterfaceRealizationEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AppliedStereotypeInterfaceRealizationEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6008;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeInterfaceRealizationEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypeInterfaceRealizationEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.InterfaceRealization_4003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeInterfaceRealizationEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageImportEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageImportEditPart.java
index 9ca303c9182..0ee87fb34ad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageImportEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageImportEditPart.java
@@ -1,813 +1,822 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AppliedStereotypePackageImportEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6022;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypePackageImportEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypePackageImportEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.PackageImport_4010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypePackageImportEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AppliedStereotypePackageImportEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6022;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypePackageImportEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypePackageImportEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.PackageImport_4010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypePackageImportEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageMergeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageMergeEditPart.java
index d1bcca95360..342421af50c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageMergeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypePackageMergeEditPart.java
@@ -1,813 +1,822 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AppliedStereotypePackageMergeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6030;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypePackageMergeEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypePackageMergeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.PackageMerge_4011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypePackageMergeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AppliedStereotypePackageMergeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6030;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypePackageMergeEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypePackageMergeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.PackageMerge_4011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypePackageMergeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeRealizationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeRealizationEditPart.java
index f23d78ae9b2..b0d365da577 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeRealizationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeRealizationEditPart.java
@@ -1,813 +1,822 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AppliedStereotypeRealizationEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6012;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeRealizationEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypeRealizationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Realization_4005, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeRealizationEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AppliedStereotypeRealizationEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6012;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeRealizationEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypeRealizationEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Realization_4005, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeRealizationEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeSubstitutionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeSubstitutionEditPart.java
index 99993d4d809..4fe8b4d0500 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeSubstitutionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeSubstitutionEditPart.java
@@ -1,813 +1,822 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AppliedStereotypeSubstitutionEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6010;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeSubstitutionEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypeSubstitutionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Substitution_4004, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeSubstitutionEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AppliedStereotypeSubstitutionEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6010;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeSubstitutionEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypeSubstitutionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Substitution_4004, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeSubstitutionEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeTemplateBindingEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeTemplateBindingEditPart.java
index 3507d21f125..7e8640b1682 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeTemplateBindingEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeTemplateBindingEditPart.java
@@ -1,813 +1,822 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AppliedStereotypeTemplateBindingEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6036;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeTemplateBindingEditPart.VISUAL_ID), new Point(0, 20));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypeTemplateBindingEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.TemplateBinding_4015, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeTemplateBindingEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AppliedStereotypeTemplateBindingEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6036;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeTemplateBindingEditPart.VISUAL_ID), new Point(0, 20));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypeTemplateBindingEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.TemplateBinding_4015, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeTemplateBindingEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeUsageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeUsageEditPart.java
index d965caaf05e..df038a377ed 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeUsageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotypeUsageEditPart.java
@@ -1,813 +1,822 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AppliedStereotypeUsageEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6017;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeUsageEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypeUsageEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Usage_4007, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeUsageEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AppliedStereotypeUsageEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6017;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeUsageEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypeUsageEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Usage_4007, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotypeUsageEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotyperGeneralizationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotyperGeneralizationEditPart.java
index 7e076952877..5102060509a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotyperGeneralizationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AppliedStereotyperGeneralizationEditPart.java
@@ -1,813 +1,822 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AppliedStereotyperGeneralizationEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6007;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotyperGeneralizationEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public AppliedStereotyperGeneralizationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Generalization_4002, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotyperGeneralizationEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AppliedStereotyperGeneralizationEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6007;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotyperGeneralizationEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotyperGeneralizationEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Generalization_4002, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AppliedStereotyperGeneralizationEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchMutliplicityEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchMutliplicityEditPart.java
index 860a346beb2..033e3a41c3f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchMutliplicityEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchMutliplicityEditPart.java
@@ -1,815 +1,824 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetMultiplicityEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-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 AssociationBranchMutliplicityEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6035;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationBranchMutliplicityEditPart.VISUAL_ID), new Point(0, 20));
- }
-
- /**
- * @generated
- */
- public AssociationBranchMutliplicityEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndTargetMultiplicityEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.SOURCE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Association_4019, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationBranchMutliplicityEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetMultiplicityEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 AssociationBranchMutliplicityEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6035;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationBranchMutliplicityEditPart.VISUAL_ID), new Point(0, 20));
+ }
+
+ /**
+ * @generated
+ */
+ public AssociationBranchMutliplicityEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndTargetMultiplicityEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.SOURCE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Association_4019, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationBranchMutliplicityEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchRoleEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchRoleEditPart.java
index 9e07675cd55..3644f239101 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchRoleEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationBranchRoleEditPart.java
@@ -1,815 +1,824 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-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 AssociationBranchRoleEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6024;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationBranchRoleEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public AssociationBranchRoleEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndTargetEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.SOURCE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Association_4019, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationBranchRoleEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 AssociationBranchRoleEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6024;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationBranchRoleEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public AssociationBranchRoleEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndTargetEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.SOURCE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Association_4019, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationBranchRoleEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassAttributeCompartmentEditPart.java
index 1e33ebe652d..db43b7326a0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassAttributeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassAttributeCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class AssociationClassAttributeCompartmentEditPart extends ResizeableList
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.AssociationClassAttributeCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.AssociationClassAttributeCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassEditPart.java
index eda25315161..bbfd30e82a2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassEditPart.java
@@ -11,25 +11,36 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAssociationClassItemSemanticEditPolicy;
@@ -44,6 +55,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayE
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
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.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
/**
@@ -88,6 +100,7 @@ public class AssociationClassEditPart extends ClassifierEditPart {
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -100,6 +113,20 @@ public class AssociationClassEditPart extends ClassifierEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case AssociationClassFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -127,6 +154,19 @@ public class AssociationClassEditPart extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -244,6 +284,9 @@ public class AssociationClassEditPart extends ClassifierEditPart {
if (editPart instanceof AssociationClassNestedClassifierCompartmentEditPart) {
return getPrimaryShape().getNestedClassifierFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -251,8 +294,22 @@ public class AssociationClassEditPart extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof AssociationClassFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
@@ -265,7 +322,7 @@ public class AssociationClassEditPart extends ClassifierEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassFloatingNameEditPart.java
new file mode 100644
index 00000000000..ea702edf24b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 AssociationClassFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8504;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public AssociationClassFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.AssociationClass_2013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassNameEditPart.java
index 2ffb3616253..313aa6efeb0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassNameEditPart.java
@@ -864,7 +864,7 @@ public class AssociationClassNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassNestedClassifierCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassNestedClassifierCompartmentEditPart.java
index 23dbb69fa17..894c74bbf4d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassNestedClassifierCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassNestedClassifierCompartmentEditPart.java
@@ -78,8 +78,8 @@ public class AssociationClassNestedClassifierCompartmentEditPart extends ListCom
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.AssociationClassNestedClassifierCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.AssociationClassNestedClassifierCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassOperationCompartmentEditPart.java
index 621eee9e1ed..7eb605f1796 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassOperationCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassOperationCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class AssociationClassOperationCompartmentEditPart extends ListCompartmen
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.AssociationClassOperationCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.AssociationClassOperationCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleSourceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleSourceEditPart.java
index 864caff9e4f..1a20d8d90d8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleSourceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleSourceEditPart.java
@@ -1,815 +1,824 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-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 AssociationClassRoleSourceEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6031;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleSourceEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public AssociationClassRoleSourceEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndTargetEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.SOURCE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.AssociationClass_4017, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleSourceEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 AssociationClassRoleSourceEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6031;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleSourceEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public AssociationClassRoleSourceEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndTargetEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.SOURCE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.AssociationClass_4017, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleSourceEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleTargetEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleTargetEditPart.java
index 23675efa5e3..a5768ed851a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleTargetEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationClassRoleTargetEditPart.java
@@ -1,815 +1,824 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-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 AssociationClassRoleTargetEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6032;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleTargetEditPart.VISUAL_ID), new Point(0, 20));
- }
-
- /**
- * @generated
- */
- public AssociationClassRoleTargetEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndSourceEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.TARGET;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.AssociationClass_4017, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleTargetEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 AssociationClassRoleTargetEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6032;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleTargetEditPart.VISUAL_ID), new Point(0, 20));
+ }
+
+ /**
+ * @generated
+ */
+ public AssociationClassRoleTargetEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndSourceEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.TARGET;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.AssociationClass_4017, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassRoleTargetEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationFloatingNameEditPart.java
new file mode 100644
index 00000000000..1f289c45009
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 AssociationFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8521;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public AssociationFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Association_2015, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicitySourceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicitySourceEditPart.java
index 0ea213b9b98..4272f3ffc3d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicitySourceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicitySourceEditPart.java
@@ -1,815 +1,824 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceMultiplicityEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-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 AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6033;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationMultiplicitySourceEditPart.VISUAL_ID), new Point(0, 20));
- }
-
- /**
- * @generated
- */
- public AssociationMultiplicitySourceEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndSourceMultiplicityEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.TARGET;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Association_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationMultiplicitySourceEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceMultiplicityEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6033;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationMultiplicitySourceEditPart.VISUAL_ID), new Point(0, 20));
+ }
+
+ /**
+ * @generated
+ */
+ public AssociationMultiplicitySourceEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndSourceMultiplicityEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.TARGET;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Association_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationMultiplicitySourceEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicityTargetEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicityTargetEditPart.java
index 8bc9644c04c..9cd834e43da 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicityTargetEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationMultiplicityTargetEditPart.java
@@ -1,815 +1,824 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetMultiplicityEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-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 AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6034;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationMultiplicityTargetEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public AssociationMultiplicityTargetEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndTargetMultiplicityEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.SOURCE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Association_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationMultiplicityTargetEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetMultiplicityEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6034;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationMultiplicityTargetEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public AssociationMultiplicityTargetEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndTargetMultiplicityEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.SOURCE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Association_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationMultiplicityTargetEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationNameEditPart.java
index 82d62a4e218..78bdd38dfe5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationNameEditPart.java
@@ -1,838 +1,847 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 AssociationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6002;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationNameEditPart.VISUAL_ID), new Point(0, 20));
- }
-
- /**
- * @generated
- */
- public AssociationNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Association_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 AssociationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6002;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationNameEditPart.VISUAL_ID), new Point(0, 20));
+ }
+
+ /**
+ * @generated
+ */
+ public AssociationNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Association_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationNodeEditPart.java
index 2af7d2cccf1..c331ae9dc04 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationNodeEditPart.java
@@ -11,32 +11,45 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomAssociationNodeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.AssociationNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.DiamondNode;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class AssociationNodeEditPart extends NodeEditPart {
+public class AssociationNodeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -70,6 +83,7 @@ public class AssociationNodeEditPart extends NodeEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomAssociationNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -82,6 +96,20 @@ public class AssociationNodeEditPart extends NodeEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case AssociationFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -109,6 +137,19 @@ public class AssociationNodeEditPart extends NodeEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -118,7 +159,7 @@ public class AssociationNodeEditPart extends NodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new DiamondNode();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -127,8 +168,22 @@ public class AssociationNodeEditPart extends NodeEditPart {
* @generated
*/
@Override
- public DiamondNode getPrimaryShape() {
- return (DiamondNode) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof AssociationFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
}
/**
@@ -136,7 +191,7 @@ public class AssociationNodeEditPart extends NodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(20, 20);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
@@ -149,7 +204,7 @@ public class AssociationNodeEditPart extends NodeEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
@@ -205,4 +260,12 @@ public class AssociationNodeEditPart extends NodeEditPart {
((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
}
}
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(AssociationFloatingNameEditPart.VISUAL_ID));
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationSourceNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationSourceNameEditPart.java
index 7c1e182251d..45e340313c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationSourceNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationSourceNameEditPart.java
@@ -1,815 +1,824 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-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 AssociationSourceNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6005;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationSourceNameEditPart.VISUAL_ID), new Point(0, 20));
- }
-
- /**
- * @generated
- */
- public AssociationSourceNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndSourceEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.TARGET;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Association_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationSourceNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 AssociationSourceNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6005;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationSourceNameEditPart.VISUAL_ID), new Point(0, 20));
+ }
+
+ /**
+ * @generated
+ */
+ public AssociationSourceNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndSourceEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.TARGET;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Association_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationSourceNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationTargetNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationTargetNameEditPart.java
index 5d5723f96fd..a3269e0abe7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationTargetNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/AssociationTargetNameEditPart.java
@@ -1,815 +1,824 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-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 AssociationTargetNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6003;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationTargetNameEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public AssociationTargetNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndTargetEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.SOURCE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Association_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationTargetNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 AssociationTargetNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6003;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationTargetNameEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public AssociationTargetNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new DisplayAssociationEndTargetEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.SOURCE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Association_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationTargetNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/BindingSubstitutionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/BindingSubstitutionEditPart.java
index e3c72cb4650..fd23e392f3e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/BindingSubstitutionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/BindingSubstitutionEditPart.java
@@ -1,823 +1,832 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateBindingDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 BindingSubstitutionEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6023;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.BindingSubstitutionEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public BindingSubstitutionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(TemplateBindingDisplayEditPolicy.TEMPLATE_PARAMETER_DISPLAY, new TemplateBindingDisplayEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.TemplateBinding_4015, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.BindingSubstitutionEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.TemplateBindingDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 BindingSubstitutionEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6023;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.BindingSubstitutionEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public BindingSubstitutionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(TemplateBindingDisplayEditPolicy.TEMPLATE_PARAMETER_DISPLAY, new TemplateBindingDisplayEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.TemplateBinding_4015, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.BindingSubstitutionEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassAttributeCompartmentEditPart.java
index e609658a88b..d9fb0e830f6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassAttributeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassAttributeCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class ClassAttributeCompartmentEditPart extends ResizeableListCompartment
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassAttributeCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassAttributeCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassAttributeCompartmentEditPartCN.java
index 820d7617fc3..bf07df40db5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassAttributeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassAttributeCompartmentEditPartCN.java
@@ -77,8 +77,8 @@ public class ClassAttributeCompartmentEditPartCN extends ResizeableListCompartme
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassAttributeCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassAttributeCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassEditPart.java
index 5c4cdea5b2c..98557347581 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassEditPart.java
@@ -11,30 +11,39 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
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.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.locator.ContainmentPositionLocator;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
@@ -44,23 +53,22 @@ import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.Custom
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
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.BorderItemResizableEditPolicy;
-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.ShowHideClassifierContentsEditPolicy;
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.common.figure.node.ClassFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class ClassEditPart extends ClassifierEditPart {
+public class ClassEditPart extends org.eclipse.papyrus.uml.diagram.common.editparts.ClassEditPart {
/**
* @generated
@@ -93,11 +101,10 @@ public class ClassEditPart extends ClassifierEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassCanonicalEditPolicy());
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());
@@ -106,6 +113,7 @@ public class ClassEditPart extends ClassifierEditPart {
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -120,6 +128,17 @@ public class ClassEditPart extends ClassifierEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ClassFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case RedefinableTemplateSignatureEditPart.VISUAL_ID:
case ContainmentCircleEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
@@ -151,8 +170,21 @@ public class ClassEditPart extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
- //set the figure active when the feature of the of a class is true
+ // set the figure active when the feature of the of a class is true
if (resolveSemanticElement() != null) {
if (resolveSemanticElement().equals(event.getNotifier()) && (event.getFeature() instanceof EAttribute) && ((EAttribute) (event.getFeature())).getName().equals("isActive")) {
getPrimaryShape().setActive(event.getNewBooleanValue());
@@ -167,7 +199,7 @@ public class ClassEditPart extends ClassifierEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new ClassifierFigure();
+ return primaryShape = new ClassFigure();
}
/**
@@ -176,8 +208,8 @@ public class ClassEditPart extends ClassifierEditPart {
* @generated
*/
@Override
- public ClassifierFigure getPrimaryShape() {
- return (ClassifierFigure) primaryShape;
+ public ClassFigure getPrimaryShape() {
+ return (ClassFigure) primaryShape;
}
/**
@@ -213,7 +245,7 @@ public class ClassEditPart extends ClassifierEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -223,7 +255,7 @@ public class ClassEditPart extends ClassifierEditPart {
- //Papyrus Gencode :Affixed Containment locator
+ // Papyrus Gencode :Affixed Containment locator
if (childEditPart instanceof ContainmentCircleEditPart) {
IBorderItemLocator locator = new ContainmentPositionLocator(getMainFigure(), PositionConstants.NORTH);
getBorderedFigure().getBorderItemContainer().add(((ContainmentCircleEditPart) childEditPart).getFigure(), locator);
@@ -313,8 +345,22 @@ public class ClassEditPart extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof ClassFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassEditPartCN.java
index f7baf668fee..7ab9f613bfa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassEditPartCN.java
@@ -11,30 +11,39 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
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.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -42,7 +51,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.Custom
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.ClassEditPart;
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.BorderItemResizableEditPolicy;
@@ -51,14 +60,15 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPo
import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
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.common.figure.node.ClassFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class ClassEditPartCN extends ClassifierEditPart {
+public class ClassEditPartCN extends ClassEditPart {
/**
* @generated
@@ -91,8 +101,8 @@ public class ClassEditPartCN extends ClassifierEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassItemSemanticEditPolicyCN());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassCanonicalEditPolicyCN());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
@@ -103,6 +113,7 @@ public class ClassEditPartCN extends ClassifierEditPart {
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -117,6 +128,17 @@ public class ClassEditPartCN extends ClassifierEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ClassFloatingNameEditPartCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case RedefinableTemplateSignatureEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
@@ -147,8 +169,21 @@ public class ClassEditPartCN extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
- //set the figure active when the feature of the of a class is true
+ // set the figure active when the feature of the of a class is true
if (resolveSemanticElement() != null) {
if (resolveSemanticElement().equals(event.getNotifier()) && (event.getFeature() instanceof EAttribute) && ((EAttribute) (event.getFeature())).getName().equals("isActive")) {
getPrimaryShape().setActive(event.getNewBooleanValue());
@@ -163,7 +198,7 @@ public class ClassEditPartCN extends ClassifierEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new ClassifierFigure();
+ return primaryShape = new ClassFigure();
}
/**
@@ -172,8 +207,8 @@ public class ClassEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
- public ClassifierFigure getPrimaryShape() {
- return (ClassifierFigure) primaryShape;
+ public ClassFigure getPrimaryShape() {
+ return (ClassFigure) primaryShape;
}
/**
@@ -209,7 +244,7 @@ public class ClassEditPartCN extends ClassifierEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -295,8 +330,22 @@ public class ClassEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof ClassFloatingNameEditPartCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassFloatingNameEditPart.java
new file mode 100644
index 00000000000..45f4e88437e
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 ClassFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8510;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ClassFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Class_2008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassFloatingNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassFloatingNameEditPartCN.java
new file mode 100644
index 00000000000..5d228367963
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassFloatingNameEditPartCN.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 ClassFloatingNameEditPartCN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8518;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassFloatingNameEditPartCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ClassFloatingNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Class_3010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassFloatingNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNameEditPart.java
index d592dabbff9..6209d657f14 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNameEditPart.java
@@ -864,7 +864,7 @@ public class ClassNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNameEditPartCN.java
index 3cd8e45ce8e..b7c8c76110b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNameEditPartCN.java
@@ -864,7 +864,7 @@ public class ClassNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNestedClassifierCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNestedClassifierCompartmentEditPart.java
index 7ca70542596..63eab6e8af4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNestedClassifierCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNestedClassifierCompartmentEditPart.java
@@ -78,8 +78,8 @@ public class ClassNestedClassifierCompartmentEditPart extends ResizeableListComp
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassNestedClassifierCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassNestedClassifierCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNestedClassifierCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNestedClassifierCompartmentEditPartCN.java
index 066b23dac38..2cabd9fcc2b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNestedClassifierCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassNestedClassifierCompartmentEditPartCN.java
@@ -78,8 +78,8 @@ public class ClassNestedClassifierCompartmentEditPartCN extends ResizeableListCo
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassNestedClassifierCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassNestedClassifierCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassOperationCompartmentEditPart.java
index 4029355f1f7..24df3123f44 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassOperationCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassOperationCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class ClassOperationCompartmentEditPart extends ResizeableListCompartment
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassOperationCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassOperationCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassOperationCompartmentEditPartCN.java
index f4ed9cfb6cd..10791b6d13d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassOperationCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ClassOperationCompartmentEditPartCN.java
@@ -77,8 +77,8 @@ public class ClassOperationCompartmentEditPartCN extends ResizeableListCompartme
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassOperationCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ClassOperationCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentBodyEditPart.java
index 478354b32b0..377dcfed8b5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentBodyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentBodyEditPart.java
@@ -847,7 +847,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentBodyEditPartCN.java
index b30a73e6e7d..a2f534802be 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentBodyEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentBodyEditPartCN.java
@@ -847,7 +847,7 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentEditPart.java
index ef543de0564..5cfcc44d2bd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentEditPart.java
@@ -23,11 +23,11 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.editpolicies.PapyrusReflowableShapeEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.CommentItemSemanticEditPolicy;
@@ -195,7 +195,7 @@ public class CommentEditPart extends AbstractCommentEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentEditPartCN.java
index 5d5f4f9367c..96cd93c26e3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/CommentEditPartCN.java
@@ -23,11 +23,11 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.editpolicies.PapyrusReflowableShapeEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.CommentItemSemanticEditPolicyCN;
@@ -195,7 +195,7 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentAttributeCompartmentEditPart.java
index d65e992cbea..40fdf076aff 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentAttributeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentAttributeCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class ComponentAttributeCompartmentEditPart extends ResizeableListCompart
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentAttributeCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentAttributeCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentAttributeCompartmentEditPartCN.java
index 4e64322428e..4690fde3894 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentAttributeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentAttributeCompartmentEditPartCN.java
@@ -77,8 +77,8 @@ public class ComponentAttributeCompartmentEditPartCN extends ResizeableListCompa
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentAttributeCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentAttributeCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentEditPart.java
index c94b7a9695f..321d4c1e428 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentEditPart.java
@@ -11,29 +11,38 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -45,12 +54,12 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
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.BorderItemResizableEditPolicy;
-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.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ComponentFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator;
import org.eclipse.swt.graphics.Color;
@@ -90,11 +99,10 @@ public class ComponentEditPart extends ClassifierEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentCanonicalEditPolicy());
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 CustomComponentItemSemanticEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
@@ -102,6 +110,7 @@ public class ComponentEditPart extends ClassifierEditPart {
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -116,6 +125,17 @@ public class ComponentEditPart extends ClassifierEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ComponentFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case RedefinableTemplateSignatureEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
@@ -146,6 +166,19 @@ public class ComponentEditPart extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -201,7 +234,7 @@ public class ComponentEditPart extends ClassifierEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -287,8 +320,22 @@ public class ComponentEditPart extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof ComponentFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentEditPartCN.java
index 2364cc9dced..411ece92df9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentEditPartCN.java
@@ -11,29 +11,38 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -51,6 +60,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayE
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ComponentFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator;
import org.eclipse.swt.graphics.Color;
@@ -90,8 +100,8 @@ public class ComponentEditPartCN extends ClassifierEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentItemSemanticEditPolicyCN());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentCanonicalEditPolicyCN());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
@@ -102,6 +112,7 @@ public class ComponentEditPartCN extends ClassifierEditPart {
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -116,6 +127,17 @@ public class ComponentEditPartCN extends ClassifierEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ComponentFloatingNameEditPartCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case RedefinableTemplateSignatureEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
@@ -146,6 +168,19 @@ public class ComponentEditPartCN extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -201,7 +236,7 @@ public class ComponentEditPartCN extends ClassifierEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -287,8 +322,22 @@ public class ComponentEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof ComponentFloatingNameEditPartCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentFloatingNameEditPart.java
new file mode 100644
index 00000000000..dec085610c4
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 ComponentFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8503;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ComponentFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Component_2002, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentFloatingNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentFloatingNameEditPartCN.java
new file mode 100644
index 00000000000..5d2763c84eb
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentFloatingNameEditPartCN.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 ComponentFloatingNameEditPartCN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8513;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentFloatingNameEditPartCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ComponentFloatingNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Component_3021, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentFloatingNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNameEditPart.java
index 92dd3276b4d..fbfcc57f597 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNameEditPart.java
@@ -864,7 +864,7 @@ public class ComponentNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNameEditPartCN.java
index 6a31131c30a..314cc118c87 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNameEditPartCN.java
@@ -864,7 +864,7 @@ public class ComponentNameEditPartCN extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNestedClassifierCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNestedClassifierCompartmentEditPart.java
index e5e028505b8..d82c9931fdb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNestedClassifierCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNestedClassifierCompartmentEditPart.java
@@ -78,8 +78,8 @@ public class ComponentNestedClassifierCompartmentEditPart extends ResizeableList
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentNestedClassifierCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentNestedClassifierCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new NestedClazzCompartmentCreationEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNestedClassifierCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNestedClassifierCompartmentEditPartCN.java
index ababe15d748..fed2e23858d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNestedClassifierCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentNestedClassifierCompartmentEditPartCN.java
@@ -78,8 +78,8 @@ public class ComponentNestedClassifierCompartmentEditPartCN extends ResizeableLi
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentNestedClassifierCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentNestedClassifierCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentOperationCompartmentEditPart.java
index 8b790682384..70e52551904 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentOperationCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentOperationCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class ComponentOperationCompartmentEditPart extends ResizeableListCompart
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentOperationCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentOperationCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentOperationCompartmentEditPartCN.java
index 46bb8c848f9..110759483b8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentOperationCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ComponentOperationCompartmentEditPartCN.java
@@ -77,8 +77,8 @@ public class ComponentOperationCompartmentEditPartCN extends ResizeableListCompa
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentOperationCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ComponentOperationCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintBodyEditPart.java
index 2317749d016..e9dc8cc7d4e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintBodyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintBodyEditPart.java
@@ -847,7 +847,7 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintBodyEditPartCN.java
index e495760ac77..bf68e61fc65 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintBodyEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintBodyEditPartCN.java
@@ -847,7 +847,7 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintEditPart.java
index a8db75de492..13087431037 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintEditPart.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomConstraintItemSemanticEditPolicy;
@@ -202,7 +202,7 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintEditPartCN.java
index 87d9c287e65..8d81a0ea965 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintEditPartCN.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomConstraint2ItemSemanticEditPolicy;
@@ -202,7 +202,7 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintLabelEditPart.java
index 6ba4ddaf2e1..05569c0a4a2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintLabelEditPart.java
@@ -1,813 +1,822 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 ConstraintLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5067;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintLabelEditPart.VISUAL_ID), new Point(0, 20));
- }
-
- /**
- * @generated
- */
- public ConstraintLabelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.GeneralizationSet_4020, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintLabelEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 ConstraintLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5067;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintLabelEditPart.VISUAL_ID), new Point(0, 20));
+ }
+
+ /**
+ * @generated
+ */
+ public ConstraintLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.GeneralizationSet_4020, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintNameEditPart.java
index 2405e97f822..f010fbf11df 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintNameEditPart.java
@@ -864,7 +864,7 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintNameEditPartCN.java
index be91e415279..f89df8852b8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ConstraintNameEditPartCN.java
@@ -864,7 +864,7 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContainmentCircleEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContainmentCircleEditPart.java
index 8e18dd5d9f2..d5096b5a61e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContainmentCircleEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContainmentCircleEditPart.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.figure.ContainmentFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomContainmentCircleItemSemanticEditPolicy;
import org.eclipse.swt.graphics.Color;
@@ -131,7 +131,7 @@ public class ContainmentCircleEditPart extends AbstractBorderItemEditPart {
* @generated
*/
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(20, 20);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContextLinkAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContextLinkAppliedStereotypeEditPart.java
index b3605d17b04..0c7f546556e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContextLinkAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ContextLinkAppliedStereotypeEditPart.java
@@ -1,815 +1,824 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.NoSemanticParserEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 8501;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ContextLinkAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 15));
- }
-
- /**
- * @generated
- */
- public ContextLinkAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NoSemanticParserEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.ConstraintContext_8500, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ContextLinkAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.NoSemanticParserEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8501;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ContextLinkAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 15));
+ }
+
+ /**
+ * @generated
+ */
+ public ContextLinkAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NoSemanticParserEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.ConstraintContext_8500, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ContextLinkAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeAttributeCompartmentEditPart.java
index fe81c2ae60b..66fa675c2af 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeAttributeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeAttributeCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class DataTypeAttributeCompartmentEditPart extends ResizeableListCompartm
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DataTypeAttributeCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DataTypeAttributeCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeAttributeCompartmentEditPartCN.java
index 102bc65ef97..2a10574d91e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeAttributeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeAttributeCompartmentEditPartCN.java
@@ -77,8 +77,8 @@ public class DataTypeAttributeCompartmentEditPartCN extends ResizeableListCompar
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DataTypeAttributeCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DataTypeAttributeCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeEditPart.java
index ba70022cd3d..00d9bc66f38 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeEditPart.java
@@ -11,29 +11,38 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -45,12 +54,12 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
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.BorderItemResizableEditPolicy;
-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.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator;
import org.eclipse.swt.graphics.Color;
@@ -90,18 +99,18 @@ public class DataTypeEditPart extends ClassifierEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DataTypeItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DataTypeCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DataTypeCanonicalEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDataTypeItemSemanticEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -116,6 +125,17 @@ public class DataTypeEditPart extends ClassifierEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case DataTypeFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case RedefinableTemplateSignatureEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
@@ -146,6 +166,19 @@ public class DataTypeEditPart extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -194,7 +227,7 @@ public class DataTypeEditPart extends ClassifierEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -272,8 +305,22 @@ public class DataTypeEditPart extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof DataTypeFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeEditPartCN.java
index 9ad7f4f0317..2ad0562b1a0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeEditPartCN.java
@@ -11,29 +11,38 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -45,12 +54,12 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
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.BorderItemResizableEditPolicy;
-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.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator;
import org.eclipse.swt.graphics.Color;
@@ -90,18 +99,18 @@ public class DataTypeEditPartCN extends ClassifierEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DataTypeItemSemanticEditPolicyCN());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DataTypeCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DataTypeCanonicalEditPolicyCN());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
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());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -116,6 +125,17 @@ public class DataTypeEditPartCN extends ClassifierEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case DataTypeFloatingNameEditPartCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case RedefinableTemplateSignatureEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
@@ -146,6 +166,19 @@ public class DataTypeEditPartCN extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -194,7 +227,7 @@ public class DataTypeEditPartCN extends ClassifierEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -272,8 +305,22 @@ public class DataTypeEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof DataTypeFloatingNameEditPartCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeFloatingNameEditPart.java
new file mode 100644
index 00000000000..cd7f516574d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 DataTypeFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8502;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public DataTypeFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.DataType_2010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeFloatingNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeFloatingNameEditPartCN.java
new file mode 100644
index 00000000000..0a17224271d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeFloatingNameEditPartCN.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 DataTypeFloatingNameEditPartCN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8520;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeFloatingNameEditPartCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public DataTypeFloatingNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.DataType_3027, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeFloatingNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeNameEditPart.java
index e20c761f4db..da332abe661 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeNameEditPart.java
@@ -864,7 +864,7 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeNameEditPartCN.java
index a1fff49efb4..9d08a7456cc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeNameEditPartCN.java
@@ -864,7 +864,7 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeOperationCompartmentEditPart.java
index 31d6c9f5c1a..dc2819d1895 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeOperationCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeOperationCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class DataTypeOperationCompartmentEditPart extends ResizeableListCompartm
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DataTypeOperationCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DataTypeOperationCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeOperationCompartmentEditPartCN.java
index b6b1d86bfe1..8df157c9d03 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeOperationCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DataTypeOperationCompartmentEditPartCN.java
@@ -77,8 +77,8 @@ public class DataTypeOperationCompartmentEditPartCN extends ResizeableListCompar
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DataTypeOperationCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DataTypeOperationCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DefaultNamedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DefaultNamedElementEditPart.java
index 6d1cad990c3..49611483d8b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DefaultNamedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DefaultNamedElementEditPart.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomDefaultNamedElementItemSemanticEditPolicy;
@@ -197,7 +197,7 @@ public class DefaultNamedElementEditPart extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 50);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DefaultNamedElementNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DefaultNamedElementNameEditPart.java
index 3a10c9e75f3..2ea8212960e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DefaultNamedElementNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DefaultNamedElementNameEditPart.java
@@ -864,7 +864,7 @@ public class DefaultNamedElementNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyFloatingNameEditPart.java
new file mode 100644
index 00000000000..81e75ae6aa3
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 DependencyFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8522;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public DependencyFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_2014, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyNameEditPart.java
index af39fdaaf59..d5c22a5bdd9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyNameEditPart.java
@@ -1,821 +1,830 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 DependencyNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6026;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyNameEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public DependencyNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 DependencyNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6026;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyNameEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public DependencyNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyNodeEditPart.java
index 1ef0f138332..728d7778851 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DependencyNodeEditPart.java
@@ -17,6 +17,7 @@ import java.util.List;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.GraphicalEditPart;
@@ -30,23 +31,28 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DependencyNodeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.DependencyNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class DependencyNodeEditPart extends NodeEditPart {
+public class DependencyNodeEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -80,6 +86,7 @@ public class DependencyNodeEditPart extends NodeEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -95,6 +102,7 @@ public class DependencyNodeEditPart extends NodeEditPart {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
case MultiDependencyLabelEditPart.VISUAL_ID:
+ case DependencyFloatingNameEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
@@ -127,11 +135,35 @@ public class DependencyNodeEditPart extends NodeEditPart {
}
/**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
* @generated
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new DependencyNodeFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -140,8 +172,8 @@ public class DependencyNodeEditPart extends NodeEditPart {
* @generated
*/
@Override
- public DependencyNodeFigure getPrimaryShape() {
- return (DependencyNodeFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -153,6 +185,9 @@ public class DependencyNodeEditPart extends NodeEditPart {
BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
locator.setBorderItemOffset(new Dimension(-20, -20));
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else if (borderItemEditPart instanceof DependencyFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else
{
super.addBorderItem(borderItemContainer, borderItemEditPart);
@@ -164,7 +199,7 @@ public class DependencyNodeEditPart extends NodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(10, 10);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(10, 10);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DiagramNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DiagramNameEditPart.java
index 5fbe9754048..ec5ac1ea23e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DiagramNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DiagramNameEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
@@ -144,6 +145,7 @@ public class DiagramNameEditPart extends AbstractShortcutDiagramNameEditPart imp
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationEditPart.java
index 75a3108d775..5943ae3adc0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationEditPart.java
@@ -29,30 +29,31 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AbstractObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.figure.DurationObservationNodeFigure;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ObservationLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomDurationObservationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.DurationObservationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class DurationObservationEditPart extends AbstractObservationEditPart {
+public class DurationObservationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -86,9 +87,9 @@ public class DurationObservationEditPart extends AbstractObservationEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, new ObservationLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDurationObservationItemSemanticEditPolicy());
installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -103,7 +104,7 @@ public class DurationObservationEditPart extends AbstractObservationEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case DurationObservationNameEditPart.VISUAL_ID:
+ case DurationObservationFloatingNameEditPart.VISUAL_ID:
case DurationObservationStereotypeLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -165,7 +166,7 @@ public class DurationObservationEditPart extends AbstractObservationEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new DurationObservationNodeFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -174,8 +175,8 @@ public class DurationObservationEditPart extends AbstractObservationEditPart {
* @generated
*/
@Override
- public DurationObservationNodeFigure getPrimaryShape() {
- return (DurationObservationNodeFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -183,8 +184,8 @@ public class DurationObservationEditPart extends AbstractObservationEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof DurationObservationNameEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ if (borderItemEditPart instanceof DurationObservationFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof DurationObservationStereotypeLabelEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -200,7 +201,7 @@ public class DurationObservationEditPart extends AbstractObservationEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
@@ -275,6 +276,6 @@ public class DurationObservationEditPart extends AbstractObservationEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(DurationObservationNameEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(DurationObservationFloatingNameEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationFloatingNameEditPart.java
new file mode 100644
index 00000000000..572f99e4ccd
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 DurationObservationFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5155;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DurationObservationFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public DurationObservationFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.DurationObservation_2095, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DurationObservationFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationStereotypeLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationStereotypeLabelEditPart.java
index 44a11cc2053..c6ef19c1333 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationStereotypeLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/DurationObservationStereotypeLabelEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
@@ -148,6 +149,7 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ElementImportAliasEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ElementImportAliasEditPart.java
index 4821c3b7021..d9f7c45b8b9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ElementImportAliasEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ElementImportAliasEditPart.java
@@ -1,821 +1,830 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 ElementImportAliasEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6020;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ElementImportAliasEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public ElementImportAliasEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.ElementImport_4009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ElementImportAliasEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 ElementImportAliasEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6020;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ElementImportAliasEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public ElementImportAliasEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.ElementImport_4009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ElementImportAliasEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEditPart.java
index 21f5ddd94fa..9e252943f56 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEditPart.java
@@ -11,25 +11,36 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomEnumerationItemSemanticEditPolicy;
@@ -44,6 +55,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayE
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
/**
@@ -88,6 +100,7 @@ public class EnumerationEditPart extends ClassifierEditPart {
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -100,6 +113,20 @@ public class EnumerationEditPart extends ClassifierEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case EnumerationFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -127,6 +154,19 @@ public class EnumerationEditPart extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -214,6 +254,9 @@ public class EnumerationEditPart extends ClassifierEditPart {
if (editPart instanceof EnumerationEnumerationLiteralCompartmentEditPart) {
return getPrimaryShape().getEnumerationLiteralCompartmentFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -221,8 +264,22 @@ public class EnumerationEditPart extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof EnumerationFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
@@ -235,7 +292,7 @@ public class EnumerationEditPart extends ClassifierEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEditPartCN.java
index 7bc049562a2..0230c181945 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEditPartCN.java
@@ -11,25 +11,36 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomEnumerationItemSemanticEditPolicyCN;
@@ -44,6 +55,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayE
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
/**
@@ -88,6 +100,7 @@ public class EnumerationEditPartCN extends ClassifierEditPart {
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -100,6 +113,20 @@ public class EnumerationEditPartCN extends ClassifierEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case EnumerationFloatingNameEditPartCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -127,6 +154,19 @@ public class EnumerationEditPartCN extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -214,6 +254,9 @@ public class EnumerationEditPartCN extends ClassifierEditPart {
if (editPart instanceof EnumerationEnumerationLiteralCompartmentEditPartCN) {
return getPrimaryShape().getEnumerationLiteralCompartmentFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -221,8 +264,22 @@ public class EnumerationEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof EnumerationFloatingNameEditPartCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
@@ -235,7 +292,7 @@ public class EnumerationEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java
index 121ecf429a8..7166cac5170 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class EnumerationEnumerationLiteralCompartmentEditPart extends ListCompar
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.EnumerationEnumerationLiteralCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.EnumerationEnumerationLiteralCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java
index ae2a2a11f91..4b75e7a12a4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java
@@ -77,8 +77,8 @@ public class EnumerationEnumerationLiteralCompartmentEditPartCN extends ListComp
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.EnumerationEnumerationLiteralCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.EnumerationEnumerationLiteralCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationFloatingNameEditPart.java
new file mode 100644
index 00000000000..abbc2a0a50b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 EnumerationFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8508;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public EnumerationFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Enumeration_2006, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationFloatingNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationFloatingNameEditPartCN.java
new file mode 100644
index 00000000000..67a18288701
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationFloatingNameEditPartCN.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 EnumerationFloatingNameEditPartCN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8516;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationFloatingNameEditPartCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public EnumerationFloatingNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Enumeration_3025, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationFloatingNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationNameEditPart.java
index f41b5784265..bd34af1a0a3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationNameEditPart.java
@@ -864,7 +864,7 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationNameEditPartCN.java
index ac8c7211746..f75cee506e7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/EnumerationNameEditPartCN.java
@@ -864,7 +864,7 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowAppliedStereotypeEditPart.java
index afe2308c907..0c11376fd20 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowAppliedStereotypeEditPart.java
@@ -1,815 +1,824 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.NoSemanticParserEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6041;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationFlowAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 15));
- }
-
- /**
- * @generated
- */
- public InformationFlowAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NoSemanticParserEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.InformationFlow_4026, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationFlowAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.NoSemanticParserEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6041;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationFlowAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 15));
+ }
+
+ /**
+ * @generated
+ */
+ public InformationFlowAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NoSemanticParserEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.InformationFlow_4026, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationFlowAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowConveyedLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowConveyedLabelEditPart.java
index cae27cf13bf..22507bd039e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowConveyedLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationFlowConveyedLabelEditPart.java
@@ -1,823 +1,832 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InformationFlowCustomLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6040;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationFlowConveyedLabelEditPart.VISUAL_ID), new Point(0, 30));
- }
-
- /**
- * @generated
- */
- public InformationFlowConveyedLabelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new InformationFlowCustomLabelEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.InformationFlow_4026, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationFlowConveyedLabelEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InformationFlowCustomLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6040;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationFlowConveyedLabelEditPart.VISUAL_ID), new Point(0, 30));
+ }
+
+ /**
+ * @generated
+ */
+ public InformationFlowConveyedLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new InformationFlowCustomLabelEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.InformationFlow_4026, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationFlowConveyedLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemEditPart.java
index b3b66de8199..de2243cb21a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemEditPart.java
@@ -11,24 +11,35 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.figure.InformationItemFigure;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.figure.nodes.InformationItemFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInformationItemItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InformationItemItemSemanticEditPolicy;
@@ -37,6 +48,7 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
/**
@@ -78,6 +90,7 @@ public class InformationItemEditPart extends ClassifierEditPart {
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomInformationItemItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -90,6 +103,20 @@ public class InformationItemEditPart extends ClassifierEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case InformationItemFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -117,6 +144,19 @@ public class InformationItemEditPart extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -189,6 +229,9 @@ public class InformationItemEditPart extends ClassifierEditPart {
*/
@Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -196,8 +239,22 @@ public class InformationItemEditPart extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof InformationItemFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
@@ -210,7 +267,7 @@ public class InformationItemEditPart extends ClassifierEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemEditPartCN.java
index 06085ad198f..b51d867b897 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemEditPartCN.java
@@ -11,24 +11,35 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.figure.InformationItemFigure;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.figure.nodes.InformationItemFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInformationItemItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InformationItemItemSemanticEditPolicyCN;
@@ -37,6 +48,7 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
/**
@@ -78,6 +90,7 @@ public class InformationItemEditPartCN extends ClassifierEditPart {
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomInformationItemItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -90,6 +103,20 @@ public class InformationItemEditPartCN extends ClassifierEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case InformationItemFloatingNameEditPartCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -117,6 +144,19 @@ public class InformationItemEditPartCN extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -189,6 +229,9 @@ public class InformationItemEditPartCN extends ClassifierEditPart {
*/
@Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -196,8 +239,22 @@ public class InformationItemEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof InformationItemFloatingNameEditPartCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
@@ -210,7 +267,7 @@ public class InformationItemEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemFloatingNameEditPart.java
new file mode 100644
index 00000000000..9b30409a876
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 InformationItemFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8512;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public InformationItemFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.InformationItem_2099, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemFloatingNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemFloatingNameEditPartCN.java
new file mode 100644
index 00000000000..c48f840f3b4
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemFloatingNameEditPartCN.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 InformationItemFloatingNameEditPartCN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8517;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemFloatingNameEditPartCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public InformationItemFloatingNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.InformationItem_3040, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationItemFloatingNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemNameEditPart.java
index fb9705144cc..88ef6e178d5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemNameEditPart.java
@@ -864,7 +864,7 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemNameEditPartCN.java
index 2ed6ec1694d..0b20242a1ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InformationItemNameEditPartCN.java
@@ -864,7 +864,7 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationEditPart.java
index c2de4a8f105..6e4eea35741 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationEditPart.java
@@ -11,31 +11,42 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInstanceSpecificationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InstanceSpecificationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
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.PapyrusCreationEditPolicy;
@@ -43,12 +54,13 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayE
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.InstanceSpecificationFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class InstanceSpecificationEditPart extends NamedElementEditPart {
+public class InstanceSpecificationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -86,6 +98,7 @@ public class InstanceSpecificationEditPart extends NamedElementEditPart {
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomInstanceSpecificationItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -98,6 +111,20 @@ public class InstanceSpecificationEditPart extends NamedElementEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case InstanceSpecificationFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -125,6 +152,19 @@ public class InstanceSpecificationEditPart extends NamedElementEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -212,6 +252,9 @@ public class InstanceSpecificationEditPart extends NamedElementEditPart {
if (editPart instanceof InstanceSpecificationSlotCompartmentEditPart) {
return getPrimaryShape().getSlotCompartmentFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -219,8 +262,22 @@ public class InstanceSpecificationEditPart extends NamedElementEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof InstanceSpecificationFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
@@ -233,7 +290,7 @@ public class InstanceSpecificationEditPart extends NamedElementEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationEditPartCN.java
index f24f8deb579..eab169713a3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationEditPartCN.java
@@ -11,25 +11,36 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInstanceSpecificationItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InstanceSpecificationItemSemanticEditPolicyCN;
@@ -43,6 +54,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayE
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.InstanceSpecificationFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
/**
@@ -86,6 +98,7 @@ public class InstanceSpecificationEditPartCN extends NamedElementEditPart {
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomInstanceSpecificationItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -98,6 +111,20 @@ public class InstanceSpecificationEditPartCN extends NamedElementEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case InstanceSpecificationFloatingNameEditPartCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -125,6 +152,19 @@ public class InstanceSpecificationEditPartCN extends NamedElementEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -212,6 +252,9 @@ public class InstanceSpecificationEditPartCN extends NamedElementEditPart {
if (editPart instanceof InstanceSpecificationSlotCompartmentEditPartCN) {
return getPrimaryShape().getSlotCompartmentFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -219,8 +262,22 @@ public class InstanceSpecificationEditPartCN extends NamedElementEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof InstanceSpecificationFloatingNameEditPartCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
@@ -233,7 +290,7 @@ public class InstanceSpecificationEditPartCN extends NamedElementEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationFloatingNameEditPart.java
new file mode 100644
index 00000000000..183446ba7ed
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 InstanceSpecificationFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8505;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public InstanceSpecificationFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.InstanceSpecification_2001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationFloatingNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationFloatingNameEditPartCN.java
new file mode 100644
index 00000000000..73cffb74e2d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationFloatingNameEditPartCN.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 InstanceSpecificationFloatingNameEditPartCN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8509;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationFloatingNameEditPartCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public InstanceSpecificationFloatingNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.InstanceSpecification_3020, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationFloatingNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationNameEditPart.java
index 699e5bbb438..ce1a5a39ad5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationNameEditPart.java
@@ -866,7 +866,7 @@ public class InstanceSpecificationNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationNameEditPartCN.java
index 721785e8b66..2d2bf495865 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationNameEditPartCN.java
@@ -849,7 +849,7 @@ public class InstanceSpecificationNameEditPartCN extends PapyrusCompartmentEditP
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPart.java
index 944499f4061..eee6676149d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class InstanceSpecificationSlotCompartmentEditPart extends ListCompartmen
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InstanceSpecificationSlotCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InstanceSpecificationSlotCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPartCN.java
index 79c4f7b0c47..003a744a452 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPartCN.java
@@ -77,8 +77,8 @@ public class InstanceSpecificationSlotCompartmentEditPartCN extends ListCompartm
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InstanceSpecificationSlotCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InstanceSpecificationSlotCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceAttributeCompartmentEditPart.java
index f11999bbb9c..4bdef1a60ad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceAttributeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceAttributeCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class InterfaceAttributeCompartmentEditPart extends ResizeableListCompart
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceAttributeCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceAttributeCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceAttributeCompartmentEditPartCN.java
index c58b5a67061..74e584d6ce9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceAttributeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceAttributeCompartmentEditPartCN.java
@@ -77,8 +77,8 @@ public class InterfaceAttributeCompartmentEditPartCN extends ResizeableListCompa
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceAttributeCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceAttributeCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceEditPart.java
index def7a27a6ba..909222ececc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceEditPart.java
@@ -11,29 +11,38 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInterfaceItemSemanticEditPolicy;
@@ -49,6 +58,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayE
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.InterfaceFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator;
import org.eclipse.swt.graphics.Color;
@@ -88,8 +98,8 @@ public class InterfaceEditPart extends ClassifierEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterfaceItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceCanonicalEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
@@ -98,6 +108,7 @@ public class InterfaceEditPart extends ClassifierEditPart {
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -112,6 +123,17 @@ public class InterfaceEditPart extends ClassifierEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case InterfaceFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case RedefinableTemplateSignatureEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
@@ -142,6 +164,19 @@ public class InterfaceEditPart extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -197,7 +232,7 @@ public class InterfaceEditPart extends ClassifierEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -283,8 +318,22 @@ public class InterfaceEditPart extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof InterfaceFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceEditPartCN.java
index ade3052c2dc..65495ba5486 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceEditPartCN.java
@@ -11,29 +11,38 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomInterfaceItemSemanticEditPolicyCN;
@@ -50,6 +59,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayE
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.InterfaceFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator;
import org.eclipse.swt.graphics.Color;
@@ -89,8 +99,8 @@ public class InterfaceEditPartCN extends ClassifierEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InterfaceItemSemanticEditPolicyCN());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceCanonicalEditPolicyCN());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
@@ -100,6 +110,7 @@ public class InterfaceEditPartCN extends ClassifierEditPart {
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -114,6 +125,17 @@ public class InterfaceEditPartCN extends ClassifierEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case InterfaceFloatingNameEditPartCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case RedefinableTemplateSignatureEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
@@ -144,6 +166,19 @@ public class InterfaceEditPartCN extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -199,7 +234,7 @@ public class InterfaceEditPartCN extends ClassifierEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -285,8 +320,22 @@ public class InterfaceEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof InterfaceFloatingNameEditPartCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceFloatingNameEditPart.java
new file mode 100644
index 00000000000..0cbd6128882
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 InterfaceFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8507;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public InterfaceFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Interface_2004, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceFloatingNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceFloatingNameEditPartCN.java
new file mode 100644
index 00000000000..6794477aad0
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceFloatingNameEditPartCN.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 InterfaceFloatingNameEditPartCN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8515;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceFloatingNameEditPartCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public InterfaceFloatingNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Interface_3023, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceFloatingNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNameEditPart.java
index 2f429a8efe6..00539d8acfb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNameEditPart.java
@@ -864,7 +864,7 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNameEditPartCN.java
index 7559708f783..49132e6950d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNameEditPartCN.java
@@ -864,7 +864,7 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNestedClassifierCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNestedClassifierCompartmentEditPart.java
index e4ac168aca0..e3de7485b09 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNestedClassifierCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNestedClassifierCompartmentEditPart.java
@@ -78,8 +78,8 @@ public class InterfaceNestedClassifierCompartmentEditPart extends ResizeableList
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceNestedClassifierCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceNestedClassifierCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNestedClassifierCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNestedClassifierCompartmentEditPartCN.java
index d9d12987061..912cded667e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNestedClassifierCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceNestedClassifierCompartmentEditPartCN.java
@@ -78,8 +78,8 @@ public class InterfaceNestedClassifierCompartmentEditPartCN extends ResizeableLi
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceNestedClassifierCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceNestedClassifierCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceOperationCompartmentEditPart.java
index 5d0c4c3dfc4..6af3ad8981a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceOperationCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceOperationCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class InterfaceOperationCompartmentEditPart extends ResizeableListCompart
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceOperationCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceOperationCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceOperationCompartmentEditPartCN.java
index 45819353ce8..e5d4acddefe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceOperationCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceOperationCompartmentEditPartCN.java
@@ -77,8 +77,8 @@ public class InterfaceOperationCompartmentEditPartCN extends ResizeableListCompa
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceOperationCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InterfaceOperationCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceRealizationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceRealizationNameEditPart.java
index a526b819c1a..8dfef71b169 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceRealizationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InterfaceRealizationNameEditPart.java
@@ -1,821 +1,830 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 InterfaceRealizationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6009;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceRealizationNameEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public InterfaceRealizationNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.InterfaceRealization_4003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceRealizationNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 InterfaceRealizationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6009;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceRealizationNameEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public InterfaceRealizationNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.InterfaceRealization_4003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceRealizationNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPart.java
index 5695ad22a1b..0d96a8056a9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPart.java
@@ -55,8 +55,8 @@ public class ModelEditPart extends PapyrusDiagramEditPart {
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelItemSemanticEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPartCN.java
index 367c0e9a87d..c929eef054d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPartCN.java
@@ -27,10 +27,10 @@ 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.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -85,8 +85,8 @@ public class ModelEditPartCN extends NamedElementEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelItemSemanticEditPolicyCN());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelCanonicalEditPolicyCN());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
@@ -182,7 +182,7 @@ public class ModelEditPartCN extends NamedElementEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -192,7 +192,7 @@ public class ModelEditPartCN extends NamedElementEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof TemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((TemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -267,7 +267,7 @@ public class ModelEditPartCN extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(200, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPartTN.java
index e90d305e99e..3235769dcda 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelEditPartTN.java
@@ -27,10 +27,10 @@ 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.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -85,8 +85,8 @@ public class ModelEditPartTN extends NamedElementEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelItemSemanticEditPolicyTN());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelCanonicalEditPolicyTN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelCanonicalEditPolicyTN());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
@@ -182,7 +182,7 @@ public class ModelEditPartTN extends NamedElementEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -192,7 +192,7 @@ public class ModelEditPartTN extends NamedElementEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof TemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((TemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -267,7 +267,7 @@ public class ModelEditPartTN extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(200, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelNameEditPartCN.java
index b847661477d..9296dc35644 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelNameEditPartCN.java
@@ -864,7 +864,7 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelNameEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelNameEditPartTN.java
index e40e290fb1d..25fcc008c41 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelNameEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelNameEditPartTN.java
@@ -864,7 +864,7 @@ public class ModelNameEditPartTN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelPackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
index 7975bc7c5a3..dab50a4c8b5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
@@ -69,8 +69,8 @@ public class ModelPackageableElementCompartmentEditPartCN extends AbstractPackag
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelPackageableElementCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelPackageableElementCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelPackageableElementCompartmentEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelPackageableElementCompartmentEditPartTN.java
index 2817f8c83be..65b241dd453 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelPackageableElementCompartmentEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ModelPackageableElementCompartmentEditPartTN.java
@@ -69,8 +69,8 @@ public class ModelPackageableElementCompartmentEditPartTN extends AbstractPackag
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelPackageableElementCompartmentCanonicalEditPolicyTN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelPackageableElementCompartmentCanonicalEditPolicyTN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/MultiDependencyLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/MultiDependencyLabelEditPart.java
index aae2e9d2618..ee6e6c78ef1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/MultiDependencyLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/MultiDependencyLabelEditPart.java
@@ -1,850 +1,852 @@
-/**
- * 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.clazz.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.draw2d.geometry.Rectangle;
-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.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 MultiDependencyLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 1;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.MultiDependencyLabelEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public MultiDependencyLabelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public void refreshBounds() {
- int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_2014, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.MultiDependencyLabelEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new WrappingLabel();
- }
-}
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 MultiDependencyLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 1;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.MultiDependencyLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public MultiDependencyLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_2014, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.MultiDependencyLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new WrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageEditPart.java
index 9ad972bed49..3e3cf9ad4e7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageEditPart.java
@@ -27,10 +27,10 @@ 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.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -86,8 +86,8 @@ public class PackageEditPart extends NamedElementEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PackageCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PackageCanonicalEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
@@ -184,7 +184,7 @@ public class PackageEditPart extends NamedElementEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -194,7 +194,7 @@ public class PackageEditPart extends NamedElementEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof TemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((TemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -269,7 +269,7 @@ public class PackageEditPart extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(200, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageEditPartCN.java
index 0a50308abb9..372758762c5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageEditPartCN.java
@@ -27,10 +27,10 @@ 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.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -84,8 +84,8 @@ public class PackageEditPartCN extends NamedElementEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageItemSemanticEditPolicyCN());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PackageCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PackageCanonicalEditPolicyCN());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
@@ -180,7 +180,7 @@ public class PackageEditPartCN extends NamedElementEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -190,7 +190,7 @@ public class PackageEditPartCN extends NamedElementEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof TemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((TemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -265,7 +265,7 @@ public class PackageEditPartCN extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(200, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageNameEditPart.java
index 9b7100bffa6..0382c4f65e7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageNameEditPart.java
@@ -864,7 +864,7 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageNameEditPartCN.java
index d2c959bdb62..c674761060e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackageNameEditPartCN.java
@@ -864,7 +864,7 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackagePackageableElementCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackagePackageableElementCompartmentEditPart.java
index 34c85af854f..ad518875302 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackagePackageableElementCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackagePackageableElementCompartmentEditPart.java
@@ -69,8 +69,8 @@ public class PackagePackageableElementCompartmentEditPart extends AbstractPackag
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackagePackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
index 23fb018d124..62b52c0bdeb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
@@ -69,8 +69,8 @@ public class PackagePackageableElementCompartmentEditPartCN extends AbstractPack
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeAttributeCompartmentEditPart.java
index c32821cde95..59455ce4252 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeAttributeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeAttributeCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class PrimitiveTypeAttributeCompartmentEditPart extends ResizeableListCom
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PrimitiveTypeAttributeCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PrimitiveTypeAttributeCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeAttributeCompartmentEditPartCN.java
index 2eaf9085f29..7bf6b5fcb83 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeAttributeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeAttributeCompartmentEditPartCN.java
@@ -77,8 +77,8 @@ public class PrimitiveTypeAttributeCompartmentEditPartCN extends ResizeableListC
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PrimitiveTypeAttributeCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PrimitiveTypeAttributeCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPart.java
index 1b15ae701e2..5626b842a28 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPart.java
@@ -11,25 +11,36 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -41,12 +52,12 @@ import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
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.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
/**
@@ -85,7 +96,6 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PrimitiveTypeItemSemanticEditPolicy());
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());
@@ -94,6 +104,7 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -106,6 +117,20 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case PrimitiveTypeFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -133,6 +158,19 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -235,6 +273,9 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
if (editPart instanceof PrimitiveTypeOperationCompartmentEditPart) {
return getPrimaryShape().getOperationCompartmentFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -242,8 +283,22 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof PrimitiveTypeFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 50);
return result;
}
@@ -256,7 +311,7 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPartCN.java
index 997f5f81672..12df62cab77 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeEditPartCN.java
@@ -11,25 +11,36 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -46,6 +57,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayE
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
/**
@@ -92,6 +104,7 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart {
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -104,6 +117,20 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case PrimitiveTypeFloatingNameEditPartCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -131,6 +158,19 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -233,6 +273,9 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart {
if (editPart instanceof PrimitiveTypeOperationCompartmentEditPartCN) {
return getPrimaryShape().getOperationCompartmentFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -240,8 +283,22 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof PrimitiveTypeFloatingNameEditPartCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 50);
return result;
}
@@ -254,7 +311,7 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeFloatingNameEditPart.java
new file mode 100644
index 00000000000..ad1d2543542
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 PrimitiveTypeFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8511;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.PrimitiveType_2009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeFloatingNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeFloatingNameEditPartCN.java
new file mode 100644
index 00000000000..4714f1d9a8d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeFloatingNameEditPartCN.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 PrimitiveTypeFloatingNameEditPartCN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8519;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeFloatingNameEditPartCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public PrimitiveTypeFloatingNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.PrimitiveType_3026, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeFloatingNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeNameEditPart.java
index 062dbe279e3..d60ab7f2139 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeNameEditPart.java
@@ -864,7 +864,7 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeNameEditPartCN.java
index bd9cafa0976..45af4767156 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeNameEditPartCN.java
@@ -864,7 +864,7 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeOperationCompartmentEditPart.java
index c1c6bb400b8..739ae9a6cc5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeOperationCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeOperationCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class PrimitiveTypeOperationCompartmentEditPart extends ResizeableListCom
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PrimitiveTypeOperationCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PrimitiveTypeOperationCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeOperationCompartmentEditPartCN.java
index e7826641a4c..d3f6b74c284 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeOperationCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/PrimitiveTypeOperationCompartmentEditPartCN.java
@@ -77,8 +77,8 @@ public class PrimitiveTypeOperationCompartmentEditPartCN extends ResizeableListC
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PrimitiveTypeOperationCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.PrimitiveTypeOperationCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RealizationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RealizationNameEditPart.java
index 71892ba2799..489cf9a1337 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RealizationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RealizationNameEditPart.java
@@ -1,821 +1,830 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 RealizationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6013;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.RealizationNameEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public RealizationNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Realization_4005, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.RealizationNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 RealizationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6013;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.RealizationNameEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public RealizationNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Realization_4005, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.RealizationNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RedefinableTemplateSignatureEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RedefinableTemplateSignatureEditPart.java
index d650d05fe1a..62fc32b17ab 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RedefinableTemplateSignatureEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RedefinableTemplateSignatureEditPart.java
@@ -27,10 +27,10 @@ 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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AbstractRedefinableTemplateSignatureEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -204,7 +204,7 @@ public class RedefinableTemplateSignatureEditPart extends AbstractRedefinableTem
* @generated
*/
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RedefinableTemplateSignatureTemplateParameterCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RedefinableTemplateSignatureTemplateParameterCompartmentEditPart.java
index 1ee557bdfbf..8c78252cd4f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RedefinableTemplateSignatureTemplateParameterCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/RedefinableTemplateSignatureTemplateParameterCompartmentEditPart.java
@@ -75,8 +75,8 @@ public class RedefinableTemplateSignatureTemplateParameterCompartmentEditPart ex
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.RedefinableTemplateSignatureTemplateParameterCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.RedefinableTemplateSignatureTemplateParameterCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ShortCutDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ShortCutDiagramEditPart.java
index bff007f4cf3..691243b88ff 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ShortCutDiagramEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/ShortCutDiagramEditPart.java
@@ -31,12 +31,12 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomShortcutDiagramItemSemanticEditPolicy;
@@ -193,7 +193,7 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(20, 20);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalAttributeCompartmentEditPart.java
index 665427251b5..be24387ac25 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalAttributeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalAttributeCompartmentEditPart.java
@@ -77,8 +77,8 @@ public class SignalAttributeCompartmentEditPart extends ListCompartmentEditPart
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.SignalAttributeCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.SignalAttributeCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalAttributeCompartmentEditPartCN.java
index ceb6b962125..c5c0baeb1a7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalAttributeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalAttributeCompartmentEditPartCN.java
@@ -77,8 +77,8 @@ public class SignalAttributeCompartmentEditPartCN extends ResizeableListCompartm
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.SignalAttributeCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.SignalAttributeCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalEditPart.java
index 9819ebc5234..b81f137744c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalEditPart.java
@@ -11,29 +11,38 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -45,12 +54,12 @@ import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
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.BorderItemResizableEditPolicy;
-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.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.SignalFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator;
import org.eclipse.swt.graphics.Color;
@@ -90,18 +99,18 @@ public class SignalEditPart extends ClassifierEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SignalItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.SignalCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.SignalCanonicalEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomSignalItemSemanticEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -116,6 +125,17 @@ public class SignalEditPart extends ClassifierEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case SignalFloatingNameEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case RedefinableTemplateSignatureEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
@@ -146,6 +166,19 @@ public class SignalEditPart extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -187,7 +220,7 @@ public class SignalEditPart extends ClassifierEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -257,8 +290,22 @@ public class SignalEditPart extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof SignalFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalEditPartCN.java
index 3e42a44f94c..e756b17678f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalEditPartCN.java
@@ -11,29 +11,38 @@
*/
package org.eclipse.papyrus.uml.diagram.clazz.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
@@ -51,6 +60,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayE
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.SignalFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.common.locator.TemplateBorderItemLocator;
import org.eclipse.swt.graphics.Color;
@@ -90,8 +100,8 @@ public class SignalEditPartCN extends ClassifierEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SignalItemSemanticEditPolicyCN());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.SignalCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.SignalCanonicalEditPolicyCN());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
@@ -102,6 +112,7 @@ public class SignalEditPartCN extends ClassifierEditPart {
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -116,6 +127,17 @@ public class SignalEditPartCN extends ClassifierEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case SignalFloatingNameEditPartCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case RedefinableTemplateSignatureEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
@@ -146,6 +168,19 @@ public class SignalEditPartCN extends ClassifierEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -187,7 +222,7 @@ public class SignalEditPartCN extends ClassifierEditPart {
- //Papyrus Gencode :precise the locator for a template signature
+ // Papyrus Gencode :precise the locator for a template signature
if (childEditPart instanceof RedefinableTemplateSignatureEditPart) {
IBorderItemLocator locator = new TemplateBorderItemLocator(getMainFigure(), PositionConstants.EAST);
getBorderedFigure().getBorderItemContainer().add(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure(), locator);
@@ -257,8 +292,22 @@ public class SignalEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof SignalFloatingNameEditPartCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalFloatingNameEditPart.java
new file mode 100644
index 00000000000..5e8fe30f6a2
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 SignalFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8506;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public SignalFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Signal_2003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalFloatingNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalFloatingNameEditPartCN.java
new file mode 100644
index 00000000000..4bd83f65235
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalFloatingNameEditPartCN.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 SignalFloatingNameEditPartCN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8514;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalFloatingNameEditPartCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public SignalFloatingNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Signal_3022, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalFloatingNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalNameEditPart.java
index ac654c4941d..aadf206f2fc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalNameEditPart.java
@@ -864,7 +864,7 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalNameEditPartCN.java
index 975dfc6b5b4..7ab63b9627f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SignalNameEditPartCN.java
@@ -864,7 +864,7 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SourceISLinkLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SourceISLinkLabelEditPart.java
index 6b161677678..193091f1bdc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SourceISLinkLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SourceISLinkLabelEditPart.java
@@ -1,816 +1,825 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ISRoleSourceDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InstanceSpecificationRoleDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 SourceISLinkLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6039;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SourceISLinkLabelEditPart.VISUAL_ID), new Point(0, 20));
- }
-
- /**
- * @generated
- */
- public SourceISLinkLabelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(InstanceSpecificationRoleDisplayEditPolicy.INSTANCE_SPECIFICATION_ROLE_DISPLAY, new ISRoleSourceDisplayEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.SOURCE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.InstanceSpecification_4021, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SourceISLinkLabelEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ISRoleSourceDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InstanceSpecificationRoleDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 SourceISLinkLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6039;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SourceISLinkLabelEditPart.VISUAL_ID), new Point(0, 20));
+ }
+
+ /**
+ * @generated
+ */
+ public SourceISLinkLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(InstanceSpecificationRoleDisplayEditPolicy.INSTANCE_SPECIFICATION_ROLE_DISPLAY, new ISRoleSourceDisplayEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.SOURCE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.InstanceSpecification_4021, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SourceISLinkLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SubstitutionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SubstitutionNameEditPart.java
index d274bab7ec0..a5e1e699690 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SubstitutionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/SubstitutionNameEditPart.java
@@ -1,821 +1,830 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 SubstitutionNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6011;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SubstitutionNameEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public SubstitutionNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Substitution_4004, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SubstitutionNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 SubstitutionNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6011;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SubstitutionNameEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public SubstitutionNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Substitution_4004, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SubstitutionNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TargetISLinkLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TargetISLinkLabelEditPart.java
index d8af341f780..3e33783ccd3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TargetISLinkLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TargetISLinkLabelEditPart.java
@@ -1,816 +1,825 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ISRoleTargetDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InstanceSpecificationRoleDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 TargetISLinkLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6038;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TargetISLinkLabelEditPart.VISUAL_ID), new Point(0, 20));
- }
-
- /**
- * @generated
- */
- public TargetISLinkLabelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(InstanceSpecificationRoleDisplayEditPolicy.INSTANCE_SPECIFICATION_ROLE_DISPLAY, new ISRoleTargetDisplayEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.TARGET;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.InstanceSpecification_4021, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TargetISLinkLabelEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ISRoleTargetDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.InstanceSpecificationRoleDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 TargetISLinkLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6038;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TargetISLinkLabelEditPart.VISUAL_ID), new Point(0, 20));
+ }
+
+ /**
+ * @generated
+ */
+ public TargetISLinkLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(InstanceSpecificationRoleDisplayEditPolicy.INSTANCE_SPECIFICATION_ROLE_DISPLAY, new ISRoleTargetDisplayEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.TARGET;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.InstanceSpecification_4021, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TargetISLinkLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TemplateSignatureEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TemplateSignatureEditPart.java
index a2a7155cc4f..57872006e59 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TemplateSignatureEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TemplateSignatureEditPart.java
@@ -27,10 +27,10 @@ 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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TemplateFigure;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomRedefinableTemplateSignatureItemSemanticEditPolicy;
@@ -192,7 +192,7 @@ public class TemplateSignatureEditPart extends AbstractBorderItemEditPart {
* @generated
*/
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TemplateSignatureTemplateParameterCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TemplateSignatureTemplateParameterCompartmentEditPart.java
index f30b1ce9e40..749aa638539 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TemplateSignatureTemplateParameterCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TemplateSignatureTemplateParameterCompartmentEditPart.java
@@ -75,8 +75,8 @@ public class TemplateSignatureTemplateParameterCompartmentEditPart extends ListC
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.TemplateSignatureTemplateParameterCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.TemplateSignatureTemplateParameterCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationEditPart.java
index d540333669d..e4543907fc3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationEditPart.java
@@ -29,30 +29,31 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.AbstractObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.figure.TimeObservationNodeFigure;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ObservationLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic.CustomTimeObservationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.TimeObservationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class TimeObservationEditPart extends AbstractObservationEditPart {
+public class TimeObservationEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -86,9 +87,9 @@ public class TimeObservationEditPart extends AbstractObservationEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, new ObservationLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomTimeObservationItemSemanticEditPolicy());
installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -103,7 +104,7 @@ public class TimeObservationEditPart extends AbstractObservationEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case TimeObservationNameEditPart.VISUAL_ID:
+ case TimeObservationFloatingNameEditPart.VISUAL_ID:
case TimeObservationStereotypeLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -165,7 +166,7 @@ public class TimeObservationEditPart extends AbstractObservationEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new TimeObservationNodeFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -174,8 +175,8 @@ public class TimeObservationEditPart extends AbstractObservationEditPart {
* @generated
*/
@Override
- public TimeObservationNodeFigure getPrimaryShape() {
- return (TimeObservationNodeFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -183,8 +184,8 @@ public class TimeObservationEditPart extends AbstractObservationEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof TimeObservationNameEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ if (borderItemEditPart instanceof TimeObservationFloatingNameEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof TimeObservationStereotypeLabelEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -200,7 +201,7 @@ public class TimeObservationEditPart extends AbstractObservationEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
@@ -275,6 +276,6 @@ public class TimeObservationEditPart extends AbstractObservationEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeObservationNameEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(TimeObservationFloatingNameEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationFloatingNameEditPart.java
new file mode 100644
index 00000000000..0849327d9c2
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationFloatingNameEditPart.java
@@ -0,0 +1,862 @@
+/**
+ * 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.clazz.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+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 TimeObservationFloatingNameEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5153;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TimeObservationFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public TimeObservationFloatingNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.TimeObservation_2096, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.TimeObservationFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationStereotypeLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationStereotypeLabelEditPart.java
index b424ee02de6..12ddaa0f955 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationStereotypeLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/TimeObservationStereotypeLabelEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
@@ -148,6 +149,7 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UMLEditPartFactory.java
index 6804657b099..d6a3176c86c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UMLEditPartFactory.java
@@ -48,39 +48,60 @@ public class UMLEditPartFactory implements EditPartFactory {
case MultiDependencyLabelEditPart.VISUAL_ID:
return new MultiDependencyLabelEditPart(view);
+ case DependencyFloatingNameEditPart.VISUAL_ID:
+ return new DependencyFloatingNameEditPart(view);
+
case AssociationClassEditPart.VISUAL_ID:
return new AssociationClassEditPart(view);
case AssociationClassNameEditPart.VISUAL_ID:
return new AssociationClassNameEditPart(view);
+ case AssociationClassFloatingNameEditPart.VISUAL_ID:
+ return new AssociationClassFloatingNameEditPart(view);
+
case AssociationNodeEditPart.VISUAL_ID:
return new AssociationNodeEditPart(view);
+ case AssociationFloatingNameEditPart.VISUAL_ID:
+ return new AssociationFloatingNameEditPart(view);
+
case InstanceSpecificationEditPart.VISUAL_ID:
return new InstanceSpecificationEditPart(view);
case InstanceSpecificationNameEditPart.VISUAL_ID:
return new InstanceSpecificationNameEditPart(view);
+ case InstanceSpecificationFloatingNameEditPart.VISUAL_ID:
+ return new InstanceSpecificationFloatingNameEditPart(view);
+
case ComponentEditPart.VISUAL_ID:
return new ComponentEditPart(view);
case ComponentNameEditPart.VISUAL_ID:
return new ComponentNameEditPart(view);
+ case ComponentFloatingNameEditPart.VISUAL_ID:
+ return new ComponentFloatingNameEditPart(view);
+
case SignalEditPart.VISUAL_ID:
return new SignalEditPart(view);
case SignalNameEditPart.VISUAL_ID:
return new SignalNameEditPart(view);
+ case SignalFloatingNameEditPart.VISUAL_ID:
+ return new SignalFloatingNameEditPart(view);
+
case InterfaceEditPart.VISUAL_ID:
return new InterfaceEditPart(view);
case InterfaceNameEditPart.VISUAL_ID:
return new InterfaceNameEditPart(view);
+ case InterfaceFloatingNameEditPart.VISUAL_ID:
+ return new InterfaceFloatingNameEditPart(view);
+
case ModelEditPartTN.VISUAL_ID:
return new ModelEditPartTN(view);
@@ -93,6 +114,9 @@ public class UMLEditPartFactory implements EditPartFactory {
case EnumerationNameEditPart.VISUAL_ID:
return new EnumerationNameEditPart(view);
+ case EnumerationFloatingNameEditPart.VISUAL_ID:
+ return new EnumerationFloatingNameEditPart(view);
+
case PackageEditPart.VISUAL_ID:
return new PackageEditPart(view);
@@ -105,24 +129,36 @@ public class UMLEditPartFactory implements EditPartFactory {
case InformationItemNameEditPart.VISUAL_ID:
return new InformationItemNameEditPart(view);
+ case InformationItemFloatingNameEditPart.VISUAL_ID:
+ return new InformationItemFloatingNameEditPart(view);
+
case ClassEditPart.VISUAL_ID:
return new ClassEditPart(view);
case ClassNameEditPart.VISUAL_ID:
return new ClassNameEditPart(view);
+ case ClassFloatingNameEditPart.VISUAL_ID:
+ return new ClassFloatingNameEditPart(view);
+
case PrimitiveTypeEditPart.VISUAL_ID:
return new PrimitiveTypeEditPart(view);
case PrimitiveTypeNameEditPart.VISUAL_ID:
return new PrimitiveTypeNameEditPart(view);
+ case PrimitiveTypeFloatingNameEditPart.VISUAL_ID:
+ return new PrimitiveTypeFloatingNameEditPart(view);
+
case DataTypeEditPart.VISUAL_ID:
return new DataTypeEditPart(view);
case DataTypeNameEditPart.VISUAL_ID:
return new DataTypeNameEditPart(view);
+ case DataTypeFloatingNameEditPart.VISUAL_ID:
+ return new DataTypeFloatingNameEditPart(view);
+
case ConstraintEditPart.VISUAL_ID:
return new ConstraintEditPart(view);
@@ -147,8 +183,8 @@ public class UMLEditPartFactory implements EditPartFactory {
case DurationObservationEditPart.VISUAL_ID:
return new DurationObservationEditPart(view);
- case DurationObservationNameEditPart.VISUAL_ID:
- return new DurationObservationNameEditPart(view);
+ case DurationObservationFloatingNameEditPart.VISUAL_ID:
+ return new DurationObservationFloatingNameEditPart(view);
case DurationObservationStereotypeLabelEditPart.VISUAL_ID:
return new DurationObservationStereotypeLabelEditPart(view);
@@ -156,8 +192,8 @@ public class UMLEditPartFactory implements EditPartFactory {
case TimeObservationEditPart.VISUAL_ID:
return new TimeObservationEditPart(view);
- case TimeObservationNameEditPart.VISUAL_ID:
- return new TimeObservationNameEditPart(view);
+ case TimeObservationFloatingNameEditPart.VISUAL_ID:
+ return new TimeObservationFloatingNameEditPart(view);
case TimeObservationStereotypeLabelEditPart.VISUAL_ID:
return new TimeObservationStereotypeLabelEditPart(view);
@@ -249,24 +285,36 @@ public class UMLEditPartFactory implements EditPartFactory {
case InstanceSpecificationNameEditPartCN.VISUAL_ID:
return new InstanceSpecificationNameEditPartCN(view);
+ case InstanceSpecificationFloatingNameEditPartCN.VISUAL_ID:
+ return new InstanceSpecificationFloatingNameEditPartCN(view);
+
case ComponentEditPartCN.VISUAL_ID:
return new ComponentEditPartCN(view);
case ComponentNameEditPartCN.VISUAL_ID:
return new ComponentNameEditPartCN(view);
+ case ComponentFloatingNameEditPartCN.VISUAL_ID:
+ return new ComponentFloatingNameEditPartCN(view);
+
case SignalEditPartCN.VISUAL_ID:
return new SignalEditPartCN(view);
case SignalNameEditPartCN.VISUAL_ID:
return new SignalNameEditPartCN(view);
+ case SignalFloatingNameEditPartCN.VISUAL_ID:
+ return new SignalFloatingNameEditPartCN(view);
+
case InterfaceEditPartCN.VISUAL_ID:
return new InterfaceEditPartCN(view);
case InterfaceNameEditPartCN.VISUAL_ID:
return new InterfaceNameEditPartCN(view);
+ case InterfaceFloatingNameEditPartCN.VISUAL_ID:
+ return new InterfaceFloatingNameEditPartCN(view);
+
case ModelEditPartCN.VISUAL_ID:
return new ModelEditPartCN(view);
@@ -279,6 +327,9 @@ public class UMLEditPartFactory implements EditPartFactory {
case EnumerationNameEditPartCN.VISUAL_ID:
return new EnumerationNameEditPartCN(view);
+ case EnumerationFloatingNameEditPartCN.VISUAL_ID:
+ return new EnumerationFloatingNameEditPartCN(view);
+
case PackageEditPartCN.VISUAL_ID:
return new PackageEditPartCN(view);
@@ -291,24 +342,36 @@ public class UMLEditPartFactory implements EditPartFactory {
case InformationItemNameEditPartCN.VISUAL_ID:
return new InformationItemNameEditPartCN(view);
+ case InformationItemFloatingNameEditPartCN.VISUAL_ID:
+ return new InformationItemFloatingNameEditPartCN(view);
+
case ClassEditPartCN.VISUAL_ID:
return new ClassEditPartCN(view);
case ClassNameEditPartCN.VISUAL_ID:
return new ClassNameEditPartCN(view);
+ case ClassFloatingNameEditPartCN.VISUAL_ID:
+ return new ClassFloatingNameEditPartCN(view);
+
case PrimitiveTypeEditPartCN.VISUAL_ID:
return new PrimitiveTypeEditPartCN(view);
case PrimitiveTypeNameEditPartCN.VISUAL_ID:
return new PrimitiveTypeNameEditPartCN(view);
+ case PrimitiveTypeFloatingNameEditPartCN.VISUAL_ID:
+ return new PrimitiveTypeFloatingNameEditPartCN(view);
+
case DataTypeEditPartCN.VISUAL_ID:
return new DataTypeEditPartCN(view);
case DataTypeNameEditPartCN.VISUAL_ID:
return new DataTypeNameEditPartCN(view);
+ case DataTypeFloatingNameEditPartCN.VISUAL_ID:
+ return new DataTypeFloatingNameEditPartCN(view);
+
case CommentEditPartCN.VISUAL_ID:
return new CommentEditPartCN(view);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UsageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UsageNameEditPart.java
index 48e3b1e08ef..a92b73f0a92 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UsageNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/UsageNameEditPart.java
@@ -1,821 +1,830 @@
-/**
- * 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.clazz.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
-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.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 UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6016;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.UsageNameEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public UsageNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Usage_4007, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.UsageNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- 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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.clazz.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLParserProvider;
+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.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 UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6016;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.UsageNameEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public UsageNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Usage_4007, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.clazz.edit.parts.UsageNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/UMLBaseItemSemanticEditPolicy.java
index 4fb5a4a5a79..ae89b1c1b46 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -878,7 +878,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
public boolean canExistInformationFlow_4026(Package container, InformationFlow linkInstance, NamedElement source, NamedElement target) {
try {
- //Information Flow source constraint
+ // Information Flow source constraint
if (source != null) {
if (!((source instanceof Actor)
|| (source instanceof Node)
@@ -905,7 +905,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
}
}
}
- //Information Flow target constraint
+ // Information Flow target constraint
if (target != null) {
if (!((target instanceof Actor)
|| (target instanceof Node)
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramEditorUtil.java
index 65fb7222bf5..cc28ef1be77 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramEditorUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramEditorUtil.java
@@ -182,6 +182,7 @@ public class UMLDiagramEditorUtil {
* Create a new instance of domain element associated with canvas.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static Package createInitialModel() {
@@ -192,6 +193,7 @@ public class UMLDiagramEditorUtil {
* Store model element in the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static void attachModelToResource(Package model, Resource resource) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramUpdater.java
index 96e38ecd1e0..dbab0045bba 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDiagramUpdater.java
@@ -83,7 +83,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
protected UMLDiagramUpdater() {
- //to prevent instantiation allowing the override
+ // to prevent instantiation allowing the override
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDocumentProvider.java
index f0f5089fc4b..4ad79e90e8c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDocumentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLDocumentProvider.java
@@ -554,7 +554,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
info.stopResourceListening();
fireElementStateChanging(element);
try {
- monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); //"Saving diagram"
+ monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); // "Saving diagram"
for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
monitor.setTaskName(NLS.bind(
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLPaletteFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLPaletteFactory.java
index 4ed955330a2..afa5dce8005 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLPaletteFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLPaletteFactory.java
@@ -1,965 +1,965 @@
-/**
- * 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.clazz.part;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.gef.Tool;
-import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeConnectionTool;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool;
-
-/**
- * @generated
- */
-public class UMLPaletteFactory extends PaletteFactory.Adapter {
-
- // RS: New Palette generation
- // Generates the ID for the tool elements
- // Generate the tool factory (if(ID) createtool...)
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_CLASS = "clazz.tool.class";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_CLASSIFIERTEMPLATEPARAMETER = "clazz.tool.classifiertemplateparameter";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_COMMENT = "clazz.tool.comment";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_COMPONENT = "clazz.tool.component";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_CONSTRAINT = "clazz.tool.constraint";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_DATATYPE = "clazz.tool.datatype";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEDURATIONOBSERVATION7CREATIONTOOL = "createDurationObservation7CreationTool";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_ENUMERATION = "clazz.tool.enumeration";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_ENUMERATIONLITERAL = "clazz.tool.enumerationliteral";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_INTERFACE = "clazz.tool.interface";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_INSTANCESPECIFICATION = "clazz.tool.instancespecification";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_INFORMATIONITEM = "clazz.tool.informationitem";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_PRIMITIVETYPE = "clazz.tool.primitivetype";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_MODEL = "clazz.tool.model";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_OPERATION = "clazz.tool.operation";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_OPERATIONTEMPLATEPARAMETER = "clazz.tool.OperationTemplateParameter";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_PACKAGE = "clazz.tool.package";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_PROPERTY = "clazz.tool.property";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_RECEPTION = "clazz.tool.reception";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_REDEFINABLETEMPLATESIGNATURE = "clazz.tool.redefinabletemplatesignature";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_SIGNAL = "clazz.tool.signal";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_SLOT = "clazz.tool.slot";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_TEMPLATEPARAMETER = "clazz.tool.templateparameter";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_TEMPLATESIGNATURE = "clazz.tool.templatesignature";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATETIMEOBSERVATION22CREATIONTOOL = "createTimeObservation22CreationTool";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_CONNECTABLEELEMENTTEMPLATEPARAMETER = "clazz.tool.connectableelementtemplateparameter";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_ABSTRACTION = "clazz.tool.abstraction";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_ASSOCIATION = "clazz.tool.association";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_ASSOCIATIONBRANCH = "clazz.tool.associationbranch";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_ASSOCIATIONCLASS = "clazz.tool.associationclass";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_CONTAINMENTLINK = "clazz.tool.containmentlink";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_CONTEXTLINK = "clazz.tool.contextlink";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_DEPENDENCY = "clazz.tool.dependency";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_DEPENDENCYBRANCH = "clazz.tool.dependencybranch";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_ELEMENTIMPORT = "clazz.tool.elementimport";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_GENERALIZATION = "clazz.tool.generalization";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_GENERALIZATIONSET = "clazz.tool.generalizationset";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_INFORMATIONFLOWLINK = "clazz.tool.informationflowlink";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_INSTANCESPECIFICATIONLINK = "clazz.tool.instancespecificationlink";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_INTERFACEREALIZATION = "clazz.tool.interfacerealization";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_LINK = "clazz.tool.link";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_PACKAGEIMPORT = "clazz.tool.packageimport";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_PACKAGEMERGE = "clazz.tool.packagemerge";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_PROFILEAPPLICATION = "clazz.tool.profileapplication";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_REALIZATION = "clazz.tool.realization";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_SUBSTITUTION = "clazz.tool.substitution";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_USAGE = "clazz.tool.usage";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CLAZZ_TOOL_TEMPLATEBINDING = "clazz.tool.templatebinding";//$NON-NLS-1$
-
- /**
- * @generated
- */
- public UMLPaletteFactory() {
-
- }
-
- /**
- * @generated
- */
- @Override
- public Tool createTool(String toolId) {
- if (toolId.equals(CLAZZ_TOOL_CLASS)) {
- return createClass1CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_CLASSIFIERTEMPLATEPARAMETER)) {
- return createClassifierTemplateParameter2CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_COMMENT)) {
- return createComment5CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_COMPONENT)) {
- return createComponent4CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_CONSTRAINT)) {
- return createConstraint5CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_DATATYPE)) {
- return createDataType6CreationTool();
- }
- if (toolId.equals(CREATEDURATIONOBSERVATION7CREATIONTOOL)) {
- return createDurationObservation7CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_ENUMERATION)) {
- return createEnumeration8CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_ENUMERATIONLITERAL)) {
- return createEnumerationliteral9CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_INTERFACE)) {
- return createInterface10CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_INSTANCESPECIFICATION)) {
- return createInstanceSpecification11CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_INFORMATIONITEM)) {
- return createInformationItem12CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_PRIMITIVETYPE)) {
- return createPrimitiveType13CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_MODEL)) {
- return createModel14CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_OPERATION)) {
- return createOperation15CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_OPERATIONTEMPLATEPARAMETER)) {
- return createOperationTemplateParameterCreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_PACKAGE)) {
- return createPackage17CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_PROPERTY)) {
- return createProperty18CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_RECEPTION)) {
- return createReception19CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_REDEFINABLETEMPLATESIGNATURE)) {
- return createRedefinableTemplateSignature20CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_SIGNAL)) {
- return createSignal21CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_SLOT)) {
- return createSlot22CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_TEMPLATEPARAMETER)) {
- return createTemplateParameter23CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_TEMPLATESIGNATURE)) {
- return createTemplateSignatureCreationTool();
- }
- if (toolId.equals(CREATETIMEOBSERVATION22CREATIONTOOL)) {
- return createTimeObservation22CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_CONNECTABLEELEMENTTEMPLATEPARAMETER)) {
- return createConnectableElementTemplateParameter26CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_ABSTRACTION)) {
- return createAbstraction1CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_ASSOCIATION)) {
- return createAssociation2CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_ASSOCIATIONBRANCH)) {
- return createAssociationBranch3CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_ASSOCIATIONCLASS)) {
- return createAssociationClass4CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_CONTAINMENTLINK)) {
- return createContainmentLink5CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_CONTEXTLINK)) {
- return createContextLink6CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_DEPENDENCY)) {
- return createDependency7CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_DEPENDENCYBRANCH)) {
- return createDependencyBranch8CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_ELEMENTIMPORT)) {
- return createElementImport9CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_GENERALIZATION)) {
- return createGeneralization10CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_GENERALIZATIONSET)) {
- return createGeneralizationSet11CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_INFORMATIONFLOWLINK)) {
- return createInformationFlowLinkCreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_INSTANCESPECIFICATIONLINK)) {
- return createInstanceSpecificationLinkCreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_INTERFACEREALIZATION)) {
- return createInterfaceRealization14CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_LINK)) {
- return createLink15CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_PACKAGEIMPORT)) {
- return createPackageImport16CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_PACKAGEMERGE)) {
- return createPackageMerge17CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_PROFILEAPPLICATION)) {
- return createProfileApplication18CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_REALIZATION)) {
- return createRealization19CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_SUBSTITUTION)) {
- return createSubstitution20CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_TEMPLATEBINDING)) {
- return createTemplateBinding21CreationTool();
- }
- if (toolId.equals(CLAZZ_TOOL_USAGE)) {
- return createUsage22CreationTool();
- }
- // default return: null
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getTemplate(String templateId) {
-
- // default return: null
- return null;
- }
-
- /**
- * @generated
- */
- private Tool createClass1CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.Class_3004);
- types.add(UMLElementTypes.Class_3008);
- types.add(UMLElementTypes.Class_3010);
- types.add(UMLElementTypes.Class_3014);
- types.add(UMLElementTypes.Class_2008);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createClassifierTemplateParameter2CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.ClassifierTemplateParameter_3031);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createComment5CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.Comment_3028);
- types.add(UMLElementTypes.Comment_2012);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createComponent4CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.Component_2002);
- types.add(UMLElementTypes.Component_3021);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createConstraint5CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.Constraint_3029);
- types.add(UMLElementTypes.Constraint_2011);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createDataType6CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.DataType_3027);
- types.add(UMLElementTypes.DataType_2010);
- types.add(UMLElementTypes.DataType_3044);
- types.add(UMLElementTypes.DataType_3045);
- types.add(UMLElementTypes.DataType_3043);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createDurationObservation7CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.DurationObservation_2095);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createEnumeration8CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.Enumeration_3025);
- types.add(UMLElementTypes.Enumeration_2006);
- types.add(UMLElementTypes.Enumeration_3052);
- types.add(UMLElementTypes.Enumeration_3053);
- types.add(UMLElementTypes.Enumeration_3054);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createEnumerationliteral9CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.EnumerationLiteral_3017);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createInterface10CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.Interface_2004);
- types.add(UMLElementTypes.Interface_3023);
- types.add(UMLElementTypes.Interface_3036);
- types.add(UMLElementTypes.Interface_3037);
- types.add(UMLElementTypes.Interface_3038);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createInstanceSpecification11CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.InstanceSpecification_2001);
- types.add(UMLElementTypes.InstanceSpecification_3020);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createInformationItem12CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.InformationItem_2099);
- types.add(UMLElementTypes.InformationItem_3040);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createPrimitiveType13CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.PrimitiveType_3026);
- types.add(UMLElementTypes.PrimitiveType_2009);
- types.add(UMLElementTypes.PrimitiveType_3047);
- types.add(UMLElementTypes.PrimitiveType_3046);
- types.add(UMLElementTypes.PrimitiveType_3048);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createModel14CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.Model_2005);
- types.add(UMLElementTypes.Model_3024);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createOperation15CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.Operation_3003);
- types.add(UMLElementTypes.Operation_3007);
- types.add(UMLElementTypes.Operation_3013);
- types.add(UMLElementTypes.Operation_3019);
- types.add(UMLElementTypes.Operation_3042);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createOperationTemplateParameterCreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.OperationTemplateParameter_3035);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createPackage17CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.Package_3009);
- types.add(UMLElementTypes.Package_2007);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createProperty18CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(6);
- types.add(UMLElementTypes.Property_3002);
- types.add(UMLElementTypes.Property_3005);
- types.add(UMLElementTypes.Property_3006);
- types.add(UMLElementTypes.Property_3012);
- types.add(UMLElementTypes.Property_3018);
- types.add(UMLElementTypes.Property_3041);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createReception19CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(2);
- types.add(UMLElementTypes.Reception_3011);
- types.add(UMLElementTypes.Reception_3039);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createRedefinableTemplateSignature20CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.RedefinableTemplateSignature_3015);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createSignal21CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(5);
- types.add(UMLElementTypes.Signal_2003);
- types.add(UMLElementTypes.Signal_3022);
- types.add(UMLElementTypes.Signal_3050);
- types.add(UMLElementTypes.Signal_3051);
- types.add(UMLElementTypes.Signal_3049);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createSlot22CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Slot_3030);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createTemplateParameter23CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.TemplateParameter_3016);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createTemplateSignatureCreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.TemplateSignature_3033);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createTimeObservation22CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.TimeObservation_2096);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createConnectableElementTemplateParameter26CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.ConnectableElementTemplateParameter_3034);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createAbstraction1CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Abstraction_4006);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createAssociation2CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Association_4001);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createAssociationBranch3CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Association_4019);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createAssociationClass4CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.AssociationClass_4017);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createContainmentLink5CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Link_4023);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createContextLink6CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.ConstraintContext_8500);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createDependency7CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Dependency_4008);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createDependencyBranch8CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Dependency_4018);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createElementImport9CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.ElementImport_4009);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createGeneralization10CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Generalization_4002);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createGeneralizationSet11CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.GeneralizationSet_4020);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createInformationFlowLinkCreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.InformationFlow_4026);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createInstanceSpecificationLinkCreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.InstanceSpecification_4021);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createInterfaceRealization14CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.InterfaceRealization_4003);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createLink15CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.CommentAnnotatedElement_4013);
- types.add(UMLElementTypes.TimeObservationEvent_4024);
- types.add(UMLElementTypes.DurationObservationEvent_4025);
- types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createPackageImport16CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.PackageImport_4010);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createPackageMerge17CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.PackageMerge_4011);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createProfileApplication18CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.ProfileApplication_4012);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createRealization19CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Realization_4005);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createSubstitution20CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Substitution_4004);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createTemplateBinding21CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.TemplateBinding_4015);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createUsage22CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Usage_4007);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.clazz.part;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.Tool;
+import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeConnectionTool;
+import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool;
+
+/**
+ * @generated
+ */
+public class UMLPaletteFactory extends PaletteFactory.Adapter {
+
+ // RS: New Palette generation
+ // Generates the ID for the tool elements
+ // Generate the tool factory (if(ID) createtool...)
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_CLASS = "clazz.tool.class";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_CLASSIFIERTEMPLATEPARAMETER = "clazz.tool.classifiertemplateparameter";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_COMMENT = "clazz.tool.comment";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_COMPONENT = "clazz.tool.component";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_CONSTRAINT = "clazz.tool.constraint";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_DATATYPE = "clazz.tool.datatype";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CREATEDURATIONOBSERVATION7CREATIONTOOL = "createDurationObservation7CreationTool";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_ENUMERATION = "clazz.tool.enumeration";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_ENUMERATIONLITERAL = "clazz.tool.enumerationliteral";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_INTERFACE = "clazz.tool.interface";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_INSTANCESPECIFICATION = "clazz.tool.instancespecification";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_INFORMATIONITEM = "clazz.tool.informationitem";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_PRIMITIVETYPE = "clazz.tool.primitivetype";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_MODEL = "clazz.tool.model";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_OPERATION = "clazz.tool.operation";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_OPERATIONTEMPLATEPARAMETER = "clazz.tool.OperationTemplateParameter";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_PACKAGE = "clazz.tool.package";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_PROPERTY = "clazz.tool.property";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_RECEPTION = "clazz.tool.reception";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_REDEFINABLETEMPLATESIGNATURE = "clazz.tool.redefinabletemplatesignature";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_SIGNAL = "clazz.tool.signal";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_SLOT = "clazz.tool.slot";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_TEMPLATEPARAMETER = "clazz.tool.templateparameter";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_TEMPLATESIGNATURE = "clazz.tool.templatesignature";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CREATETIMEOBSERVATION22CREATIONTOOL = "createTimeObservation22CreationTool";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_CONNECTABLEELEMENTTEMPLATEPARAMETER = "clazz.tool.connectableelementtemplateparameter";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_ABSTRACTION = "clazz.tool.abstraction";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_ASSOCIATION = "clazz.tool.association";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_ASSOCIATIONBRANCH = "clazz.tool.associationbranch";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_ASSOCIATIONCLASS = "clazz.tool.associationclass";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_CONTAINMENTLINK = "clazz.tool.containmentlink";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_CONTEXTLINK = "clazz.tool.contextlink";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_DEPENDENCY = "clazz.tool.dependency";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_DEPENDENCYBRANCH = "clazz.tool.dependencybranch";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_ELEMENTIMPORT = "clazz.tool.elementimport";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_GENERALIZATION = "clazz.tool.generalization";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_GENERALIZATIONSET = "clazz.tool.generalizationset";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_INFORMATIONFLOWLINK = "clazz.tool.informationflowlink";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_INSTANCESPECIFICATIONLINK = "clazz.tool.instancespecificationlink";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_INTERFACEREALIZATION = "clazz.tool.interfacerealization";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_LINK = "clazz.tool.link";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_PACKAGEIMPORT = "clazz.tool.packageimport";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_PACKAGEMERGE = "clazz.tool.packagemerge";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_PROFILEAPPLICATION = "clazz.tool.profileapplication";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_REALIZATION = "clazz.tool.realization";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_SUBSTITUTION = "clazz.tool.substitution";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_USAGE = "clazz.tool.usage";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CLAZZ_TOOL_TEMPLATEBINDING = "clazz.tool.templatebinding";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public UMLPaletteFactory() {
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Tool createTool(String toolId) {
+ if (toolId.equals(CLAZZ_TOOL_CLASS)) {
+ return createClass1CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_CLASSIFIERTEMPLATEPARAMETER)) {
+ return createClassifierTemplateParameter2CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_COMMENT)) {
+ return createComment5CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_COMPONENT)) {
+ return createComponent4CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_CONSTRAINT)) {
+ return createConstraint5CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_DATATYPE)) {
+ return createDataType6CreationTool();
+ }
+ if (toolId.equals(CREATEDURATIONOBSERVATION7CREATIONTOOL)) {
+ return createDurationObservation7CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_ENUMERATION)) {
+ return createEnumeration8CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_ENUMERATIONLITERAL)) {
+ return createEnumerationliteral9CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_INTERFACE)) {
+ return createInterface10CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_INSTANCESPECIFICATION)) {
+ return createInstanceSpecification11CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_INFORMATIONITEM)) {
+ return createInformationItem12CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_PRIMITIVETYPE)) {
+ return createPrimitiveType13CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_MODEL)) {
+ return createModel14CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_OPERATION)) {
+ return createOperation15CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_OPERATIONTEMPLATEPARAMETER)) {
+ return createOperationTemplateParameterCreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_PACKAGE)) {
+ return createPackage17CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_PROPERTY)) {
+ return createProperty18CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_RECEPTION)) {
+ return createReception19CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_REDEFINABLETEMPLATESIGNATURE)) {
+ return createRedefinableTemplateSignature20CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_SIGNAL)) {
+ return createSignal21CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_SLOT)) {
+ return createSlot22CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_TEMPLATEPARAMETER)) {
+ return createTemplateParameter23CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_TEMPLATESIGNATURE)) {
+ return createTemplateSignatureCreationTool();
+ }
+ if (toolId.equals(CREATETIMEOBSERVATION22CREATIONTOOL)) {
+ return createTimeObservation22CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_CONNECTABLEELEMENTTEMPLATEPARAMETER)) {
+ return createConnectableElementTemplateParameter26CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_ABSTRACTION)) {
+ return createAbstraction1CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_ASSOCIATION)) {
+ return createAssociation2CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_ASSOCIATIONBRANCH)) {
+ return createAssociationBranch3CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_ASSOCIATIONCLASS)) {
+ return createAssociationClass4CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_CONTAINMENTLINK)) {
+ return createContainmentLink5CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_CONTEXTLINK)) {
+ return createContextLink6CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_DEPENDENCY)) {
+ return createDependency7CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_DEPENDENCYBRANCH)) {
+ return createDependencyBranch8CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_ELEMENTIMPORT)) {
+ return createElementImport9CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_GENERALIZATION)) {
+ return createGeneralization10CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_GENERALIZATIONSET)) {
+ return createGeneralizationSet11CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_INFORMATIONFLOWLINK)) {
+ return createInformationFlowLinkCreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_INSTANCESPECIFICATIONLINK)) {
+ return createInstanceSpecificationLinkCreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_INTERFACEREALIZATION)) {
+ return createInterfaceRealization14CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_LINK)) {
+ return createLink15CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_PACKAGEIMPORT)) {
+ return createPackageImport16CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_PACKAGEMERGE)) {
+ return createPackageMerge17CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_PROFILEAPPLICATION)) {
+ return createProfileApplication18CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_REALIZATION)) {
+ return createRealization19CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_SUBSTITUTION)) {
+ return createSubstitution20CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_TEMPLATEBINDING)) {
+ return createTemplateBinding21CreationTool();
+ }
+ if (toolId.equals(CLAZZ_TOOL_USAGE)) {
+ return createUsage22CreationTool();
+ }
+ // default return: null
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getTemplate(String templateId) {
+
+ // default return: null
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createClass1CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.Class_3004);
+ types.add(UMLElementTypes.Class_3008);
+ types.add(UMLElementTypes.Class_3010);
+ types.add(UMLElementTypes.Class_3014);
+ types.add(UMLElementTypes.Class_2008);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createClassifierTemplateParameter2CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.ClassifierTemplateParameter_3031);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createComment5CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.Comment_3028);
+ types.add(UMLElementTypes.Comment_2012);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createComponent4CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.Component_2002);
+ types.add(UMLElementTypes.Component_3021);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createConstraint5CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.Constraint_3029);
+ types.add(UMLElementTypes.Constraint_2011);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createDataType6CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.DataType_3027);
+ types.add(UMLElementTypes.DataType_2010);
+ types.add(UMLElementTypes.DataType_3044);
+ types.add(UMLElementTypes.DataType_3045);
+ types.add(UMLElementTypes.DataType_3043);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createDurationObservation7CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.DurationObservation_2095);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createEnumeration8CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.Enumeration_3025);
+ types.add(UMLElementTypes.Enumeration_2006);
+ types.add(UMLElementTypes.Enumeration_3052);
+ types.add(UMLElementTypes.Enumeration_3053);
+ types.add(UMLElementTypes.Enumeration_3054);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createEnumerationliteral9CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.EnumerationLiteral_3017);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createInterface10CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.Interface_2004);
+ types.add(UMLElementTypes.Interface_3023);
+ types.add(UMLElementTypes.Interface_3036);
+ types.add(UMLElementTypes.Interface_3037);
+ types.add(UMLElementTypes.Interface_3038);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createInstanceSpecification11CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.InstanceSpecification_2001);
+ types.add(UMLElementTypes.InstanceSpecification_3020);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createInformationItem12CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.InformationItem_2099);
+ types.add(UMLElementTypes.InformationItem_3040);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createPrimitiveType13CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.PrimitiveType_3026);
+ types.add(UMLElementTypes.PrimitiveType_2009);
+ types.add(UMLElementTypes.PrimitiveType_3047);
+ types.add(UMLElementTypes.PrimitiveType_3046);
+ types.add(UMLElementTypes.PrimitiveType_3048);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createModel14CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.Model_2005);
+ types.add(UMLElementTypes.Model_3024);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createOperation15CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.Operation_3003);
+ types.add(UMLElementTypes.Operation_3007);
+ types.add(UMLElementTypes.Operation_3013);
+ types.add(UMLElementTypes.Operation_3019);
+ types.add(UMLElementTypes.Operation_3042);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createOperationTemplateParameterCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.OperationTemplateParameter_3035);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createPackage17CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.Package_3009);
+ types.add(UMLElementTypes.Package_2007);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createProperty18CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(6);
+ types.add(UMLElementTypes.Property_3002);
+ types.add(UMLElementTypes.Property_3005);
+ types.add(UMLElementTypes.Property_3006);
+ types.add(UMLElementTypes.Property_3012);
+ types.add(UMLElementTypes.Property_3018);
+ types.add(UMLElementTypes.Property_3041);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createReception19CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.Reception_3011);
+ types.add(UMLElementTypes.Reception_3039);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createRedefinableTemplateSignature20CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.RedefinableTemplateSignature_3015);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createSignal21CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(5);
+ types.add(UMLElementTypes.Signal_2003);
+ types.add(UMLElementTypes.Signal_3022);
+ types.add(UMLElementTypes.Signal_3050);
+ types.add(UMLElementTypes.Signal_3051);
+ types.add(UMLElementTypes.Signal_3049);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createSlot22CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Slot_3030);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createTemplateParameter23CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.TemplateParameter_3016);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createTemplateSignatureCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.TemplateSignature_3033);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createTimeObservation22CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.TimeObservation_2096);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createConnectableElementTemplateParameter26CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.ConnectableElementTemplateParameter_3034);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createAbstraction1CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Abstraction_4006);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createAssociation2CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Association_4001);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createAssociationBranch3CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Association_4019);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createAssociationClass4CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.AssociationClass_4017);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createContainmentLink5CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Link_4023);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createContextLink6CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.ConstraintContext_8500);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createDependency7CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Dependency_4008);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createDependencyBranch8CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Dependency_4018);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createElementImport9CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.ElementImport_4009);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createGeneralization10CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Generalization_4002);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createGeneralizationSet11CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.GeneralizationSet_4020);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createInformationFlowLinkCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.InformationFlow_4026);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createInstanceSpecificationLinkCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.InstanceSpecification_4021);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createInterfaceRealization14CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.InterfaceRealization_4003);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createLink15CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.CommentAnnotatedElement_4013);
+ types.add(UMLElementTypes.TimeObservationEvent_4024);
+ types.add(UMLElementTypes.DurationObservationEvent_4025);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_4014);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createPackageImport16CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.PackageImport_4010);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createPackageMerge17CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.PackageMerge_4011);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createProfileApplication18CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.ProfileApplication_4012);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createRealization19CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Realization_4005);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createSubstitution20CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Substitution_4004);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createTemplateBinding21CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.TemplateBinding_4015);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createUsage22CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Usage_4007);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLVisualIDRegistry.java
index fc4abc76266..a980edcf0a9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLVisualIDRegistry.java
@@ -823,11 +823,17 @@ public class UMLVisualIDRegistry {
if (MultiDependencyLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (DependencyFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case AssociationClassEditPart.VISUAL_ID:
if (AssociationClassNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (AssociationClassFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (AssociationClassAttributeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -838,10 +844,18 @@ public class UMLVisualIDRegistry {
return true;
}
break;
+ case AssociationNodeEditPart.VISUAL_ID:
+ if (AssociationFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
case InstanceSpecificationEditPart.VISUAL_ID:
if (InstanceSpecificationNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (InstanceSpecificationFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (InstanceSpecificationSlotCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -850,6 +864,9 @@ public class UMLVisualIDRegistry {
if (ComponentNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (ComponentFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (ComponentAttributeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -867,6 +884,9 @@ public class UMLVisualIDRegistry {
if (SignalNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (SignalFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (SignalAttributeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -878,6 +898,9 @@ public class UMLVisualIDRegistry {
if (InterfaceNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (InterfaceFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (InterfaceAttributeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -909,6 +932,9 @@ public class UMLVisualIDRegistry {
if (EnumerationNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (EnumerationFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -931,11 +957,17 @@ public class UMLVisualIDRegistry {
if (InformationItemNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (InformationItemFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case ClassEditPart.VISUAL_ID:
if (ClassNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (ClassFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (ClassAttributeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -956,6 +988,9 @@ public class UMLVisualIDRegistry {
if (PrimitiveTypeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (PrimitiveTypeFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (PrimitiveTypeAttributeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -967,6 +1002,9 @@ public class UMLVisualIDRegistry {
if (DataTypeNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (DataTypeFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (DataTypeAttributeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -996,7 +1034,7 @@ public class UMLVisualIDRegistry {
}
break;
case DurationObservationEditPart.VISUAL_ID:
- if (DurationObservationNameEditPart.VISUAL_ID == nodeVisualID) {
+ if (DurationObservationFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
if (DurationObservationStereotypeLabelEditPart.VISUAL_ID == nodeVisualID) {
@@ -1004,7 +1042,7 @@ public class UMLVisualIDRegistry {
}
break;
case TimeObservationEditPart.VISUAL_ID:
- if (TimeObservationNameEditPart.VISUAL_ID == nodeVisualID) {
+ if (TimeObservationFloatingNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
if (TimeObservationStereotypeLabelEditPart.VISUAL_ID == nodeVisualID) {
@@ -1030,6 +1068,9 @@ public class UMLVisualIDRegistry {
if (InstanceSpecificationNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (InstanceSpecificationFloatingNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (InstanceSpecificationSlotCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -1038,6 +1079,9 @@ public class UMLVisualIDRegistry {
if (ComponentNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (ComponentFloatingNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (ComponentAttributeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -1055,6 +1099,9 @@ public class UMLVisualIDRegistry {
if (SignalNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (SignalFloatingNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (SignalAttributeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -1066,6 +1113,9 @@ public class UMLVisualIDRegistry {
if (InterfaceNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (InterfaceFloatingNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (InterfaceAttributeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -1097,6 +1147,9 @@ public class UMLVisualIDRegistry {
if (EnumerationNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (EnumerationFloatingNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -1119,11 +1172,17 @@ public class UMLVisualIDRegistry {
if (InformationItemNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (InformationItemFloatingNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case ClassEditPartCN.VISUAL_ID:
if (ClassNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (ClassFloatingNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (ClassAttributeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -1141,6 +1200,9 @@ public class UMLVisualIDRegistry {
if (PrimitiveTypeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (PrimitiveTypeFloatingNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (PrimitiveTypeAttributeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -1152,6 +1214,9 @@ public class UMLVisualIDRegistry {
if (DataTypeNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (DataTypeFloatingNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (DataTypeAttributeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -1877,7 +1942,7 @@ public class UMLVisualIDRegistry {
*/
public static boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
if (candidate == -1) {
- //unrecognized id is always bad
+ // unrecognized id is always bad
return false;
}
int basic = getNodeVisualID(containerView, domainElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLParserProvider.java
index 1c461178dee..eccd9a4d660 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLParserProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLParserProvider.java
@@ -24,7 +24,6 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.GeneralizationSetConstraintParser;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.RoleInstanceSpecificationLinkParser;
import org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.RoleInstanceSpecificationSourceLinkParser;
import org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.RoleInstanceSpecificationTargetLinkParser;
import org.eclipse.papyrus.uml.diagram.clazz.custom.parsers.SlotParser;
@@ -67,6 +66,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser dependencyName_8522Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDependencyName_8522Parser() {
+ if (dependencyName_8522Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ dependencyName_8522Parser = parser;
+ }
+ return dependencyName_8522Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser associationClassName_5066Parser;
/**
@@ -86,6 +104,44 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser associationClassName_8504Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getAssociationClassName_8504Parser() {
+ if (associationClassName_8504Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ associationClassName_8504Parser = parser;
+ }
+ return associationClassName_8504Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser associationName_8521Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getAssociationName_8521Parser() {
+ if (associationName_8521Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ associationName_8521Parser = parser;
+ }
+ return associationName_8521Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser instanceSpecificationName_5002Parser;
/**
@@ -105,6 +161,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser instanceSpecificationName_8505Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInstanceSpecificationName_8505Parser() {
+ if (instanceSpecificationName_8505Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ instanceSpecificationName_8505Parser = parser;
+ }
+ return instanceSpecificationName_8505Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser componentName_5005Parser;
/**
@@ -124,6 +199,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser componentName_8503Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getComponentName_8503Parser() {
+ if (componentName_8503Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ componentName_8503Parser = parser;
+ }
+ return componentName_8503Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser signalName_5008Parser;
/**
@@ -143,6 +237,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser signalName_8506Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getSignalName_8506Parser() {
+ if (signalName_8506Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ signalName_8506Parser = parser;
+ }
+ return signalName_8506Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser interfaceName_5011Parser;
/**
@@ -162,6 +275,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser interfaceName_8507Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInterfaceName_8507Parser() {
+ if (interfaceName_8507Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ interfaceName_8507Parser = parser;
+ }
+ return interfaceName_8507Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser modelName_5020Parser;
/**
@@ -200,6 +332,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser enumerationName_8508Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getEnumerationName_8508Parser() {
+ if (enumerationName_8508Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ enumerationName_8508Parser = parser;
+ }
+ return enumerationName_8508Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser packageName_5026Parser;
/**
@@ -238,6 +389,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser informationItemName_8512Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInformationItemName_8512Parser() {
+ if (informationItemName_8512Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ informationItemName_8512Parser = parser;
+ }
+ return informationItemName_8512Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser className_5029Parser;
/**
@@ -257,6 +427,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser className_8510Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getClassName_8510Parser() {
+ if (className_8510Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ className_8510Parser = parser;
+ }
+ return className_8510Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser primitiveTypeName_5032Parser;
/**
@@ -276,6 +465,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser primitiveTypeName_8511Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getPrimitiveTypeName_8511Parser() {
+ if (primitiveTypeName_8511Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ primitiveTypeName_8511Parser = parser;
+ }
+ return primitiveTypeName_8511Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser dataTypeName_5035Parser;
/**
@@ -295,6 +503,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser dataTypeName_8502Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDataTypeName_8502Parser() {
+ if (dataTypeName_8502Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ dataTypeName_8502Parser = parser;
+ }
+ return dataTypeName_8502Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser constraintName_5037Parser;
/**
@@ -831,6 +1058,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser instanceSpecificationName_8509Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInstanceSpecificationName_8509Parser() {
+ if (instanceSpecificationName_8509Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ instanceSpecificationName_8509Parser = parser;
+ }
+ return instanceSpecificationName_8509Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser componentName_5043Parser;
/**
@@ -850,6 +1096,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser componentName_8513Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getComponentName_8513Parser() {
+ if (componentName_8513Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ componentName_8513Parser = parser;
+ }
+ return componentName_8513Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser signalName_5046Parser;
/**
@@ -869,6 +1134,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser signalName_8514Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getSignalName_8514Parser() {
+ if (signalName_8514Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ signalName_8514Parser = parser;
+ }
+ return signalName_8514Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser interfaceName_5049Parser;
/**
@@ -888,6 +1172,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser interfaceName_8515Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInterfaceName_8515Parser() {
+ if (interfaceName_8515Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ interfaceName_8515Parser = parser;
+ }
+ return interfaceName_8515Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser modelName_5052Parser;
/**
@@ -926,6 +1229,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser enumerationName_8516Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getEnumerationName_8516Parser() {
+ if (enumerationName_8516Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ enumerationName_8516Parser = parser;
+ }
+ return enumerationName_8516Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser packageName_5017Parser;
/**
@@ -964,6 +1286,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser informationItemName_8517Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInformationItemName_8517Parser() {
+ if (informationItemName_8517Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ informationItemName_8517Parser = parser;
+ }
+ return informationItemName_8517Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser className_5014Parser;
/**
@@ -983,6 +1324,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser className_8518Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getClassName_8518Parser() {
+ if (className_8518Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ className_8518Parser = parser;
+ }
+ return className_8518Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser primitiveTypeName_5058Parser;
/**
@@ -1002,6 +1362,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser primitiveTypeName_8519Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getPrimitiveTypeName_8519Parser() {
+ if (primitiveTypeName_8519Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ primitiveTypeName_8519Parser = parser;
+ }
+ return primitiveTypeName_8519Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser dataTypeName_5061Parser;
/**
@@ -1021,6 +1400,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser dataTypeName_8520Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDataTypeName_8520Parser() {
+ if (dataTypeName_8520Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ dataTypeName_8520Parser = parser;
+ }
+ return dataTypeName_8520Parser;
+ }
+
+ /**
+ * @generated
+ */
private CommentParser commentBody_5063Parser;
/**
@@ -1893,7 +2291,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
- private RoleInstanceSpecificationLinkParser instanceSpecificationLabel_6039Parser;
+ private RoleInstanceSpecificationSourceLinkParser instanceSpecificationLabel_6039Parser;
/**
* @generated
@@ -1908,7 +2306,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
- private RoleInstanceSpecificationLinkParser instanceSpecificationLabel_6038Parser;
+ private RoleInstanceSpecificationTargetLinkParser instanceSpecificationLabel_6038Parser;
/**
* @generated
@@ -1942,43 +2340,67 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
switch (visualID) {
case MultiDependencyLabelEditPart.VISUAL_ID:
return getDependencyName_1Parser();
+ case DependencyFloatingNameEditPart.VISUAL_ID:
+ return getDependencyName_8522Parser();
case AssociationClassNameEditPart.VISUAL_ID:
return getAssociationClassName_5066Parser();
+ case AssociationClassFloatingNameEditPart.VISUAL_ID:
+ return getAssociationClassName_8504Parser();
+ case AssociationFloatingNameEditPart.VISUAL_ID:
+ return getAssociationName_8521Parser();
case InstanceSpecificationNameEditPart.VISUAL_ID:
return getInstanceSpecificationName_5002Parser();
+ case InstanceSpecificationFloatingNameEditPart.VISUAL_ID:
+ return getInstanceSpecificationName_8505Parser();
case ComponentNameEditPart.VISUAL_ID:
return getComponentName_5005Parser();
+ case ComponentFloatingNameEditPart.VISUAL_ID:
+ return getComponentName_8503Parser();
case SignalNameEditPart.VISUAL_ID:
return getSignalName_5008Parser();
+ case SignalFloatingNameEditPart.VISUAL_ID:
+ return getSignalName_8506Parser();
case InterfaceNameEditPart.VISUAL_ID:
return getInterfaceName_5011Parser();
+ case InterfaceFloatingNameEditPart.VISUAL_ID:
+ return getInterfaceName_8507Parser();
case ModelNameEditPartTN.VISUAL_ID:
return getModelName_5020Parser();
case EnumerationNameEditPart.VISUAL_ID:
return getEnumerationName_5023Parser();
+ case EnumerationFloatingNameEditPart.VISUAL_ID:
+ return getEnumerationName_8508Parser();
case PackageNameEditPart.VISUAL_ID:
return getPackageName_5026Parser();
case InformationItemNameEditPart.VISUAL_ID:
return getInformationItemName_5161Parser();
+ case InformationItemFloatingNameEditPart.VISUAL_ID:
+ return getInformationItemName_8512Parser();
case ClassNameEditPart.VISUAL_ID:
return getClassName_5029Parser();
+ case ClassFloatingNameEditPart.VISUAL_ID:
+ return getClassName_8510Parser();
case PrimitiveTypeNameEditPart.VISUAL_ID:
return getPrimitiveTypeName_5032Parser();
+ case PrimitiveTypeFloatingNameEditPart.VISUAL_ID:
+ return getPrimitiveTypeName_8511Parser();
case DataTypeNameEditPart.VISUAL_ID:
return getDataTypeName_5035Parser();
+ case DataTypeFloatingNameEditPart.VISUAL_ID:
+ return getDataTypeName_8502Parser();
case ConstraintNameEditPart.VISUAL_ID:
return getConstraintName_5037Parser();
@@ -1991,12 +2413,12 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
case DiagramNameEditPart.VISUAL_ID:
return getDiagramName_0Parser();
- case DurationObservationNameEditPart.VISUAL_ID:
+ case DurationObservationFloatingNameEditPart.VISUAL_ID:
return getDurationObservationName_5155Parser();
case DurationObservationStereotypeLabelEditPart.VISUAL_ID:
return getDurationObservationName_5156Parser();
- case TimeObservationNameEditPart.VISUAL_ID:
+ case TimeObservationFloatingNameEditPart.VISUAL_ID:
return getTimeObservationName_5153Parser();
case TimeObservationStereotypeLabelEditPart.VISUAL_ID:
return getTimeObservationName_5154Parser();
@@ -2049,36 +2471,54 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
case InstanceSpecificationNameEditPartCN.VISUAL_ID:
return getInstanceSpecificationName_5040Parser();
+ case InstanceSpecificationFloatingNameEditPartCN.VISUAL_ID:
+ return getInstanceSpecificationName_8509Parser();
case ComponentNameEditPartCN.VISUAL_ID:
return getComponentName_5043Parser();
+ case ComponentFloatingNameEditPartCN.VISUAL_ID:
+ return getComponentName_8513Parser();
case SignalNameEditPartCN.VISUAL_ID:
return getSignalName_5046Parser();
+ case SignalFloatingNameEditPartCN.VISUAL_ID:
+ return getSignalName_8514Parser();
case InterfaceNameEditPartCN.VISUAL_ID:
return getInterfaceName_5049Parser();
+ case InterfaceFloatingNameEditPartCN.VISUAL_ID:
+ return getInterfaceName_8515Parser();
case ModelNameEditPartCN.VISUAL_ID:
return getModelName_5052Parser();
case EnumerationNameEditPartCN.VISUAL_ID:
return getEnumerationName_5055Parser();
+ case EnumerationFloatingNameEditPartCN.VISUAL_ID:
+ return getEnumerationName_8516Parser();
case PackageNameEditPartCN.VISUAL_ID:
return getPackageName_5017Parser();
case InformationItemNameEditPartCN.VISUAL_ID:
return getInformationItemName_5162Parser();
+ case InformationItemFloatingNameEditPartCN.VISUAL_ID:
+ return getInformationItemName_8517Parser();
case ClassNameEditPartCN.VISUAL_ID:
return getClassName_5014Parser();
+ case ClassFloatingNameEditPartCN.VISUAL_ID:
+ return getClassName_8518Parser();
case PrimitiveTypeNameEditPartCN.VISUAL_ID:
return getPrimitiveTypeName_5058Parser();
+ case PrimitiveTypeFloatingNameEditPartCN.VISUAL_ID:
+ return getPrimitiveTypeName_8519Parser();
case DataTypeNameEditPartCN.VISUAL_ID:
return getDataTypeName_5061Parser();
+ case DataTypeFloatingNameEditPartCN.VISUAL_ID:
+ return getDataTypeName_8520Parser();
case CommentBodyEditPartCN.VISUAL_ID:
return getCommentBody_5063Parser();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLViewProvider.java
index f4730c5a611..0b1793b88cb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/providers/UMLViewProvider.java
@@ -91,10 +91,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
*/
protected boolean provides(CreateViewForKindOperation op) {
/*
- if (op.getViewKind() == Node.class)
- return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
- if (op.getViewKind() == Edge.class)
- return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ * if (op.getViewKind() == Node.class)
+ * return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ * if (op.getViewKind() == Edge.class)
+ * return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
*/
// check Diagram Type should be the class diagram
@@ -120,7 +120,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* <p>
* This method can be overloaded when diagram editor inherits from another one, but should never be <code>null</code>
* </p>
- *
+ *
* @return the unique identifier of the diagram for which views are provided.
*/
return ModelEditPart.MODEL_ID;
@@ -287,7 +287,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
*/
protected boolean provides(CreateEdgeViewOperation op) {
IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- //RS: add code for extended types creation
+ // RS: add code for extended types creation
if (elementType instanceof IExtendedHintedElementType) {
IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType);
if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) {
@@ -298,9 +298,9 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
return false; // foreign element type
}
}
- //if (!org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
- // return false; // foreign element type
- //}
+ // if (!org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
+ // return false; // foreign element type
+ // }
// END R.S.
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) {
@@ -579,6 +579,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Location location1 = (Location) label1.getLayoutConstraint();
location1.setX(0);
location1.setY(5);
+ Node label8522 = createLabel(node, UMLVisualIDRegistry.getType(DependencyFloatingNameEditPart.VISUAL_ID));
+ label8522.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8522 = (Location) label8522.getLayoutConstraint();
+ location8522.setX(0);
+ location8522.setY(5);
return node;
}
@@ -597,6 +602,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AssociationClass");
Node label5066 = createLabel(node, UMLVisualIDRegistry.getType(AssociationClassNameEditPart.VISUAL_ID));
+ Node label8504 = createLabel(node, UMLVisualIDRegistry.getType(AssociationClassFloatingNameEditPart.VISUAL_ID));
+ label8504.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8504 = (Location) label8504.getLayoutConstraint();
+ location8504.setX(0);
+ location8504.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(AssociationClassAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(AssociationClassOperationCompartmentEditPart.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(AssociationClassNestedClassifierCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -618,6 +628,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AssociationNode");
+ Node label8521 = createLabel(node, UMLVisualIDRegistry.getType(AssociationFloatingNameEditPart.VISUAL_ID));
+ label8521.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8521 = (Location) label8521.getLayoutConstraint();
+ location8521.setX(0);
+ location8521.setY(5);
return node;
}
@@ -636,6 +651,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InstanceSpecification");
Node label5002 = createLabel(node, UMLVisualIDRegistry.getType(InstanceSpecificationNameEditPart.VISUAL_ID));
+ Node label8505 = createLabel(node, UMLVisualIDRegistry.getType(InstanceSpecificationFloatingNameEditPart.VISUAL_ID));
+ label8505.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8505 = (Location) label8505.getLayoutConstraint();
+ location8505.setX(0);
+ location8505.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(InstanceSpecificationSlotCompartmentEditPart.VISUAL_ID), true, true, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "InstanceSpecification");
return node;
@@ -656,6 +676,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Component");
Node label5005 = createLabel(node, UMLVisualIDRegistry.getType(ComponentNameEditPart.VISUAL_ID));
+ Node label8503 = createLabel(node, UMLVisualIDRegistry.getType(ComponentFloatingNameEditPart.VISUAL_ID));
+ label8503.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8503 = (Location) label8503.getLayoutConstraint();
+ location8503.setX(0);
+ location8503.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ComponentAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(ComponentOperationCompartmentEditPart.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(ComponentNestedClassifierCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -678,6 +703,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Signal");
Node label5008 = createLabel(node, UMLVisualIDRegistry.getType(SignalNameEditPart.VISUAL_ID));
+ Node label8506 = createLabel(node, UMLVisualIDRegistry.getType(SignalFloatingNameEditPart.VISUAL_ID));
+ label8506.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8506 = (Location) label8506.getLayoutConstraint();
+ location8506.setX(0);
+ location8506.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(SignalAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Signal");
return node;
@@ -698,6 +728,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interface");
Node label5011 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceNameEditPart.VISUAL_ID));
+ Node label8507 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceFloatingNameEditPart.VISUAL_ID));
+ label8507.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8507 = (Location) label8507.getLayoutConstraint();
+ location8507.setX(0);
+ location8507.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(InterfaceAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(InterfaceOperationCompartmentEditPart.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -740,6 +775,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Enumeration");
Node label5023 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationNameEditPart.VISUAL_ID));
+ Node label8508 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationFloatingNameEditPart.VISUAL_ID));
+ label8508.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8508 = (Location) label8508.getLayoutConstraint();
+ location8508.setX(0);
+ location8508.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID), true, true, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Enumeration");
return node;
@@ -780,6 +820,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InformationItem");
Node label5161 = createLabel(node, UMLVisualIDRegistry.getType(InformationItemNameEditPart.VISUAL_ID));
+ Node label8512 = createLabel(node, UMLVisualIDRegistry.getType(InformationItemFloatingNameEditPart.VISUAL_ID));
+ label8512.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8512 = (Location) label8512.getLayoutConstraint();
+ location8512.setX(0);
+ location8512.setY(5);
return node;
}
@@ -798,6 +843,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Class");
Node label5029 = createLabel(node, UMLVisualIDRegistry.getType(ClassNameEditPart.VISUAL_ID));
+ Node label8510 = createLabel(node, UMLVisualIDRegistry.getType(ClassFloatingNameEditPart.VISUAL_ID));
+ label8510.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8510 = (Location) label8510.getLayoutConstraint();
+ location8510.setX(0);
+ location8510.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ClassAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(ClassOperationCompartmentEditPart.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(ClassNestedClassifierCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -820,6 +870,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "PrimitiveType");
Node label5032 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPart.VISUAL_ID));
+ Node label8511 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeFloatingNameEditPart.VISUAL_ID));
+ label8511.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8511 = (Location) label8511.getLayoutConstraint();
+ location8511.setX(0);
+ location8511.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(PrimitiveTypeAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(PrimitiveTypeOperationCompartmentEditPart.VISUAL_ID), true, true, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "PrimitiveType");
@@ -841,6 +896,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataType");
Node label5035 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeNameEditPart.VISUAL_ID));
+ Node label8502 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeFloatingNameEditPart.VISUAL_ID));
+ label8502.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8502 = (Location) label8502.getLayoutConstraint();
+ location8502.setX(0);
+ location8502.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(DataTypeAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(DataTypeOperationCompartmentEditPart.VISUAL_ID), true, true, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "DataType");
@@ -920,7 +980,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationObservation");
- Node label5155 = createLabel(node, UMLVisualIDRegistry.getType(DurationObservationNameEditPart.VISUAL_ID));
+ Node label5155 = createLabel(node, UMLVisualIDRegistry.getType(DurationObservationFloatingNameEditPart.VISUAL_ID));
label5155.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location5155 = (Location) label5155.getLayoutConstraint();
location5155.setX(25);
@@ -947,7 +1007,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeObservation");
- Node label5153 = createLabel(node, UMLVisualIDRegistry.getType(TimeObservationNameEditPart.VISUAL_ID));
+ Node label5153 = createLabel(node, UMLVisualIDRegistry.getType(TimeObservationFloatingNameEditPart.VISUAL_ID));
label5153.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location5153 = (Location) label5153.getLayoutConstraint();
location5153.setX(25);
@@ -1374,6 +1434,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InstanceSpecification");
Node label5040 = createLabel(node, UMLVisualIDRegistry.getType(InstanceSpecificationNameEditPartCN.VISUAL_ID));
+ Node label8509 = createLabel(node, UMLVisualIDRegistry.getType(InstanceSpecificationFloatingNameEditPartCN.VISUAL_ID));
+ label8509.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8509 = (Location) label8509.getLayoutConstraint();
+ location8509.setX(0);
+ location8509.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(InstanceSpecificationSlotCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "InstanceSpecification");
return node;
@@ -1393,6 +1458,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Component");
Node label5043 = createLabel(node, UMLVisualIDRegistry.getType(ComponentNameEditPartCN.VISUAL_ID));
+ Node label8513 = createLabel(node, UMLVisualIDRegistry.getType(ComponentFloatingNameEditPartCN.VISUAL_ID));
+ label8513.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8513 = (Location) label8513.getLayoutConstraint();
+ location8513.setX(0);
+ location8513.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ComponentAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(ComponentOperationCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
@@ -1414,6 +1484,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Signal");
Node label5046 = createLabel(node, UMLVisualIDRegistry.getType(SignalNameEditPartCN.VISUAL_ID));
+ Node label8514 = createLabel(node, UMLVisualIDRegistry.getType(SignalFloatingNameEditPartCN.VISUAL_ID));
+ label8514.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8514 = (Location) label8514.getLayoutConstraint();
+ location8514.setX(0);
+ location8514.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(SignalAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Signal");
return node;
@@ -1433,6 +1508,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interface");
Node label5049 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceNameEditPartCN.VISUAL_ID));
+ Node label8515 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceFloatingNameEditPartCN.VISUAL_ID));
+ label8515.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8515 = (Location) label8515.getLayoutConstraint();
+ location8515.setX(0);
+ location8515.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(InterfaceAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(InterfaceOperationCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
@@ -1473,6 +1553,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Enumeration");
Node label5055 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationNameEditPartCN.VISUAL_ID));
+ Node label8516 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationFloatingNameEditPartCN.VISUAL_ID));
+ label8516.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8516 = (Location) label8516.getLayoutConstraint();
+ location8516.setX(0);
+ location8516.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Enumeration");
return node;
@@ -1511,6 +1596,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InformationItem");
Node label5162 = createLabel(node, UMLVisualIDRegistry.getType(InformationItemNameEditPartCN.VISUAL_ID));
+ Node label8517 = createLabel(node, UMLVisualIDRegistry.getType(InformationItemFloatingNameEditPartCN.VISUAL_ID));
+ label8517.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8517 = (Location) label8517.getLayoutConstraint();
+ location8517.setX(0);
+ location8517.setY(5);
return node;
}
@@ -1528,6 +1618,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Class");
Node label5014 = createLabel(node, UMLVisualIDRegistry.getType(ClassNameEditPartCN.VISUAL_ID));
+ Node label8518 = createLabel(node, UMLVisualIDRegistry.getType(ClassFloatingNameEditPartCN.VISUAL_ID));
+ label8518.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8518 = (Location) label8518.getLayoutConstraint();
+ location8518.setX(0);
+ location8518.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ClassAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(ClassOperationCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
@@ -1549,6 +1644,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "PrimitiveType");
Node label5058 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPartCN.VISUAL_ID));
+ Node label8519 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeFloatingNameEditPartCN.VISUAL_ID));
+ label8519.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8519 = (Location) label8519.getLayoutConstraint();
+ location8519.setX(0);
+ location8519.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(PrimitiveTypeAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(PrimitiveTypeOperationCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "PrimitiveType");
@@ -1569,6 +1669,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataType");
Node label5061 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeNameEditPartCN.VISUAL_ID));
+ Node label8520 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeFloatingNameEditPartCN.VISUAL_ID));
+ label8520.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location8520 = (Location) label8520.getLayoutConstraint();
+ location8520.setX(0);
+ location8520.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(DataTypeAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(DataTypeOperationCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "DataType");
@@ -1854,10 +1959,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "AssociationClassDashedLink");
- //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);
- //}
+ // 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;
}
@@ -1881,10 +1986,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "AssociationClassLink");
- //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);
- //}
+ // 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);
+ // }
Node label6031 = createLabel(edge, UMLVisualIDRegistry.getType(AssociationClassRoleSourceEditPart.VISUAL_ID));
label6031.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6031 = (Location) label6031.getLayoutConstraint();
@@ -1918,10 +2023,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "AssociationLink");
- //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);
- //}
+ // 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);
+ // }
Node label6001 = createLabel(edge, UMLVisualIDRegistry.getType(AppliedStereotypeAssociationEditPart.VISUAL_ID));
label6001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6001 = (Location) label6001.getLayoutConstraint();
@@ -1975,10 +2080,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "AssociationBranchLink");
- //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);
- //}
+ // 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);
+ // }
Node label6024 = createLabel(edge, UMLVisualIDRegistry.getType(AssociationBranchRoleEditPart.VISUAL_ID));
label6024.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6024 = (Location) label6024.getLayoutConstraint();
@@ -2012,10 +2117,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
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) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
+ // 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);
+ // }
Node label6007 = createLabel(edge, UMLVisualIDRegistry.getType(AppliedStereotyperGeneralizationEditPart.VISUAL_ID));
label6007.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6007 = (Location) label6007.getLayoutConstraint();
@@ -2044,10 +2149,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "InterfaceRealization");
- //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);
- //}
+ // 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);
+ // }
Node label6008 = createLabel(edge, UMLVisualIDRegistry.getType(AppliedStereotypeInterfaceRealizationEditPart.VISUAL_ID));
label6008.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6008 = (Location) label6008.getLayoutConstraint();
@@ -2081,10 +2186,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Substitution");
- //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);
- //}
+ // 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);
+ // }
Node label6010 = createLabel(edge, UMLVisualIDRegistry.getType(AppliedStereotypeSubstitutionEditPart.VISUAL_ID));
label6010.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6010 = (Location) label6010.getLayoutConstraint();
@@ -2118,10 +2223,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Realization");
- //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);
- //}
+ // 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);
+ // }
Node label6012 = createLabel(edge, UMLVisualIDRegistry.getType(AppliedStereotypeRealizationEditPart.VISUAL_ID));
label6012.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6012 = (Location) label6012.getLayoutConstraint();
@@ -2155,10 +2260,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Abstraction");
- //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);
- //}
+ // 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);
+ // }
Node label6014 = createLabel(edge, UMLVisualIDRegistry.getType(AbstractionNameEditPart.VISUAL_ID));
label6014.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6014 = (Location) label6014.getLayoutConstraint();
@@ -2192,10 +2297,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Usage");
- //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);
- //}
+ // 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);
+ // }
Node label6016 = createLabel(edge, UMLVisualIDRegistry.getType(UsageNameEditPart.VISUAL_ID));
label6016.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6016 = (Location) label6016.getLayoutConstraint();
@@ -2229,10 +2334,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "DependencyLink");
- //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);
- //}
+ // 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);
+ // }
Node label6026 = createLabel(edge, UMLVisualIDRegistry.getType(DependencyNameEditPart.VISUAL_ID));
label6026.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6026 = (Location) label6026.getLayoutConstraint();
@@ -2266,10 +2371,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "DependencyBranchLink");
- //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);
- //}
+ // 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;
}
@@ -2293,10 +2398,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
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) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
+ // 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);
+ // }
Node label6020 = createLabel(edge, UMLVisualIDRegistry.getType(ElementImportAliasEditPart.VISUAL_ID));
label6020.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6020 = (Location) label6020.getLayoutConstraint();
@@ -2330,10 +2435,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
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) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
+ // 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);
+ // }
Node label6022 = createLabel(edge, UMLVisualIDRegistry.getType(AppliedStereotypePackageImportEditPart.VISUAL_ID));
label6022.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6022 = (Location) label6022.getLayoutConstraint();
@@ -2362,10 +2467,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "PackageMerge");
- //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);
- //}
+ // 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);
+ // }
Node label6030 = createLabel(edge, UMLVisualIDRegistry.getType(AppliedStereotypePackageMergeEditPart.VISUAL_ID));
label6030.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6030 = (Location) label6030.getLayoutConstraint();
@@ -2394,10 +2499,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
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);
- //}
+ // 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;
}
@@ -2420,10 +2525,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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;
}
@@ -2446,10 +2551,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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;
}
@@ -2473,10 +2578,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "TemplateBinding");
- //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);
- //}
+ // 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);
+ // }
Node label6023 = createLabel(edge, UMLVisualIDRegistry.getType(BindingSubstitutionEditPart.VISUAL_ID));
label6023.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6023 = (Location) label6023.getLayoutConstraint();
@@ -2510,10 +2615,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "GeneralizationSet");
- //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);
- //}
+ // 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);
+ // }
Node label5067 = createLabel(edge, UMLVisualIDRegistry.getType(ConstraintLabelEditPart.VISUAL_ID));
label5067.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location5067 = (Location) label5067.getLayoutConstraint();
@@ -2547,10 +2652,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "InstanceSpecificationLink");
- //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);
- //}
+ // 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);
+ // }
Node label6039 = createLabel(edge, UMLVisualIDRegistry.getType(SourceISLinkLabelEditPart.VISUAL_ID));
label6039.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6039 = (Location) label6039.getLayoutConstraint();
@@ -2584,10 +2689,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ContainmentSubLink");
- //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);
- //}
+ // 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;
}
@@ -2611,10 +2716,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ContainmentLink");
- //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);
- //}
+ // 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;
}
@@ -2637,10 +2742,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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;
}
@@ -2663,10 +2768,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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;
}
@@ -2690,10 +2795,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "InformationFlow");
- //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);
- //}
+ // 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);
+ // }
Node label6040 = createLabel(edge, UMLVisualIDRegistry.getType(InformationFlowConveyedLabelEditPart.VISUAL_ID));
label6040.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6040 = (Location) label6040.getLayoutConstraint();
@@ -2726,10 +2831,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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);
+ // }
Node label8501 = createLabel(edge, UMLVisualIDRegistry.getType(ContextLinkAppliedStereotypeEditPart.VISUAL_ID));
label8501.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location8501 = (Location) label8501.getLayoutConstraint();
@@ -2765,9 +2870,9 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* @generated
*/
protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) {
- //SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
- //rv.setShowTitle(showTitle);
- //rv.setCollapsed(isCollapsed);
+ // SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
+ // rv.setShowTitle(showTitle);
+ // rv.setCollapsed(isCollapsed);
Node rv;
if (canCollapse) {
rv = NotationFactory.eINSTANCE.createBasicCompartment();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/sheet/UMLPropertySection.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/sheet/UMLPropertySection.java
index 5644bd68c35..9fa448ad95c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/sheet/UMLPropertySection.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/sheet/UMLPropertySection.java
@@ -26,7 +26,7 @@ public class UMLPropertySection extends DefaultPropertySection implements IPrope
*/
@Override
protected Object transformSelection(Object selected) {
- selected = /*super.*/transformSelectionToDomain(selected);
+ selected = /* super. */transformSelectionToDomain(selected);
return selected;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/deepHistory.svg b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/deepHistory.svg
new file mode 100644
index 00000000000..15f8d64bca2
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/deepHistory.svg
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="20" height="20" id="svg2" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="deepHistory.svg">
+ <defs id="defs4">
+ <linearGradient id="linearGradient3789">
+ <stop style="stop-color:#000005;stop-opacity:1;" offset="0" id="stop3791" />
+ <stop style="stop-color:white;stop-opacity:0;" offset="1" id="stop3793" />
+ </linearGradient>
+ <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 20 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="85 : 20 : 1" inkscape:persp3d-origin="42.5 : 13.333333 : 1" id="perspective3063" />
+ <linearGradient id="linearGradient3786">
+ <stop style="stop-color:#000000;stop-opacity:0;" offset="0" id="stop3788" />
+ <stop id="stop3794" offset="1" style="stop-color:#919cd7;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6" inkscape:cx="7.9165719" inkscape:cy="-13.962009" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" />
+ <metadata id="metadata7">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:groupmode="layer" id="layer2" inkscape:label="Calque">
+ <path sodipodi:type="star" style="fill:white;fill-opacity:1;stroke:black;stroke-opacity:1;stroke-width:1.3;stroke-miterlimit:4;stroke-dasharray:none" id="PapyrusPath" sodipodi:sides="16" sodipodi:cx="10.357143" sodipodi:cy="10.357143" sodipodi:r1="8.9731035" sodipodi:r2="8.9731035" sodipodi:arg1="0.82762657" sodipodi:arg2="1.0239761" inkscape:flatsided="false" inkscape:rounded="0" inkscape:randomized="0" d="M 16.428572,16.964287 L 15.022922,18.021809 L 13.437968,18.784783 L 11.73462,19.223887 L 9.9783361,19.322248 L 8.2366099,19.076084 L 6.5763743,18.494856 L 5.0614318,17.600901 L 3.7500003,16.428572 L 2.6924778,15.022922 L 1.9295039,13.437968 L 1.4903996,11.73462 L 1.3920393,9.9783361 L 1.6382028,8.2366099 L 2.2194305,6.5763743 L 3.1133857,5.0614318 L 4.2857147,3.7500003 L 5.6913651,2.6924778 L 7.2763189,1.9295039 L 8.9796668,1.4903996 L 10.735951,1.3920393 L 12.477677,1.6382028 L 14.137912,2.2194305 L 15.652855,3.1133857 L 16.964287,4.2857147 L 18.021809,5.6913651 L 18.784783,7.2763189 L 19.223887,8.9796668 L 19.322248,10.735951 L 19.076084,12.477677 L 18.494856,14.137912 L 17.600901,15.652855 z" transform="translate(-0.3571434,-0.3571434)" />
+ </g>
+ <g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1032.3617)" style="display:inline">
+ <text xml:space="preserve" style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:black;fill-opacity:1;stroke:none;font-family:Sans" x="6.25" y="7.5" id="text2993" sodipodi:linespacing="125%" transform="translate(-3.1305805,1039.8724)"><tspan sodipodi:role="line" id="tspan2995" x="6.25" y="7.5" style="font-size:14px">H</tspan></text>
+ <text xml:space="preserve" style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:black;fill-opacity:1;stroke:none;font-family:Sans" x="-38.75" y="12.857143" id="text2994" sodipodi:linespacing="125%" transform="translate(51.071428,1035.0402)"><tspan sodipodi:role="line" id="tspan2996" x="-38.75" y="12.857143" style="font-size:14px">*</tspan></text>
+ </g>
+</svg>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/durationObservation.svg b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/durationObservation.svg
new file mode 100644
index 00000000000..3f658349c4a
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/durationObservation.svg
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="20" height="20" id="svg3787" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="TimeObservation.svg">
+ <defs id="defs3789" />
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="7.8481082" inkscape:cx="-46.07925" inkscape:cy="14.291126" inkscape:current-layer="svg3787" showgrid="true" inkscape:grid-bbox="true" inkscape:document-units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" />
+ <metadata id="metadata3792">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer" transform="translate(0,4)" />
+ <text xml:space="preserve" style="font-size:12.61640644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:116.99999571%;letter-spacing:0px;word-spacing:0px;fill:#476caa;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial" x="1.0969616" y="10.079314" id="text3828" sodipodi:linespacing="117%" transform="matrix(1.0691606,0,0,0.93531316,-0.0887114,1.7064536)"><tspan sodipodi:role="line" x="1.0969616" y="10.079314" id="tspan3870" style="font-weight:bold;-inkscape-font-specification:Arial Bold">&amp;d<tspan style="font-size:8.83148575px;font-weight:bold;line-height:116.99999571%;fill:#476caa;fill-opacity:1;-inkscape-font-specification:Arial Bold" id="tspan3876" /></tspan></text>
+ <text xml:space="preserve" style="font-size:9.0160284px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#476caa;fill-opacity:1;stroke:none;font-family:Sans" x="5.4504604" y="19.354103" id="text3908" sodipodi:linespacing="125%" transform="matrix(1.2529306,0,0,0.7981288,2.0387078,1.5790345)"><tspan sodipodi:role="line" id="tspan3910" x="5.4504604" y="19.354103" style="font-weight:bold;-inkscape-font-specification:Sans Bold">l</tspan></text>
+</svg>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/shallowHistory.svg b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/shallowHistory.svg
new file mode 100644
index 00000000000..78039462f47
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/shallowHistory.svg
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="20" height="20" id="svg2" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="shallowHistory.svg">
+ <defs id="defs4">
+ <linearGradient id="linearGradient3789">
+ <stop style="stop-color:#000005;stop-opacity:1;" offset="0" id="stop3791" />
+ <stop style="stop-color:white;stop-opacity:0;" offset="1" id="stop3793" />
+ </linearGradient>
+ <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 20 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="85 : 20 : 1" inkscape:persp3d-origin="42.5 : 13.333333 : 1" id="perspective3063" />
+ <linearGradient id="linearGradient3786">
+ <stop style="stop-color:#000000;stop-opacity:0;" offset="0" id="stop3788" />
+ <stop id="stop3794" offset="1" style="stop-color:#919cd7;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6" inkscape:cx="7.9165719" inkscape:cy="-13.962009" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" />
+ <metadata id="metadata7">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:groupmode="layer" id="layer2" inkscape:label="Calque">
+ <path sodipodi:type="star" style="fill:white;fill-opacity:1;stroke:black;stroke-opacity:1;stroke-width:1.3;stroke-miterlimit:4;stroke-dasharray:none" id="PapyrusPath" sodipodi:sides="16" sodipodi:cx="10.357143" sodipodi:cy="10.357143" sodipodi:r1="8.9731035" sodipodi:r2="8.9731035" sodipodi:arg1="0.82762657" sodipodi:arg2="1.0239761" inkscape:flatsided="false" inkscape:rounded="0" inkscape:randomized="0" d="M 16.428572,16.964287 L 15.022922,18.021809 L 13.437968,18.784783 L 11.73462,19.223887 L 9.9783361,19.322248 L 8.2366099,19.076084 L 6.5763743,18.494856 L 5.0614318,17.600901 L 3.7500003,16.428572 L 2.6924778,15.022922 L 1.9295039,13.437968 L 1.4903996,11.73462 L 1.3920393,9.9783361 L 1.6382028,8.2366099 L 2.2194305,6.5763743 L 3.1133857,5.0614318 L 4.2857147,3.7500003 L 5.6913651,2.6924778 L 7.2763189,1.9295039 L 8.9796668,1.4903996 L 10.735951,1.3920393 L 12.477677,1.6382028 L 14.137912,2.2194305 L 15.652855,3.1133857 L 16.964287,4.2857147 L 18.021809,5.6913651 L 18.784783,7.2763189 L 19.223887,8.9796668 L 19.322248,10.735951 L 19.076084,12.477677 L 18.494856,14.137912 L 17.600901,15.652855 z" transform="translate(-0.3571434,-0.3571434)" />
+ </g>
+ <g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" transform="translate(0,-1032.3617)" style="display:inline">
+ <text xml:space="preserve" style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:black;fill-opacity:1;stroke:none;font-family:Sans" x="6.25" y="7.5" id="text2993" sodipodi:linespacing="125%" transform="translate(-1.3017578,1039.8724)"><tspan sodipodi:role="line" id="tspan2995" x="6.25" y="7.5" style="font-size:14px">H</tspan></text>
+ </g>
+</svg>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/timeObservation.svg b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/timeObservation.svg
new file mode 100644
index 00000000000..e4abb848686
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/icons/symbols/timeObservation.svg
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="20" height="20" id="svg3787" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="TimeObservation.svg">
+ <defs id="defs3789" />
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="7.8481082" inkscape:cx="-46.07925" inkscape:cy="13.972578" inkscape:current-layer="svg3787" showgrid="true" inkscape:grid-bbox="true" inkscape:document-units="px" inkscape:window-width="1920" inkscape:window-height="1005" inkscape:window-x="1591" inkscape:window-y="-9" inkscape:window-maximized="1" />
+ <metadata id="metadata3792">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer" transform="translate(0,4)" />
+ <text xml:space="preserve" style="font-size:12.61640644px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:116.99999571%;letter-spacing:0px;word-spacing:0px;fill:#476caa;fill-opacity:1;stroke:none;font-family:Arial;-inkscape-font-specification:Arial" x="1.0969616" y="10.079314" id="text3828" sodipodi:linespacing="117%" transform="matrix(1.0691606,0,0,0.93531316,1.9112886,1.7064536)"><tspan sodipodi:role="line" x="1.0969616" y="10.079314" id="tspan3870" dy="0 1.6874446" style="font-weight:bold;-inkscape-font-specification:Arial Bold"><tspan style="font-size:8.83148575000000060px;line-height:116.99999570999999000%;fill:#476caa;fill-opacity:1;font-weight:bold;-inkscape-font-specification:Arial Bold" id="tspan3876" dy="-1.6874446">@</tspan>t</tspan></text>
+ <text xml:space="preserve" style="font-size:9.0160284px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#476caa;fill-opacity:1;stroke:none;font-family:Sans" x="5.4504604" y="19.354103" id="text3908" sodipodi:linespacing="125%" transform="matrix(1.2529306,0,0,0.7981288,2.0387078,1.5790345)"><tspan sodipodi:role="line" id="tspan3910" x="5.4504604" y="19.354103" style="font-weight:bold;-inkscape-font-specification:Sans Bold">l</tspan></text>
+</svg>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/AbstractBorderEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/AbstractBorderEditPart.java
index 7811c76d3dd..cf89116e669 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/AbstractBorderEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/AbstractBorderEditPart.java
@@ -20,7 +20,7 @@ import org.eclipse.gmf.runtime.notation.View;
/**
* Abstract EditPart for Border elements like Port
*/
-public abstract class AbstractBorderEditPart extends BorderNamedElementEditPart implements IUMLNamedElementEditPart {
+public abstract class AbstractBorderEditPart extends RoundedBorderNamedElementEditPart implements IUMLNamedElementEditPart {
/** Constructor */
public AbstractBorderEditPart(View view) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/AbstractInteractionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/AbstractInteractionEditPart.java
new file mode 100644
index 00000000000..45597f5676b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/AbstractInteractionEditPart.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.common.editparts;
+
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @author Mickael ADAM
+ *
+ */
+public abstract class AbstractInteractionEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public AbstractInteractionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultHasHeader()
+ *
+ * @return
+ */
+ @Override
+ protected boolean getDefaultHasHeader() {
+ return true;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#getDefaultNamePosition()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultNamePosition() {
+ return PositionConstants.LEFT;
+ }
+
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassEditPart.java
new file mode 100644
index 00000000000..0dea54d7ab4
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassEditPart.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - moved class behavior from classiferEditPart
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.common.editparts;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+
+/**
+ * Class edit part.
+ *
+ */
+public abstract class ClassEditPart extends ClassifierEditPart {
+
+ /**
+ * Instantiates a new class edit part.
+ *
+ * @param view
+ * the view
+ */
+ public ClassEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart#refreshVisuals()
+ *
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ if(getPrimaryShape() != null && resolveSemanticElement() != null) {
+ refreshIsActive();
+ }
+ }
+
+ /**
+ * Refresh is active.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart#refreshIsActive()
+ */
+ protected void refreshIsActive() {
+ if(getUMLElement() instanceof org.eclipse.uml2.uml.Class) {
+ if(getPrimaryShape() instanceof ClassifierFigure) {
+ ((ClassFigure)getPrimaryShape()).setActive(((org.eclipse.uml2.uml.Class)getUMLElement()).isActive());
+ }
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassifierEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassifierEditPart.java
index e627fb7196e..3f70c2f8c17 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassifierEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/ClassifierEditPart.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Thibault Landre (Atos Origin) - Initial API and implementation
+ * Mickaël ADAM (ALL4TEC) - mickael.adam@all4tec.net - moved class behavior to classEditPart
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.editparts;
@@ -15,7 +16,6 @@ package org.eclipse.papyrus.uml.diagram.common.editparts;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gmf.runtime.notation.FontStyle;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
import org.eclipse.papyrus.uml.diagram.common.helper.BasicClassifierCompartmentLayoutHelper;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.FontData;
@@ -27,7 +27,7 @@ import org.eclipse.uml2.uml.UMLPackage;
*
* @author tlandre
*/
-public abstract class ClassifierEditPart extends NamedElementEditPart {
+public abstract class ClassifierEditPart extends RoundedCompartmentEditPart {
/**
* isAbstract Classifier property
@@ -65,15 +65,6 @@ public abstract class ClassifierEditPart extends NamedElementEditPart {
super.refreshVisuals();
if (getPrimaryShape() != null && resolveSemanticElement() != null) {
refreshAbstract();
- refreshIsActive();
- }
- }
-
- protected void refreshIsActive() {
- if (getUMLElement() instanceof org.eclipse.uml2.uml.Class) {
- if (getPrimaryShape() instanceof ClassifierFigure) {
- ((ClassifierFigure) getPrimaryShape()).setActive(((org.eclipse.uml2.uml.Class) getUMLElement()).isActive());
- }
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/FloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/FloatingLabelEditPart.java
new file mode 100644
index 00000000000..5b6f61cf08e
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/FloatingLabelEditPart.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.editparts;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.MaskManagedFloatingLabelEditPolicy;
+
+/**
+ * The Class FloatingNameEditPart.
+ */
+public class FloatingLabelEditPart extends PapyrusLabelEditPart {
+
+ /** The Constant DISPLAY_FLOATING_NAME. */
+ public static final String DISPLAY_FLOATING_LABEL = "visible";
+
+ // private static final String DISPLAY_FLOATING_LABEL = "displayFloatingLabel";
+
+
+ /** The Constant DEFAULT_LABEL_DISPLAYED. */
+ private static final boolean DEFAULT_LABEL_DISPLAYED = false;
+
+ /**
+ * Instantiates a new floating label edit part.
+ *
+ * @param view
+ * the view
+ */
+ public FloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ // installEditPolicy(org.eclipse.papyrus.uml.diagram.common.editpolicies.ExternalLabelDisplayEditPolicy.EXTERNAL_LABEL_POLICY, new ExternalLabelDisplayEditPolicy());
+ installEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL, new MaskManagedFloatingLabelEditPolicy());
+ // installEditPolicy("test", new FeedBackFloatingLabelEditPolicy());
+
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#refreshVisibility()
+ *
+ */
+ @Override
+ protected void refreshVisibility() {
+ super.refreshVisibility();
+ // get the value of the CSS property
+ boolean isLabelDisplayed = NotationUtils.getBooleanValue((View) getModel(), DISPLAY_FLOATING_LABEL, getDefaultLabelVisibility());
+
+ // Set the visibility of the label
+ getFigure().setVisible(isLabelDisplayed);
+ }
+
+ /**
+ * Gets the default label displayed value.
+ *
+ * @return the default label displayed value
+ */
+ protected boolean getDefaultLabelVisibility() {
+ return DEFAULT_LABEL_DISPLAYED;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/NamedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/NamedElementEditPart.java
index ccb6fea4c6b..a95fe1018f5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/NamedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/NamedElementEditPart.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2008-2014 CEA LIST.
- *
+ * Copyright (c) 2010, 2014 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,8 +7,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Céline Janssens (ALL4TEC) celine.janssens@all4tec.net - Bug 440230 : Label Margin
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.editparts;
@@ -17,10 +15,12 @@ package org.eclipse.papyrus.uml.diagram.common.editparts;
import java.util.List;
import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.BooleanValueStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.StringValueStyle;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNo
import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.FigureUtils;
import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeNamedElementFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.uml2.uml.NamedElement;
@@ -42,39 +43,28 @@ import org.eclipse.uml2.uml.NamedElement;
*/
public abstract class NamedElementEditPart extends UMLNodeEditPart implements IUMLNamedElementEditPart {
- /**
- * CSS boolean property controlling whether stereotypes should be displayed
- */
+ /** The Constant NAME_POSITION. */
+ public static final String NAME_POSITION = "namePosition";
+
+ /** CSS boolean property controlling whether stereotypes should be displayed. */
public static final String DISPLAY_STEREOTYPES = "displayStereotypes"; // $NON-NLS$
- /**
- * CSS boolean property controlling whether tags should be displayed
- */
+ /** CSS boolean property controlling whether tags should be displayed. */
public static final String DISPLAY_TAGS = "displayTags"; // $NON-NLS$
- /**
- * Default Margin when not present in CSS
- */
+ /** Default Margin when not present in CSS. */
public static final int DEFAULT_MARGIN = 0;
- /**
- * CSS Integer property to define the horizontal Label Margin
- */
+ /** CSS Integer property to define the horizontal Label Margin. */
public static final String TOP_MARGIN_PROPERTY = "topMarginLabel"; // $NON-NLS$
- /**
- * CSS Integer property to define the vertical Label Margin
- */
+ /** CSS Integer property to define the vertical Label Margin. */
public static final String LEFT_MARGIN_PROPERTY = "leftMarginLabel"; // $NON-NLS$
- /**
- * CSS Integer property to define the horizontal Label Margin
- */
+ /** CSS Integer property to define the horizontal Label Margin. */
public static final String BOTTOM_MARGIN_PROPERTY = "bottomMarginLabel"; // $NON-NLS$
- /**
- * CSS Integer property to define the vertical Label Margin
- */
+ /** CSS Integer property to define the vertical Label Margin. */
public static final String RIGHT_MARGIN_PROPERTY = "rightMarginLabel"; // $NON-NLS$
@@ -86,6 +76,11 @@ public abstract class NamedElementEditPart extends UMLNodeEditPart implements IU
super(view);
}
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.IUMLNamedElementEditPart#getNamedElement()
+ *
+ * @return
+ */
@Override
public NamedElement getNamedElement() {
return (NamedElement) getUMLElement();
@@ -106,11 +101,30 @@ public abstract class NamedElementEditPart extends UMLNodeEditPart implements IU
}
}
+ /**
+ * Refresh icon named label.
+ */
private void refreshIconNamedLabel() {
getNodeNamedElementFigure().setNameLabelIcon(AppearanceHelper.showElementIcon((View) getModel()));
}
+ /**
+ * Refresh.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart#refresh()
+ */
+ @Override
+ public void refresh() {
+ refreshNamePosition();
+ super.refresh();
+ }
+
+ /**
+ * Refresh visuals.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart#refreshVisuals()
+ */
@Override
protected void refreshVisuals() {
super.refreshVisuals();
@@ -120,10 +134,55 @@ public abstract class NamedElementEditPart extends UMLNodeEditPart implements IU
refreshLabelDisplay();
refreshLabelMargin();
}
+ }
+
+
+ /**
+ * Refresh name position.
+ */
+ private void refreshNamePosition() {
+ if (getPrimaryShape() instanceof NodeNamedElementFigure) {
+ ((NodeNamedElementFigure) getPrimaryShape()).setNamePosition(getNamePosition());
+ }
+ }
+
+ /**
+ * Gets the name position.
+ *
+ * @return the name position
+ */
+ public int getNamePosition() {
+ // get the value of the CSS property
+ View model = (View) getModel();
+ StringValueStyle labelAlignment = (StringValueStyle) model.getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), NAME_POSITION);
+
+ int textAlignment = 0;
+ if (labelAlignment != null) {
+ if ("left".equals(labelAlignment.getStringValue())) {
+ textAlignment = PositionConstants.LEFT;
+ }
+ if ("right".equals(labelAlignment.getStringValue())) {
+ textAlignment = PositionConstants.RIGHT;
+ }
+ if ("center".equals(labelAlignment.getStringValue())) {
+ textAlignment = PositionConstants.CENTER;
+ }
+ } else {
+ textAlignment = getDefaultNamePosition();
+ }
+ return textAlignment;
}
+ /**
+ * Gets the default name position.
+ *
+ * @return the default name position
+ */
+ protected int getDefaultNamePosition() {
+ return PositionConstants.CENTER;
+ }
/**
* Refresh margin of named element children labels
@@ -132,6 +191,7 @@ public abstract class NamedElementEditPart extends UMLNodeEditPart implements IU
* <li>Get all the children figure</li>
* <li>If the child is a label then apply the margin</li>
* </ul>
+ * .
*/
private void refreshLabelMargin() {
IFigure figure = null;
@@ -167,11 +227,18 @@ public abstract class NamedElementEditPart extends UMLNodeEditPart implements IU
}
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#activate()
+ *
+ */
@Override
public void activate() {
super.activate();
}
+ /**
+ * Refresh label display.
+ */
protected void refreshLabelDisplay() {
View view = getNotationView();
// SVGNodePlate can be null!
@@ -227,6 +294,11 @@ public abstract class NamedElementEditPart extends UMLNodeEditPart implements IU
}
}
+ /**
+ * Gets the node named element figure.
+ *
+ * @return the node named element figure
+ */
private IPapyrusNodeNamedElementFigure getNodeNamedElementFigure() {
return (IPapyrusNodeNamedElementFigure) getPrimaryShape();
}
@@ -248,6 +320,10 @@ public abstract class NamedElementEditPart extends UMLNodeEditPart implements IU
}
}
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart#createDefaultEditPolicies()
+ *
+ */
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
@@ -255,6 +331,11 @@ public abstract class NamedElementEditPart extends UMLNodeEditPart implements IU
installEditPolicy(FollowSVGSymbolEditPolicy.FOLLOW_SVG_SYMBOL_EDITPOLICY, new FollowSVGSymbolEditPolicy());
}
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart#createNodeFigure()
+ *
+ * @return
+ */
@Override
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedBorderNamedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedBorderNamedElementEditPart.java
new file mode 100644
index 00000000000..93c1e2ec40f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedBorderNamedElementEditPart.java
@@ -0,0 +1,189 @@
+package org.eclipse.papyrus.uml.diagram.common.editparts;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.PapyrusRoundedEditPartHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
+
+
+public abstract class RoundedBorderNamedElementEditPart extends BorderNamedElementEditPart {
+
+ /** The port position namedStyle property */
+ private static final String PORT_POSITION = "portPosition";
+
+ /** The Constant DEFAULT_BORDER_STYLE. */
+ private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_SOLID;
+
+ /** The Constant DEFAULT_CORNER_HEIGHT. */
+ private static final int DEFAULT_CORNER_HEIGHT = 0;
+
+ /** The Constant DEFAULT_CORNER_WIDTH. */
+ private static final int DEFAULT_CORNER_WIDTH = 0;
+
+ private static final int[] DEFAULT_CUTOM_DASH = new int[] { 5, 5 };
+
+ /** The Constant DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT. */
+ private static final int DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT = 0;
+
+ /** The Constant DEFAULT_FLOATING_LABEL_OFFSET_WIDTH. */
+ private static final int DEFAULT_FLOATING_LABEL_OFFSET_WIDTH = 0;
+
+ /** The Constant DEFAULT_IS_FLOATING_LABEL_CONSTRAINED. */
+ private static final boolean DEFAULT_IS_FLOATING_LABEL_CONSTRAINED = false;
+
+ /** The Constant DEFAULT_IS_OVAL. */
+ private static final boolean DEFAULT_IS_OVAL = false;
+
+ private static final boolean DEFAULT_USE_ORIGINAL_COLORS = true;
+
+ private static final boolean DEFAULT_HAS_HEADER = false;
+
+ private static final String DEFAULT_PORT_POSITION_VALUE = "onLine";
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public RoundedBorderNamedElementEditPart(View view) {
+ super(view);
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ // Install Edit Policy to Hide/show compartment, in particular for the symbol compartment
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ }
+
+ /**
+ * Gets the default border style.
+ *
+ * @return the default border style
+ */
+ protected int getDefaultBorderStyle() {
+ return DEFAULT_BORDER_STYLE;
+ }
+
+ /**
+ * Gets the default corner height value.
+ *
+ * @return the default corner height value
+ */
+ protected int getDefaultCornerHeight() {
+ return DEFAULT_CORNER_HEIGHT;
+ }
+
+
+ /**
+ * Gets the default corner width value.
+ *
+ * @return the default corner width value
+ */
+ protected int getDefaultCornerWidth() {
+ return DEFAULT_CORNER_WIDTH;
+ }
+
+ private int[] getDefaultCutomDash() {
+ return DEFAULT_CUTOM_DASH;
+ }
+
+ /**
+ * Gets the default floating name offset height.
+ *
+ * @return the default floating name offset height
+ */
+ protected int getDefaultFloatingLabelOffsetHeight() {
+ return DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT;
+ }
+
+ /**
+ * Gets the default floating name offset width.
+ *
+ * @return the default floating name offset width
+ */
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return DEFAULT_FLOATING_LABEL_OFFSET_WIDTH;
+ }
+
+ /**
+ * Gets the default is name constrained.
+ *
+ * @return the default is name constrained
+ */
+ protected boolean getDefaultIsFloatingNameConstrained() {
+ return DEFAULT_IS_FLOATING_LABEL_CONSTRAINED;
+ }
+
+ /**
+ * Gets the default is oval value.
+ *
+ * @return the default is oval value
+ */
+ protected boolean getDefaultIsOvalValue() {
+ return DEFAULT_IS_OVAL;
+ }
+
+ /**
+ * @return
+ */
+ private boolean getDefaultUseOriginalColors() {
+ return DEFAULT_USE_ORIGINAL_COLORS;
+ }
+
+ /**
+ * Refresh visuals.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#refreshVisuals()
+ */
+ @Override
+ protected void refreshVisuals() {
+ PapyrusRoundedEditPartHelper.refreshRadius(this, getDefaultCornerWidth(), getDefaultCornerHeight());
+ PapyrusRoundedEditPartHelper.refreshOval(this, getDefaultIsOvalValue());
+ PapyrusRoundedEditPartHelper.refreshFloatingName(this, getDefaultIsFloatingNameConstrained(), getDefaultFloatingLabelOffsetWidth(), getDefaultFloatingLabelOffsetHeight());
+ PapyrusRoundedEditPartHelper.refreshBorderStyle(this, getDefaultBorderStyle(), getDefaultCutomDash());
+ PapyrusRoundedEditPartHelper.refreshSVGOriginalColors(this, getDefaultUseOriginalColors());
+ PapyrusRoundedEditPartHelper.refreshHasHeader(this, getDefaultHasHeader());
+ refreshPortPosition();
+ super.refreshVisuals();
+ }
+
+ /**
+ * Refresh the port position
+ */
+ private void refreshPortPosition() {
+ if (getPrimaryShape() instanceof IRoundedRectangleFigure) {
+ if (getModel() instanceof View) {
+ Object constraint = ((AbstractBorderedShapeEditPart) getParent()).getBorderedFigure().getBorderItemContainer().getLayoutManager().getConstraint(getFigure());
+ if (constraint instanceof PortPositionLocator) {
+ PortPositionLocator portLocator = (PortPositionLocator) constraint;
+ String position = NotationUtils.getStringValue((View) getModel(), PORT_POSITION, "onLine");
+ portLocator.setPortPosition(position);
+ }
+ }
+ }
+ }
+
+ /**
+ * get the default Port Position(can be inside, outside or onLine).
+ */
+ protected String getDefaultPortPosition() {
+ return DEFAULT_PORT_POSITION_VALUE;
+ }
+
+ /**
+ * @return
+ */
+ protected boolean getDefaultHasHeader() {
+ return DEFAULT_HAS_HEADER;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedCompartmentEditPart.java
new file mode 100644
index 00000000000..281df051d41
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/RoundedCompartmentEditPart.java
@@ -0,0 +1,180 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.editparts;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.helper.PapyrusRoundedEditPartHelper;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+
+/**
+ * The Class RoundedCompartmentEditPart.
+ */
+public abstract class RoundedCompartmentEditPart extends NamedElementEditPart {
+
+ /** The Constant DEFAULT_HAS_HEADER. True if has a header, as interaction figure */
+ private static final boolean DEFAULT_HAS_HEADER = false;
+
+ /** The Constant DEFAULT_BORDER_STYLE. */
+ private static final int DEFAULT_BORDER_STYLE = Graphics.LINE_SOLID;
+
+ /** The Constant DEFAULT_CORNER_HEIGHT. */
+ private static final int DEFAULT_CORNER_HEIGHT = 0;
+
+ /** The Constant DEFAULT_CORNER_WIDTH. */
+ private static final int DEFAULT_CORNER_WIDTH = 0;
+
+ private static final int[] DEFAULT_CUTOM_DASH = new int[] { 5, 5 };
+
+ /** The Constant DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT. */
+ private static final int DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT = 0;
+
+ /** The Constant DEFAULT_FLOATING_LABEL_OFFSET_WIDTH. */
+ private static final int DEFAULT_FLOATING_LABEL_OFFSET_WIDTH = 0;
+
+ /** The Constant DEFAULT_IS_FLOATING_LABEL_CONSTRAINED. */
+ private static final boolean DEFAULT_IS_FLOATING_LABEL_CONSTRAINED = false;
+
+ /** The Constant DEFAULT_IS_OVAL. */
+ private static final boolean DEFAULT_IS_OVAL = false;
+
+ /** The Constant DEFAULT_USE_ORIGINAL_COLORS. */
+ private static final boolean DEFAULT_USE_ORIGINAL_COLORS = true;
+
+ /**
+ * Instantiates a new rounded compartment edit part.
+ *
+ * @param view
+ * the view
+ */
+ public RoundedCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * Creates the default edit policies.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#createDefaultEditPolicies()
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ // Install Edit Policy to Hide/show compartment, in particular for the symbol compartment
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ }
+
+ /**
+ * Gets the default border style.
+ *
+ * @return the default border style
+ */
+ protected int getDefaultBorderStyle() {
+ return DEFAULT_BORDER_STYLE;
+ }
+
+ /**
+ * Gets the default corner height value.
+ *
+ * @return the default corner height value
+ */
+ protected int getDefaultCornerHeight() {
+ return DEFAULT_CORNER_HEIGHT;
+ }
+
+ /**
+ * Gets the default corner width value.
+ *
+ * @return the default corner width value
+ */
+ protected int getDefaultCornerWidth() {
+ return DEFAULT_CORNER_WIDTH;
+ }
+
+ /**
+ * Gets the default cutom dash.
+ *
+ * @return the default cutom dash
+ */
+ private int[] getDefaultCutomDash() {
+ return DEFAULT_CUTOM_DASH;
+ }
+
+ /**
+ * Gets the default floating name offset height.
+ *
+ * @return the default floating name offset height
+ */
+ protected int getDefaultFloatingLabelOffsetHeight() {
+ return DEFAULT_FLOATING_LABEL_OFFSET_HEIGHT;
+ }
+
+ /**
+ * Gets the default floating name offset width.
+ *
+ * @return the default floating name offset width
+ */
+ protected int getDefaultFloatingLabelOffsetWidth() {
+ return DEFAULT_FLOATING_LABEL_OFFSET_WIDTH;
+ }
+
+ /**
+ * Gets the default is name constrained.
+ *
+ * @return the default is name constrained
+ */
+ protected boolean getDefaultIsFloatingNameConstrained() {
+ return DEFAULT_IS_FLOATING_LABEL_CONSTRAINED;
+ }
+
+ /**
+ * Gets the default is oval value.
+ *
+ * @return the default is oval value
+ */
+ protected boolean getDefaultIsOvalValue() {
+ return DEFAULT_IS_OVAL;
+ }
+
+ /**
+ * Gets the default setting of use original colors.
+ *
+ * @return the default use original colors
+ */
+ protected boolean getDefaultUseOriginalColors() {
+ return DEFAULT_USE_ORIGINAL_COLORS;
+ }
+
+ /**
+ * Refresh visuals.
+ *
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#refreshVisuals()
+ */
+ @Override
+ protected void refreshVisuals() {
+ // Refresh all visual settings for the Rounded Compartment Figure child
+ PapyrusRoundedEditPartHelper.refreshRadius(this, getDefaultCornerWidth(), getDefaultCornerHeight());
+ PapyrusRoundedEditPartHelper.refreshOval(this, getDefaultIsOvalValue());
+ PapyrusRoundedEditPartHelper.refreshFloatingName(this, getDefaultIsFloatingNameConstrained(), getDefaultFloatingLabelOffsetWidth(), getDefaultFloatingLabelOffsetHeight());
+ PapyrusRoundedEditPartHelper.refreshBorderStyle(this, getDefaultBorderStyle(), getDefaultCutomDash());
+ PapyrusRoundedEditPartHelper.refreshSVGOriginalColors(this, getDefaultUseOriginalColors());
+ PapyrusRoundedEditPartHelper.refreshHasHeader(this, getDefaultHasHeader());
+ super.refreshVisuals();
+ }
+
+ /**
+ * @return
+ */
+ protected boolean getDefaultHasHeader() {
+ return DEFAULT_HAS_HEADER;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/BorderItemResizableEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/BorderItemResizableEditPolicy.java
index b259fe07015..44cd007701d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/BorderItemResizableEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/BorderItemResizableEditPolicy.java
@@ -96,6 +96,7 @@ public class BorderItemResizableEditPolicy extends ResizableShapeEditPolicy {
rect.resize(request.getSizeDelta());
getHostFigure().translateToRelative(rect);
Rectangle realLocation = borderItemLocator.getValidLocation(rect.getCopy(), borderItemEP.getFigure());
+ realLocation.translate(-borderItemEP.getFigure().getSize().width / 2, -borderItemEP.getFigure().getSize().height / 2);
getHostFigure().translateToAbsolute(realLocation);
feedback.translateToRelative(realLocation);
feedback.setBounds(realLocation);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/ConstrainedItemBorderLayoutEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/ConstrainedItemBorderLayoutEditPolicy.java
index 7eeb8b7b31e..d172be41470 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/ConstrainedItemBorderLayoutEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/ConstrainedItemBorderLayoutEditPolicy.java
@@ -33,6 +33,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
/**
* @author Patrick Tessier
@@ -65,7 +66,7 @@ public class ConstrainedItemBorderLayoutEditPolicy extends ConstrainedLayoutEdit
*/
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
- if (child instanceof IBorderItemEditPart) {
+ if ((child instanceof IBorderItemEditPart) && !(child instanceof FloatingLabelEditPart)) {
// return new BorderItemSelectionEditPolicy();
return new BorderItemResizableEditPolicy();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/MaskManagedFloatingLabelEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/MaskManagedFloatingLabelEditPolicy.java
new file mode 100644
index 00000000000..40e1d1ebd95
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/MaskManagedFloatingLabelEditPolicy.java
@@ -0,0 +1,248 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.editpolicies;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Map;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.diagram.common.helper.FloatingLabelHelper;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.MultiplicityElement;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Signal;
+import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Specific edit policy for label displaying stereotypes and their properties for edges representing
+ * UML elements.
+ */
+public class MaskManagedFloatingLabelEditPolicy extends AbstractMaskManagedEditPolicy {
+
+ /**
+ * Creates a new PropertyLabelEditPolicy.
+ */
+ public MaskManagedFloatingLabelEditPolicy() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void addAdditionalListeners() {
+ super.addAdditionalListeners();
+ NamedElement umlElement = getUMLElement();
+ // check host semantic element is not null
+ if (umlElement == null) {
+ Activator.log.error("No semantic element present when adding listeners in FloatingLabelEditPolicy", null);
+ return;
+ }
+ // adds a listener to the element itself, and to linked elements, like Type
+ if (umlElement instanceof TypedElement) {
+ if (((TypedElement) umlElement).getType() != null) {
+ getDiagramEventBroker().addNotificationListener(((TypedElement) umlElement).getType(), this);
+ }
+ }
+ if (umlElement instanceof MultiplicityElement) {
+ getDiagramEventBroker().addNotificationListener(((MultiplicityElement) umlElement).getUpperValue(), this);
+ getDiagramEventBroker().addNotificationListener(((MultiplicityElement) umlElement).getLowerValue(), this);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<String> getDefaultDisplayValue() {
+ NamedElement umlElement = getUMLElement();
+ if (umlElement != null) {
+
+ /**
+ * default uml operation display.
+ */
+ if (umlElement instanceof Operation) {
+ return ICustomAppearance.DEFAULT_UML_OPERATION;
+ }
+
+ /**
+ * default uml Port ins composite diagrams.
+ */
+ if (umlElement instanceof Port) {
+ return ICustomAppearance.DEFAULT_UML_PORT;
+ }
+
+ /**
+ * default uml Parameter in composite diagrams.
+ */
+ if (umlElement instanceof Parameter) {
+ return ICustomAppearance.DEFAULT_UML_PARAMETER;
+ }
+
+ /**
+ * default uml instancespecification .
+ */
+ if (umlElement instanceof InstanceSpecification) {
+ return ICustomAppearance.DEFAULT_UML_INSTANCESPECIFICATION;
+ }
+
+ /**
+ * default uml Signal .
+ */
+ if (umlElement instanceof Signal) {
+ return Arrays.asList(ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_TYPE);
+ }
+
+ }
+ return ICustomAppearance.DEFAULT_UML_FLOATING_LABEL;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map<String, String> getMasks() {
+ return FloatingLabelHelper.getInstance().getMasks();
+ }
+
+ /**
+ * {@inheritedDoc}.
+ *
+ * @return the UML element
+ */
+ @Override
+ public NamedElement getUMLElement() {
+ EObject element = super.getUMLElement();
+ if (element instanceof NamedElement) {
+ return (NamedElement) element;
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritedDoc}.
+ *
+ * @param notification
+ * the notification
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ super.notifyChanged(notification);
+ // change the label of the figure managed by the host edit part (managed by the parent edit
+ // part in general...)
+ // it must be changed only if:
+ // - the annotation corresponding to the display of the stereotype changes
+ // - the stereotype application list has changed
+ Object object = notification.getNotifier();
+ NamedElement property = getUMLElement();
+ if (object == null || property == null) {
+ return;
+ }
+ if (notification.getFeature().equals(UMLPackage.eINSTANCE.getLiteralInteger_Value())) {
+ refreshDisplay();
+ } else if (notification.getFeature().equals(UMLPackage.eINSTANCE.getLiteralUnlimitedNatural_Value())) {
+ refreshDisplay();
+ }
+ if (object.equals(property)) {
+ notifyNamedElementChanged(property, notification);
+ }
+ if (isMaskManagedAnnotation(object)) {
+ refreshDisplay();
+ }
+ if (isRemovedMaskManagedLabelAnnotation(object, notification)) {
+ refreshDisplay();
+ }
+ }
+
+ /**
+ * notifies that the named element has changed.
+ *
+ * @param namedElement
+ * the property that has changed
+ * @param notification
+ * the notification send when the element has been changed
+ */
+ protected void notifyNamedElementChanged(NamedElement namedElement, Notification notification) {
+ switch (notification.getFeatureID(NamedElement.class)) {
+ case UMLPackage.NAMED_ELEMENT__NAME:
+ refreshDisplay();
+ break;
+ case UMLPackage.NAMED_ELEMENT__VISIBILITY:
+ refreshDisplay();
+ break;
+ default:
+ // does nothing in other cases
+ break;
+ }
+ }
+
+ /**
+ * Returns the view controlled by the host edit part.
+ *
+ * @return the view controlled by the host edit part
+ */
+ @Override
+ protected View getView() {
+ if (getHost().getModel() instanceof View) {
+ if (((View) getHost().getModel()).eContainer() instanceof View) {
+ return (View) ((View) getHost().getModel()).eContainer();
+ }
+ return null;
+ }
+ return null;
+ }
+
+
+ /**
+ * Refreshes the display of the edit part.
+ */
+ @Override
+ public void refreshDisplay() {
+ // calls the helper for this edit Part
+ FloatingLabelHelper.getInstance().refreshEditPartDisplay((GraphicalEditPart) getHost());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void removeAdditionalListeners() {
+ super.removeAdditionalListeners();
+ NamedElement umlElement = getUMLElement();
+ if (umlElement == null) {
+ // check semantic element is not null and this is really an instance of NamedElement
+ return;
+ }
+ // remove listener to the element itself, and to linked elements, like Type
+ if (umlElement instanceof TypedElement) {
+ if (((TypedElement) umlElement).getType() != null) {
+ getDiagramEventBroker().removeNotificationListener(((TypedElement) umlElement).getType(), this);
+ }
+ }
+ if (umlElement instanceof MultiplicityElement) {
+ getDiagramEventBroker().removeNotificationListener(((MultiplicityElement) umlElement).getUpperValue(), this);
+ getDiagramEventBroker().removeNotificationListener(((MultiplicityElement) umlElement).getLowerValue(), this);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AffixedNamedElementFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AffixedNamedElementFigure.java
index 4ab975e0ff3..d6bc4b26b68 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AffixedNamedElementFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AffixedNamedElementFigure.java
@@ -24,7 +24,7 @@ import org.eclipse.swt.graphics.Image;
* Figure for Affixed NamedElement representation. The name label is shown as an
* external label.
*/
-public class AffixedNamedElementFigure extends NodeNamedElementFigure {
+public class AffixedNamedElementFigure extends RoundedCompartmentFigure {
/** Container for icon (stereotype icon) */
// protected ScalableImageFigure icon;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java
index 56d18cb91b9..9baab5ce45e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java
@@ -80,6 +80,7 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout {
collectInformation(container);
int minimumWith = 0;
int minimumHeight = 0;
+ // CompartementFigure shall be replace by RoundedCompartmentFigure and this condition may be remove
if (container instanceof CompartmentFigure) {
CompartmentFigure cf = (CompartmentFigure) container;
WrappingLabel wl = cf.getNameLabel();
@@ -90,11 +91,25 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout {
}
}
}
+ if (container instanceof RoundedCompartmentFigure) {
+ RoundedCompartmentFigure cf = (RoundedCompartmentFigure) container;
+ WrappingLabel wl = cf.getNameLabel();
+ // display name
+ if (wl != null && container.getChildren().contains(wl)) {
+ if (wl.getPreferredSize().width > minimumWith) {
+ minimumWith = wl.getPreferredSize().width + 2;
+ }
+ }
+
+ }
if (!visibleCompartments.isEmpty()) {
for (Object o : container.getChildren()) {
- IFigure child = (IFigure) o;
- minimumHeight += child.getPreferredSize().height;
- minimumWith = Math.max(minimumWith, child.getPreferredSize().width);
+ //only for child which are compartment
+ if (o instanceof ResizableCompartmentFigure) {
+ IFigure child = (IFigure) o;
+ minimumHeight += child.getPreferredSize().height;
+ minimumWith = Math.max(minimumWith, child.getPreferredSize().width);
+ }
}
} else {
for (IFigure child : visibleOthers) {
@@ -112,7 +127,7 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout {
*/
@Override
public Dimension getMinimumSize(IFigure container, int wHint, int hHint) {
- return new Dimension(20, 20);
+ return new Dimension(10, 10);
}
/**
@@ -180,16 +195,15 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout {
}
if (previous != null) {
bound.y = previous.getBounds().getBottomLeft().y + 1;
- bound.x = container.x + 3;
+ bound.x = container.x + 1;
bound.width = container.width;
} else {
- bound.x = container.x + 3;
+ bound.x = container.x + 1;
// in the case where the content is grater than the container
// it is forbidden to change the y coordinate
if (((container.height - totalHeight) / 2) > 0) {
bound.y = container.y + ((container.height - totalHeight) / 2);
- }
- else {
+ } else {
bound.y = container.y;
}
bound.width = container.width;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ClassFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ClassFigure.java
new file mode 100644
index 00000000000..b23752b2da0
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ClassFigure.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2008 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure.node;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+
+/**
+ * Represents a class.
+ */
+public class ClassFigure extends ClassifierFigure {
+
+ protected static final int SPACE_FOR_ACTIVE_CLASS = 4;
+
+ /* to present the class as an active class */
+ /** The active. Default value is false */
+ private boolean active = false;
+
+ /**
+ * Default Constructor
+ */
+ public ClassFigure() {
+ this(null);
+ }
+
+ /**
+ * Create a new Classifier figure with the given tag
+ *
+ * @param tagLabel
+ * a String that will be displayed at the top of the figure
+ */
+ public ClassFigure(String tagLabel) {
+ super(tagLabel);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void paint(Graphics graphics) {
+ super.paint(graphics);
+ if(active) {
+ Rectangle rect = this.getBounds();
+ graphics.pushState();
+ graphics.setForegroundColor(getForegroundColor());
+ // do not forget to set line width to 1, if not the color will
+ // change because of the anti-aliasing
+ graphics.setLineWidth(1);
+
+ graphics.drawLine(new Point(rect.x + SPACE_FOR_ACTIVE_CLASS, rect.y), new Point(rect.x + SPACE_FOR_ACTIVE_CLASS, rect.y + rect.height - 1));
+ graphics.drawLine(new Point(rect.x - SPACE_FOR_ACTIVE_CLASS - 1 + rect.width, rect.y), new Point(rect.x - SPACE_FOR_ACTIVE_CLASS - 1 + rect.width, rect.y + rect.height - 1));
+ graphics.setBackgroundColor(getBackgroundColor());
+ graphics.setForegroundColor(getBackgroundColor());
+ graphics.setLineWidth(3);
+
+ graphics.drawLine(new Point(rect.x + 2, rect.y + 1), new Point(rect.x + 2, rect.y + rect.height - 2));
+ graphics.drawLine(new Point(rect.x - 3 + rect.width, rect.y + 1), new Point(rect.x - 3 + rect.width, rect.y + rect.height - 2));
+
+ graphics.popState();
+ }
+ }
+
+ /**
+ * Checks if is active.
+ *
+ * @return true, if is active
+ */
+ // @unused
+ public boolean isActive() {
+ return active;
+ }
+
+ /**
+ * Set the active
+ *
+ * @param active
+ */
+ public void setActive(boolean active) {
+ this.active = active;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ClassifierFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ClassifierFigure.java
index d45a9be93dd..d2621553b3c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ClassifierFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ClassifierFigure.java
@@ -9,6 +9,7 @@
*
* Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Mickaël ADAM (ALL4TEC) - mickael.adam@all4tec.net - moved class behavior to classEditPart
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.figure.node;
@@ -16,21 +17,12 @@ package org.eclipse.papyrus.uml.diagram.common.figure.node;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
/**
* Represents a classifier.
*/
-public class ClassifierFigure extends CompartmentFigure {
-
- protected static final int SPACE_FOR_ACTIVE_CLASS = 4;
-
- /* to present the class as an active class */
- /** The active. Default value is false */
- private boolean active = false;
+public class ClassifierFigure extends RoundedCompartmentFigure {
/** The Attribute Compartment */
private final static String ATTRIBUTE_COMPARTMENT = "attributeCompartment";
@@ -70,33 +62,6 @@ public class ClassifierFigure extends CompartmentFigure {
}
/**
- * {@inheritDoc}
- */
- @Override
- public void paint(Graphics graphics) {
- super.paint(graphics);
- if (active) {
- Rectangle rect = this.getBounds();
- graphics.pushState();
- graphics.setForegroundColor(getForegroundColor());
- // do not forget to set line width to 1, if not the color will
- // change because of the anti-aliasing
- graphics.setLineWidth(1);
-
- graphics.drawLine(new Point(rect.x + SPACE_FOR_ACTIVE_CLASS, rect.y), new Point(rect.x + SPACE_FOR_ACTIVE_CLASS, rect.y + rect.height - 1));
- graphics.drawLine(new Point(rect.x - SPACE_FOR_ACTIVE_CLASS - 1 + rect.width, rect.y), new Point(rect.x - SPACE_FOR_ACTIVE_CLASS - 1 + rect.width, rect.y + rect.height - 1));
- graphics.setBackgroundColor(getBackgroundColor());
- graphics.setForegroundColor(getBackgroundColor());
- graphics.setLineWidth(3);
-
- graphics.drawLine(new Point(rect.x + 2, rect.y + 1), new Point(rect.x + 2, rect.y + rect.height - 2));
- graphics.drawLine(new Point(rect.x - 3 + rect.width, rect.y + 1), new Point(rect.x - 3 + rect.width, rect.y + rect.height - 2));
-
- graphics.popState();
- }
- }
-
- /**
* Get the attribute's compartment figure
*
* @return
@@ -123,23 +88,4 @@ public class ClassifierFigure extends CompartmentFigure {
return getCompartment(NESTEDCLASSIFIER_COMPARTMENT);
}
- /**
- * Checks if is active.
- *
- * @return true, if is active
- */
- // @unused
- public boolean isActive() {
- return active;
- }
-
- /**
- * Set the active
- *
- * @param active
- */
- public void setActive(boolean active) {
- this.active = active;
- }
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DataTypeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DataTypeFigure.java
index d7d2f0f6467..5477952b98f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DataTypeFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DataTypeFigure.java
@@ -21,7 +21,7 @@ import org.eclipse.draw2d.IFigure;
/**
* Represents a datatype
*/
-public class DataTypeFigure extends CompartmentFigure {
+public class DataTypeFigure extends RoundedCompartmentFigure {
/** Attribute Compartment */
private final static String ATTRIBUTE_COMPARTMENT = "attributeCompartment";
@@ -33,7 +33,6 @@ public class DataTypeFigure extends CompartmentFigure {
private final static List<String> COMPARTMENT = new ArrayList<String>() {
private static final long serialVersionUID = -2841645169151618170L;
-
{
add(ATTRIBUTE_COMPARTMENT);
add(OPERATION_COMPARTMENT);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DependencyNodeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DependencyNodeFigure.java
index 235afd59e0d..1ea31b61d27 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DependencyNodeFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/DependencyNodeFigure.java
@@ -18,6 +18,7 @@ import org.eclipse.draw2d.geometry.Rectangle;
/**
* this figure is fill circle
*/
+// TODO: use rounded compartment figure instead with CSS square.
public class DependencyNodeFigure extends PapyrusNodeFigure {
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/EnumerationFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/EnumerationFigure.java
index 3c4f4af5314..06c364866c0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/EnumerationFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/EnumerationFigure.java
@@ -21,7 +21,7 @@ import org.eclipse.draw2d.IFigure;
/**
* Represents an enumeration
*/
-public class EnumerationFigure extends CompartmentFigure {
+public class EnumerationFigure extends RoundedCompartmentFigure {
/** The Literals Compartment */
private static final String LITERALS_COMPARTMENT = "literalsCompartment";
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FinalNode.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FinalNode.java
index 863fd653caf..c4eef3a9724 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FinalNode.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FinalNode.java
@@ -25,6 +25,7 @@ import org.eclipse.swt.graphics.Image;
* this figure is a final node a circle into a circle
*
*/
+// unused! to delete
public class FinalNode extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FlowFinalNode.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FlowFinalNode.java
index 3e159c2645b..59e6b630fe6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FlowFinalNode.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/FlowFinalNode.java
@@ -28,6 +28,7 @@ import org.eclipse.swt.graphics.Image;
*
* this figure is a circle with cross
*/
+// Unused: To delete
public class FlowFinalNode extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
/**
* {@inheritDoc}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ForkNode.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ForkNode.java
index 2a6e02f03a6..7dd9e8a0cfb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ForkNode.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ForkNode.java
@@ -13,29 +13,24 @@
*/
package org.eclipse.papyrus.uml.diagram.common.figure.node;
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Insets;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
-import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
/**
* this figure is small rectangle
*
*/
-public class ForkNode extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
+// Unused: to delete
+public class ForkNode extends RoundedCompartmentFigure implements IPapyrusNodeUMLElementFigure {
- /**
- * {@inheritDoc}
- */
- @Override
- protected Border getDefaultBorder(Color borderColor) {
- return null;
- }
+ // /**
+ // * {@inheritDoc}
+ // */
+ // @Override
+ // protected Border getDefaultBorder(Color borderColor) {
+ // return null;
+ // }
/**
* {@inheritDoc}
@@ -45,23 +40,23 @@ public class ForkNode extends PapyrusNodeFigure implements IPapyrusNodeUMLElemen
return new Dimension(10, 10);
}
- /**
- * {@inheritDoc}
- */
- @Override
- public void paintFigure(Graphics graphics) {
- Rectangle r = getBounds().getCopy().crop(new Insets(0, 0, 1, 1));
- if (isUsingGradient()) {
- graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- // graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- } else {
- graphics.setBackgroundColor(getBackgroundColor());
- // graphics.setForegroundColor(getForegroundColor());
- }
- graphics.fillRectangle(r);
- graphics.setLineWidth(1);
- graphics.drawRectangle(r);
- }
+ // /**
+ // * {@inheritDoc}
+ // */
+ // @Override
+ // public void paintFigure(Graphics graphics) {
+ // Rectangle r = getBounds().getCopy().crop(new Insets(0, 0, 1, 1));
+ // if (isUsingGradient()) {
+ // graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ // // graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ // } else {
+ // graphics.setBackgroundColor(getBackgroundColor());
+ // // graphics.setForegroundColor(getForegroundColor());
+ // }
+ // graphics.fillRectangle(r);
+ // graphics.setLineWidth(1);
+ // graphics.drawRectangle(r);
+ // }
/**
* {@inheritDoc}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InitialNode.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InitialNode.java
index 42448634406..b29ba5fd5ed 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InitialNode.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InitialNode.java
@@ -23,6 +23,7 @@ import org.eclipse.swt.graphics.Image;
/**
* this figure is fill circle
*/
+// Unused: to delete
public class InitialNode extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InstanceSpecificationFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InstanceSpecificationFigure.java
index 9da171728bd..ca92ee9a20a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InstanceSpecificationFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/InstanceSpecificationFigure.java
@@ -21,7 +21,7 @@ import org.eclipse.draw2d.RectangleFigure;
/**
* Represents an InstanceSpecification.
*/
-public class InstanceSpecificationFigure extends CompartmentFigure {
+public class InstanceSpecificationFigure extends RoundedCompartmentFigure {
/** Slot Compartment */
private static final String SLOT_COMPARTMENT = "slotCompartment";
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java
index f6e0bf356f4..0767b6fbaa3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java
@@ -80,6 +80,8 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
*/
protected Label stereotypesLabel;
+ private int namePosition = PositionConstants.MIDDLE;
+
/**
* Create a basic figure.
*/
@@ -161,22 +163,33 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
* Create a label that contains the name of the element.
*/
protected void createNameLabel() {
-
+
nameLabel = new PapyrusWrappingLabel();
nameLabel.setOpaque(false);
- nameLabel.setAlignment(PositionConstants.MIDDLE);
+ nameLabel.setAlignment(namePosition);
getNameLabelContainer().add(nameLabel, getNameLabelConstraint(), -1);
}
+ /**
+ * @param namePosition
+ * the labelAlignment to set
+ */
+ public void setNamePosition(int namePosition) {
+ this.namePosition = namePosition;
+ }
+
@Override
public void restoreNameLabel() {
nameLabel.setOpaque(false);
- nameLabel.setAlignment(PositionConstants.MIDDLE);
+ nameLabel.setAlignment(namePosition);
getNameLabelContainer().add(nameLabel, getNameLabelConstraint(), getNameLabelPosition());
}
+
+
+
/**
* Create a label that contains the name of the element.
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusNodeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusNodeFigure.java
index 58712ab9b80..c7a8e29044c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusNodeFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PapyrusNodeFigure.java
@@ -41,7 +41,7 @@ public class PapyrusNodeFigure extends NodeFigure implements IPapyrusNodeFigure
/**
* The shadow
*/
- private boolean shadow = true;
+ private boolean shadow = false;
/** Default custom dash values */
public static final int[] DEFAULT_CUSTOM_DASH = { 5, 5 };
@@ -220,7 +220,7 @@ public class PapyrusNodeFigure extends NodeFigure implements IPapyrusNodeFigure
/**
* <pre>
* This figure manages the border representation with custom dashes.
- *
+ *
* {@inheritDoc}
* </pre>
*/
@@ -236,7 +236,7 @@ public class PapyrusNodeFigure extends NodeFigure implements IPapyrusNodeFigure
/**
* <pre>
* This method propagates the new line style to the border
- *
+ *
* @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#setLineStyle(int)
* </pre>
*
@@ -255,7 +255,7 @@ public class PapyrusNodeFigure extends NodeFigure implements IPapyrusNodeFigure
/**
* <pre>
* This method propagates the new line width to the border
- *
+ *
* @see org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure#setLineWidth(int)
* </pre>
*
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PrimitiveTypeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PrimitiveTypeFigure.java
index 9d44b9de98d..ad59c98e29f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PrimitiveTypeFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/PrimitiveTypeFigure.java
@@ -22,7 +22,7 @@ import org.eclipse.draw2d.IFigure;
/**
* Represents a Primitive Type
*/
-public class PrimitiveTypeFigure extends CompartmentFigure {
+public class PrimitiveTypeFigure extends RoundedCompartmentFigure {
/** Attribute Compartment */
private final static String ATTRIBUTE_COMPARTMENT = "attributeCompartment";
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/RoundedCompartmentFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/RoundedCompartmentFigure.java
new file mode 100644
index 00000000000..036c9d1679c
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/RoundedCompartmentFigure.java
@@ -0,0 +1,404 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickaël ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure.node;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.RoundedRectangleBorder;
+import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
+import org.eclipse.gmf.runtime.notation.GradientStyle;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleShadowBorder;
+
+/**
+ * A rectangular figure that supports compartment.
+ */
+public class RoundedCompartmentFigure extends NodeNamedElementFigure implements IRoundedRectangleFigure {
+
+ /** The container figures. */
+ private Map<String, RectangleFigure> containerFigures;
+
+ /** The corner dimension. */
+ protected Dimension cornerDimension = new Dimension();
+
+ /** True if the figure is oval. */
+ protected boolean isOval = false;
+
+ /** The is label constrained. */
+ protected boolean isLabelConstrained = false;
+
+ /** The floating name offset. */
+ protected Dimension floatingNameOffset = new Dimension();
+
+ /** The border style. */
+ protected int borderStyle = Graphics.LINE_SOLID;
+
+ /** True if the figure has header. */
+ private boolean hasHeader = false;
+
+ /**
+ * @param borderStyle
+ * the borderStyle to set
+ */
+ public void setBorderStyle(int borderStyle) {
+ this.borderStyle = borderStyle;
+ if (shadowborder != null) {
+ shadowborder.setStyle(borderStyle);
+ }
+ }
+
+ /**
+ * Instantiates a new rounded compartment figure.
+ */
+ public RoundedCompartmentFigure() {
+ this(null, null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param compartmentFigure
+ * the compartment figure
+ */
+ public RoundedCompartmentFigure(List<String> compartmentFigure) {
+ this(compartmentFigure, null);
+ }
+
+ /**
+ * Constructor with a tagged value.
+ *
+ * @param compartmentFigure
+ * a list of id for the compartment figure
+ * @param taggedLabelValue
+ * the value to display as tagged value
+ */
+ public RoundedCompartmentFigure(List<String> compartmentFigure, String taggedLabelValue) {
+ super(taggedLabelValue);
+ setOpaque(false);
+ shadowborder = new RoundedRectangleShadowBorder(getForegroundColor(), cornerDimension);
+ setLayoutManager(new AutomaticCompartmentLayoutManager());
+ if (compartmentFigure != null) {
+ createContentPane(compartmentFigure);
+ }
+ }
+
+ /**
+ * Creates the content pane.
+ *
+ * @param compartmentFigure
+ * the compartment figure
+ */
+ protected void createContentPane(List<String> compartmentFigure) {
+ containerFigures = new HashMap<String, RectangleFigure>();
+ for (String id : compartmentFigure) {
+ RectangleFigure newFigure = new RectangleFigure();
+ newFigure.setLayoutManager(new SubCompartmentLayoutManager());
+ // to debug graphically: newFigure.setFill(true);
+ newFigure.setFill(false);
+ newFigure.setBorder(null);
+ newFigure.setOutline(false);
+ newFigure.setOpaque(false);
+ this.add(newFigure);
+ containerFigures.put(id, newFigure);
+ }
+ }
+
+ /**
+ * Get the RectangleFigure containing the wanted compartment.
+ *
+ * @param id
+ * the id to find the right compartment
+ * @return the RectangleFigure
+ */
+ public RectangleFigure getCompartment(String id) {
+ return containerFigures.get(id);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#getCornerDimensions()
+ *
+ * @return
+ */
+ @Override
+ public Dimension getCornerDimensions() {
+ return cornerDimension;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#getRoundedRectangleBounds()
+ *
+ * @return
+ */
+ @Override
+ public Rectangle getRoundedRectangleBounds() {
+ return getBounds();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void paintFigure(Graphics graphics) {
+
+ shadowborder.setColor(getForegroundColor());
+ graphics.pushState();
+ Rectangle rectangle = getBounds().getCopy();
+
+ refreshCornerSizeWhenOval();
+
+ // paintBackground:
+ applyTransparency(graphics);
+ if (isUsingGradient()) {
+ boolean isVertical = (getGradientStyle() == GradientStyle.VERTICAL) ? true : false;
+ if (isVertical && rectangle.height > ((3 * cornerDimension.height) / 2)) {
+ Rectangle upperBounds = getBounds().getCopy();
+ upperBounds.height = cornerDimension.height - getLineWidth() / 2;
+ upperBounds.y += getLineWidth() / 2;
+ Rectangle upperClip = upperBounds.getCopy().shrink(new Insets(0, 0, cornerDimension.height / 2, 0));
+ Rectangle lowerBounds = getBounds().getCopy();
+ lowerBounds.y = lowerBounds.bottom() - cornerDimension.height;
+ lowerBounds.height = cornerDimension.height - getLineWidth() / 2;
+ Rectangle lowerClip = lowerBounds.getCopy().shrink(new Insets(cornerDimension.height / 2, 0, 0, 0));
+ Rectangle innerBounds = getBounds().getCopy();
+ innerBounds.y = upperClip.bottom();
+ innerBounds.height = lowerClip.y - upperClip.bottom() + 1;
+ // fill the upper part
+ graphics.pushState();
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ graphics.clipRect(upperClip);
+ graphics.fillRoundRectangle(upperBounds, cornerDimension.width, cornerDimension.height);
+ graphics.popState();
+ // fill the inner part
+ graphics.pushState();
+ graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ graphics.fillGradient(innerBounds, true);
+ graphics.popState();
+ // fill the lower part
+ graphics.pushState();
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ graphics.clipRect(lowerClip);
+ graphics.fillRoundRectangle(lowerBounds, cornerDimension.width, cornerDimension.height);
+ graphics.popState();
+ } else if (!isVertical && rectangle.width > ((3 * cornerDimension.width) / 2)) {
+ Rectangle leftBounds = getBounds().getCopy();
+ leftBounds.width = cornerDimension.width - getLineWidth() / 2;
+ leftBounds.x += getLineWidth() / 2;
+ Rectangle leftClip = leftBounds.getCopy().shrink(new Insets(0, 0, 0, cornerDimension.width / 2));
+ Rectangle rightBounds = getBounds().getCopy();
+ rightBounds.x = rightBounds.right() - cornerDimension.width;
+ rightBounds.width = cornerDimension.width - getLineWidth() / 2;
+ Rectangle rightClip = rightBounds.getCopy().shrink(new Insets(0, cornerDimension.width / 2, 0, 0));
+ Rectangle innerBounds = getBounds().getCopy();
+ innerBounds.x = leftClip.right();// - getLineWidth();
+ innerBounds.width = rightClip.x - leftClip.right() + 1;// + 2 * getLineWidth();
+ // fill the left part
+ graphics.pushState();
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ graphics.clipRect(leftClip);
+ graphics.fillRoundRectangle(leftBounds, cornerDimension.width, cornerDimension.height);
+ graphics.popState();
+ // fill the inner part
+ graphics.pushState();
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ graphics.fillGradient(innerBounds, false);
+ graphics.popState();
+ // fill the right part
+ graphics.pushState();
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ graphics.clipRect(rightClip);
+ graphics.fillRoundRectangle(rightBounds, cornerDimension.width, cornerDimension.height);
+ graphics.popState();
+ } else {
+ graphics.pushState();
+ graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ graphics.fillRoundRectangle(rectangle, cornerDimension.width, cornerDimension.height);
+ graphics.popState();
+ }
+ } else {
+ graphics.pushState();
+ graphics.setBackgroundColor(getBackgroundColor());
+ graphics.setForegroundColor(getForegroundColor());
+ graphics.fillRoundRectangle(rectangle, cornerDimension.width, cornerDimension.height);
+ graphics.popState();
+ }
+
+ if (hasHeader) {
+ graphics.drawPolyline(getHeader());
+ }
+
+ graphics.popState();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure#setShadow(boolean)
+ *
+ * @param shadow
+ */
+ @Override
+ public void setShadow(boolean shadow) {
+ super.setShadow(shadow);
+ if (!shadow) {
+ // If shadow is set to false we set the border
+ if (getBorder() != null) {
+
+ refreshCornerSizeWhenOval();
+
+ RoundedRectangleBorder border = new RoundedRectangleBorder(cornerDimension.width, cornerDimension.height);
+ border.setWidth(getLineWidth());
+ border.setStyle(borderStyle);
+ this.setBorder(border);
+ }
+ }
+ setLineStyle(borderStyle);
+ }
+
+ /**
+ *
+ */
+ private void refreshCornerSizeWhenOval() {
+ // Set the corner dimension if is oval in case of resizing
+ if (isOval) {
+ if (cornerDimension.width != getBounds().width || cornerDimension.height != getBounds().height) {
+ cornerDimension.width = getBounds().width;
+ cornerDimension.height = getBounds().height;
+ // Force to repaint the border thought setShadow()
+ setShadow(isShadow());
+ }
+ }
+ }
+
+ /**
+ * Sets the corner dimension.
+ *
+ * @param cornerDimension
+ * the new corner dimension
+ */
+ @Override
+ public void setCornerDimensions(Dimension cornerDimension) {
+ this.cornerDimension = cornerDimension;
+ }
+
+ @Override
+ public void setOval(boolean booleanValue) {
+ isOval = booleanValue;
+ if (booleanValue) {
+ refreshCornerSizeWhenOval();
+ }
+ }
+
+ @Override
+ public boolean isOval() {
+ return isOval;
+ }
+
+ @Override
+ public void setFloatingNameConstrained(boolean booleanValue) {
+ isLabelConstrained = booleanValue;
+ }
+
+ @Override
+ public boolean isFloatingNameConstrained() {
+ return isLabelConstrained;
+ }
+
+ @Override
+ public void setFloatingNameOffset(Dimension offset) {
+ this.floatingNameOffset = offset;
+
+ }
+
+ @Override
+ public Dimension getFloatingNameOffset() {
+ return floatingNameOffset;
+ }
+
+
+ protected PointList getHeader() {
+
+ Rectangle labelBounds = nameLabel.getBounds().getCopy();
+ PointList points = new PointList();
+
+ int labelWidth = -1;
+ labelWidth = Math.max(labelWidth, nameLabel.getPreferredSize().width);
+
+ // case the size of the label is 0 or -1 (no label)
+ if (labelWidth <= 0) {
+ labelWidth = getBounds().width / 4;
+ }
+
+ Point verticalStart = new Point();
+ Point verticalEnd = new Point();
+ Point diagonalStart = new Point();
+ Point diagonalEnd = new Point();
+ Point horizontalStart = new Point();
+ Point horizontalEnd = new Point();
+
+ verticalStart.x = labelBounds.x + labelWidth + 4;
+ verticalStart.y = getBounds().y; // labelBounds.y;
+ points.addPoint(verticalStart);
+
+ verticalEnd.x = verticalStart.x;
+ verticalEnd.y = verticalStart.y + labelBounds.height / 2 + 3;
+ points.addPoint(verticalEnd);
+
+ diagonalStart.x = verticalEnd.x;
+ diagonalStart.y = verticalEnd.y;
+ points.addPoint(diagonalStart);
+
+ diagonalEnd.x = diagonalStart.x - labelBounds.height / 2 + 3;
+ diagonalEnd.y = labelBounds.y + labelBounds.height - 1;
+ points.addPoint(diagonalEnd);
+
+ horizontalStart.x = diagonalEnd.x;
+ horizontalStart.y = diagonalEnd.y;
+ points.addPoint(horizontalStart);
+
+ horizontalEnd.x = labelBounds.x;
+ horizontalEnd.y = horizontalStart.y;
+ points.addPoint(horizontalEnd);
+ return points;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#setHasHeader(boolean)
+ *
+ * @param hasHeader
+ */
+ @Override
+ public void setHasHeader(boolean hasHeader) {
+ this.hasHeader = hasHeader;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure#hasHeader()
+ *
+ * @return
+ */
+ @Override
+ public boolean hasHeader() {
+ return hasHeader;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/SignalFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/SignalFigure.java
index 53f56857073..231a9bb8223 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/SignalFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/SignalFigure.java
@@ -21,7 +21,7 @@ import org.eclipse.draw2d.IFigure;
/**
* Represents a signal.
*/
-public class SignalFigure extends CompartmentFigure {
+public class SignalFigure extends RoundedCompartmentFigure {
/** Attribute Compartment */
private final static String ATTRIBUTE_COMPARTMENT = "attributeCompartment";
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/FloatingLabelHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/FloatingLabelHelper.java
new file mode 100644
index 00000000000..05014b9ec21
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/FloatingLabelHelper.java
@@ -0,0 +1,325 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.helper;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.uml.tools.utils.CollaborationUseUtil;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.papyrus.uml.tools.utils.InstanceSpecificationUtil;
+import org.eclipse.papyrus.uml.tools.utils.MultiplicityElementUtil;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.papyrus.uml.tools.utils.OperationUtil;
+import org.eclipse.papyrus.uml.tools.utils.ParameterUtil;
+import org.eclipse.papyrus.uml.tools.utils.PortUtil;
+import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
+import org.eclipse.papyrus.uml.tools.utils.SignalUtil;
+import org.eclipse.papyrus.uml.tools.utils.TypeUtil;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.CollaborationUse;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.MultiplicityElement;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Signal;
+import org.eclipse.uml2.uml.TemplateParameter;
+import org.eclipse.uml2.uml.TypedElement;
+
+//TODO Check for usefull property to display
+
+/**
+ * Helper for labels displaying {@link NamedElement}.
+ */
+public class FloatingLabelHelper extends StereotypedElementLabelHelper {
+
+ // Einstance
+ /** The label helper. */
+ private static FloatingLabelHelper labelHelper;
+
+ /**
+ * Gets the single instance of FloatingLabelHelper.
+ *
+ * @return single instance of FloatingLabelHelper
+ */
+ public static FloatingLabelHelper getInstance() {
+ if (labelHelper == null) {
+ labelHelper = new FloatingLabelHelper();
+ }
+ return labelHelper;
+ }
+
+ /** Map for masks. */
+ protected final Map<String, String> masks = new HashMap<String, String>();
+
+ /**
+ * Instantiates a new floating label helper.
+ */
+ protected FloatingLabelHelper() {
+ // initialize the map
+
+ /**
+ * Style constant for visibility display in labels.
+ */
+ masks.put(ICustomAppearance.DISP_VISIBILITY, "Visibility");
+
+ /**
+ * Style constant for isDerive display in labels.
+ */
+ masks.put(ICustomAppearance.DISP_DERIVE, "Derived");
+
+ /**
+ * Style constant for name display in labels.
+ */
+ masks.put(ICustomAppearance.DISP_NAME, "Name");
+
+ /**
+ * Style constant for type display in labels.
+ */
+ masks.put(ICustomAppearance.DISP_TYPE, "Type");
+
+ /**
+ * Style constant for multiplicity display in labels.
+ */
+ masks.put(ICustomAppearance.DISP_MULTIPLICITY, "Multiplicity");
+
+ /**
+ * Style constant for default value display in labels.
+ */
+ masks.put(ICustomAppearance.DISP_DEFAULT_VALUE, "Default Value");
+
+ /**
+ * Style constant for modifiers display in labels.
+ */
+ masks.put(ICustomAppearance.DISP_MODIFIERS, "Modifiers");
+
+ /** Style constant for carriage return in labels */
+ masks.put(ICustomAppearance.DISP_MULTI_LINE, "Multiline");
+
+ /** Style constant for operation#parameter direction display in labels */
+ masks.put(ICustomAppearance.DISP_PARAMETER_DIRECTION, "Parameters Direction");
+
+ /** Style constant for direction display in labels */
+ masks.put(ICustomAppearance.DISP_DIRECTION, "Direction");
+
+ /** Style constant for operation#parameter name display in labels */
+ masks.put(ICustomAppearance.DISP_PARAMETER_NAME, "Parameters Name");
+
+ /** Style constant for operation#parameter type display in labels */
+ masks.put(ICustomAppearance.DISP_PARAMETER_TYPE, "Parameters Type");
+
+ /** Style constant for operation#parameter multiplicity display in labels */
+ masks.put(ICustomAppearance.DISP_PARAMETER_MULTIPLICITY, "Parameters Multiplicity");
+
+ /** Style constant for operation#parameter default value display in labels */
+ masks.put(ICustomAppearance.DISP_PARAMETER_DEFAULT, "Parameters Default");
+
+ /** Style constant for operation#parameter modifiers display in labels */
+ masks.put(ICustomAppearance.DISP_PARAMETER_MODIFIERS, "Parameters Modifiers");
+
+ /** Style constant for return type display in labels */
+ masks.put(ICustomAppearance.DISP_RT_TYPE, "returnType");
+
+ /** Style constant for return multiplicity display in labels */
+ masks.put(ICustomAppearance.DISP_RT_MULTIPLICITY, "Return Multiplicity");
+
+ /** Style constant for conjugated labels */
+ masks.put(ICustomAppearance.DISP_CONJUGATED, "Conjugated");
+ }
+
+ /**
+ * Computes the label that should be displayed by the figure managed by this
+ * edit part.
+ *
+ * @param editPart
+ * the edit part that controls the {@link NamedElement} to be
+ * displayed
+ * @return the label corresponding to the specific display of the property
+ * ("default" display given by preferences or specific display given
+ * by eAnnotation).
+ */
+ @Override
+ protected String elementLabel(GraphicalEditPart editPart) {
+ IMaskManagedLabelEditPolicy policy = (IMaskManagedLabelEditPolicy) editPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
+ if (policy == null) {
+ policy = (IMaskManagedLabelEditPolicy) editPart.getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+
+ Collection<String> displayValue = Collections.emptySet();
+
+ if (policy != null) {
+ displayValue = policy.getCurrentDisplayValue();
+ }
+
+ return parseString(editPart, displayValue);
+ }
+
+ /**
+ * Parses the string.
+ *
+ * @param editPart
+ * the edit part
+ * @param displayValue
+ * the display value
+ * @return the string
+ */
+ protected String parseString(GraphicalEditPart editPart, Collection<String> displayValue) {
+ NamedElement namedElement = getUMLElement(editPart);
+
+ if (namedElement != null) {
+ return getCustomLabel(namedElement, displayValue);
+ }
+
+ return "";
+ }
+
+
+ /**
+ * Returns the map of masks used to display a {@link NamedElement}.
+ *
+ * @return the {@link Map} of masks used to display a {@link NamedElement}
+ */
+ public Map<String, String> getMasks() {
+ return masks;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public NamedElement getUMLElement(GraphicalEditPart editPart) {
+ if (editPart.getModel() instanceof View) {
+ View view = (View) editPart.getModel();
+ if (view.getElement() instanceof NamedElement) {
+ return (NamedElement) view.getElement();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * return the custom label of the property, given UML2 specification and a custom style.
+ *
+ * @param namedElement
+ * the integer representing the style of the label
+ * @param maskValues
+ * the mask values
+ * @return the string corresponding to the label of the property
+ */
+ public static String getCustomLabel(NamedElement namedElement, Collection<String> maskValues) {
+
+ // Use of specific existing custom label
+
+ // use CollaborationUse custom label
+ if (namedElement instanceof CollaborationUse) {
+ return CollaborationUseUtil.getCustomLabel((CollaborationUse) namedElement, maskValues);
+ }
+
+ // use InstanceSpecification custom label
+ if (namedElement instanceof InstanceSpecification) {
+ return InstanceSpecificationUtil.getCustomLabel((InstanceSpecification) namedElement, maskValues);
+ }
+
+ // use Operation custom label
+ if (namedElement instanceof Operation) {
+ return OperationUtil.getCustomLabel((Operation) namedElement, maskValues);
+ }
+
+ // use Parameter custom label
+ if (namedElement instanceof Parameter) {
+ return ParameterUtil.getCustomLabel((Parameter) namedElement, maskValues);
+ }
+
+ // use Signal custom label
+ if (namedElement instanceof Signal) {
+ return SignalUtil.getCustomLabel((Signal) namedElement, maskValues);
+ }
+
+ // use Port custom label
+ if (namedElement instanceof Port) {
+ return PortUtil.getCustomLabel((Port) namedElement, maskValues);
+ }
+
+ // use Property custom label
+ if (namedElement instanceof Property) {
+ return PropertyUtil.getCustomLabel((Property) namedElement, maskValues);
+ }
+ // TODO add others usefull properties
+
+ // default custom label
+ StringBuffer buffer = new StringBuffer();
+
+ // visibility
+ if (maskValues.contains(ICustomAppearance.DISP_VISIBILITY)) {
+ buffer.append(" ");
+ buffer.append(NamedElementUtil.getVisibilityAsSign(namedElement));
+ }
+
+ // derived property for association
+ if (namedElement instanceof Association) {
+ if (maskValues.contains(ICustomAppearance.DISP_DERIVE)) {
+ if (((Association) namedElement).isDerived()) {
+ buffer.append("/");
+ }
+ }
+ }
+ // name
+ if (maskValues.contains(ICustomAppearance.DISP_NAME)) {
+ buffer.append(" ");
+ buffer.append(namedElement.getName());
+ }
+
+ // Type of TypedElement
+ if (namedElement instanceof TypedElement) {
+ if (maskValues.contains(ICustomAppearance.DISP_TYPE)) {
+ // type
+ if (((TypedElement) namedElement).getType() != null) {
+ buffer.append(": " + ((TypedElement) namedElement).getType().getName());
+ } else {
+ buffer.append(": " + TypeUtil.UNDEFINED_TYPE_NAME);
+ }
+ }
+ }
+
+ // Multiplicity
+ if (namedElement instanceof MultiplicityElement) {
+ if (maskValues.contains(ICustomAppearance.DISP_MULTIPLICITY)) {
+ // multiplicity -> do not display [1]
+ String multiplicity = MultiplicityElementUtil.getMultiplicityAsString((MultiplicityElement) namedElement);
+ buffer.append(multiplicity);
+ }
+ }
+
+ // Template Parameter(not sure of the uml element
+ if (namedElement instanceof TemplateParameter) {
+ if (maskValues.contains(ICustomAppearance.DISP_DEFAULT_VALUE)) {
+ // default value
+ if (((TemplateParameter) namedElement).getDefault() != null) {
+ buffer.append(" = ");
+ buffer.append(((TemplateParameter) namedElement).getDefault());
+ }
+ }
+ }
+
+ return buffer.toString();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/ExternalLabelPositionLocator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/ExternalLabelPositionLocator.java
index 1ba388b783a..2d4175b28c9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/ExternalLabelPositionLocator.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/ExternalLabelPositionLocator.java
@@ -35,6 +35,8 @@ import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IPapyrusEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.locator.IPapyrusBorderItemLocator;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
/**
* This class is used to constrain the position of ExternalNodeLabel. The
@@ -53,7 +55,7 @@ public class ExternalLabelPositionLocator implements IPapyrusBorderItemLocator {
private boolean isConstrained = false;
/** The margin. */
- private Point margin;
+ private Point margin = new Point();
/** The offset. */
private Dimension offset = new Dimension();
@@ -99,7 +101,7 @@ public class ExternalLabelPositionLocator implements IPapyrusBorderItemLocator {
*/
@Override
public int getCurrentSideOfParent() {
- return position;
+ return getPosition();
}
/**
@@ -119,6 +121,27 @@ public class ExternalLabelPositionLocator implements IPapyrusBorderItemLocator {
*/
@Override
public int getPosition() {
+ // Get the forced value(CSS, Notation)
+ String ForcedPosition = NotationUtils.getStringValue(view, "position", "AUTO").toUpperCase();
+ // if there is a forced position
+ if (!"AUTO".equals(ForcedPosition)) {
+ if ("EAST".equals(ForcedPosition)) {
+ position = PositionConstants.EAST;
+ }
+ if ("WEST".equals(ForcedPosition)) {
+ position = PositionConstants.WEST;
+ }
+ if ("NORTH".equals(ForcedPosition)) {
+ position = PositionConstants.NORTH;
+ }
+ if ("SOUTH".equals(ForcedPosition)) {
+ position = PositionConstants.SOUTH;
+ }
+ } else {
+ // Return the position on parent
+ position = getPositionOnParent();
+ }
+
return position;
}
@@ -128,7 +151,7 @@ public class ExternalLabelPositionLocator implements IPapyrusBorderItemLocator {
* @return the position on parent
*/
public int getPositionOnParent() {
- Rectangle portBounds = null;
+ Rectangle bounds = null;
Rectangle parentBounds = null;
int position = this.position;
@@ -137,24 +160,43 @@ public class ExternalLabelPositionLocator implements IPapyrusBorderItemLocator {
EditPart parent = editPart.getParent();
if (parent instanceof IPapyrusEditPart) {
IFigure portPrimaryShape = ((IPapyrusEditPart) parent).getPrimaryShape();
- portBounds = portPrimaryShape.getBounds();
+ bounds = portPrimaryShape.getBounds();
// Get the port's parent figure
// if it's a papyrus edit part and the figure is paint(width !=0)
- if (parent.getParent() instanceof IPapyrusEditPart && portBounds.width != 0) {
+ if (parent.getParent() instanceof IPapyrusEditPart && bounds.width != 0) {
IFigure parentPrimaryShape = ((IPapyrusEditPart) parent.getParent()).getPrimaryShape();
parentBounds = parentPrimaryShape.getBounds();
- if (portBounds.x + portBounds.width / 2 == parentBounds.x) {
+ if (bounds.x + bounds.width / 2 == parentBounds.x) {
// West position
position = PositionConstants.WEST;
- } else if (portBounds.x + portBounds.width / 2 == parentBounds.getBottomRight().x) {
+ } else if (bounds.x + bounds.width / 2 == parentBounds.getBottomRight().x) {
// East Position
position = PositionConstants.EAST;
- } else if (portBounds.y + portBounds.height / 2 == parentBounds.y) {
+ } else if (bounds.y + bounds.height / 2 == parentBounds.y) {
+ // North Position
position = PositionConstants.NORTH;
- } else if (portBounds.y + portBounds.height / 2 == parentBounds.getBottomRight().y) {
+ } else if (bounds.y + bounds.height / 2 == parentBounds.getBottomRight().y) {
+ // South Position
position = PositionConstants.SOUTH;
+ } else
+
+ // Take into account of rounded corner
+ if (parent.getParent() instanceof RoundedCompartmentEditPart && bounds.width != 0) {
+ // West position
+ if (bounds.x + bounds.width / 2 < parentBounds.x + parentBounds.width / 4) {
+ position = PositionConstants.WEST;
+ // East Position
+ } else if (bounds.x + bounds.width / 2 > parentBounds.x + parentBounds.width / 4 * 3) {
+ position = PositionConstants.EAST;
+ // North Position
+ } else if (bounds.y + bounds.height / 2 < parentBounds.y + parentBounds.height / 2) {
+ position = PositionConstants.NORTH;
+ // South Position
+ } else if (bounds.y + bounds.height / 2 > parentBounds.y + parentBounds.height / 2) {
+ position = PositionConstants.SOUTH;
+ }
}
}
}
@@ -227,10 +269,10 @@ public class ExternalLabelPositionLocator implements IPapyrusBorderItemLocator {
Point newConstraint;
// The new Offset to be saved one the resource
Point newOffset;
- // get the nummber of labels and set the number of this label
+ // get the number of labels and set the number of this label
int numberOfLabel = getNumberOfVisibleLabels();
// Set the translation when alignment is auto
- switch (getPositionOnParent()) {
+ switch (getPosition()) {
case PositionConstants.WEST:
// alignRight:
newConstraint = new Point(-proposedBounds.width - offset.width, offset.height);
@@ -261,7 +303,7 @@ public class ExternalLabelPositionLocator implements IPapyrusBorderItemLocator {
proposedBounds.setLocation(newConstraint.translate(parentFigure.getBounds().getTopLeft()));
// translate the label in case of multiple label
- switch (getPositionOnParent()) {
+ switch (getPosition()) {
case PositionConstants.WEST:
proposedBounds.translate(0, (numLabel - 1) * proposedBounds.height + margin.y - (numberOfLabel - 1) * (proposedBounds.height + margin.y) / 2);
break;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java
index ec6ba1db783..0a18f5b1487 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java
@@ -13,11 +13,17 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.locator;
+import org.eclipse.draw2d.ConnectionAnchor;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SlidableRoundedRectangleAnchor;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.FigureUtils;
/**
*
@@ -47,6 +53,8 @@ public class PortPositionLocator implements IBorderItemLocator {
/** the figure around which this border item appears */
protected IFigure parentFigure = null;
+ String position = "onLine";
+
/** the width of the area surrounding the parent figure where border item can be put */
protected int borderItemOffset = 10;
@@ -55,7 +63,6 @@ public class PortPositionLocator implements IBorderItemLocator {
return borderItemOffset;
}
-
public void setBorderItemOffset(int borderItemOffset) {
this.borderItemOffset = borderItemOffset;
}
@@ -72,7 +79,17 @@ public class PortPositionLocator implements IBorderItemLocator {
/** the position constraint */
protected Rectangle constraint = new Rectangle(0, 0, 0, 0);
- /** Constructor **/
+ /** the figure */
+ private IFigure figure;
+
+ /**
+ * Constructor *.
+ *
+ * @param parentFigure
+ * the parent figure
+ * @param preferredSide
+ * the preferred side
+ */
public PortPositionLocator(IFigure parentFigure, int preferredSide) {
// The preferredSide parameter is not used, just kept here to ensure compatibility
// with GMF generated code.
@@ -80,12 +97,14 @@ public class PortPositionLocator implements IBorderItemLocator {
}
/**
- *
- * @see org.eclipse.gmf.runtime.draw2d.ui.figures.IBorderItemLocator#getValidLocation(org.eclipse.draw2d.geometry.Rectangle, org.eclipse.draw2d.IFigure)
+ * Gets the valid location.
*
* @param proposedLocation
+ * the proposed location
* @param borderItem
+ * the border item
* @return a valid location
+ * @see org.eclipse.gmf.runtime.draw2d.ui.figures.IBorderItemLocator#getValidLocation(org.eclipse.draw2d.geometry.Rectangle, org.eclipse.draw2d.IFigure)
*/
@Override
public Rectangle getValidLocation(Rectangle proposedLocation, IFigure borderItem) {
@@ -93,6 +112,7 @@ public class PortPositionLocator implements IBorderItemLocator {
}
/**
+ * Gets the preferred location.
*
* @param proposedLocation
* the proposed location
@@ -102,108 +122,142 @@ public class PortPositionLocator implements IBorderItemLocator {
// Initialize port location with proposed location
// and resolve the bounds of it graphical parent
- Rectangle realLocation = new Rectangle(proposedLocation);
+ Rectangle realLocation = new Rectangle(proposedLocation);
Rectangle parentRec = getParentFigure().getBounds().getCopy();
- // Calculate Max position around the graphical parent (1/2 size or the port around
- // the graphical parent bounds.
- int xMin = parentRec.x - borderItemOffset;
- int xMax = parentRec.x - borderItemOffset + parentRec.width;
- int yMin = parentRec.y - borderItemOffset;
- int yMax = parentRec.y - borderItemOffset + parentRec.height;
-
- // Modify Port location if MAX X or Y are exceeded
- if (realLocation.x < xMin) {
- realLocation.x = xMin;
- }
-
- if (realLocation.x > xMax) {
- realLocation.x = xMax;
- }
- if (realLocation.y < yMin) {
- realLocation.y = yMin;
- }
-
- if (realLocation.y > yMax) {
- realLocation.y = yMax;
+ // If it's a SVGNodePlate get the anchor to get the position
+ if (parentFigure instanceof SVGNodePlateFigure && ((SVGNodePlateFigure) parentFigure).getConnectionAnchor("") instanceof SlidableRoundedRectangleAnchor) {
+
+ // Translate location to absolute before calculate location Point
+ parentFigure.translateToAbsolute(proposedLocation);
+ parentFigure.translateToAbsolute(parentRec);
+
+ ConnectionAnchor connectionAnchor = ((SVGNodePlateFigure) parentFigure).getConnectionAnchor("");
+ // Get the location point, with anchor.
+ ((SlidableRoundedRectangleAnchor) connectionAnchor).setOffset(getPortOffset());
+ Point locationForPort = ((SlidableRoundedRectangleAnchor) connectionAnchor).getLocation(parentRec.getCenter(), proposedLocation.getLocation());
+ ((SlidableRoundedRectangleAnchor) connectionAnchor).setOffset(new Dimension());
+ if (locationForPort != null) {
+ proposedLocation.setLocation(locationForPort);
+ }
+
+ // Translate to relative the location
+ parentFigure.translateToRelative(proposedLocation);
+ // Set the location
+ realLocation.setLocation(proposedLocation.getLocation());
+ } else {
+
+ // Calculate Max position around the graphical parent (1/2 size or the port around
+ // the graphical parent bounds.
+ int xMin = parentRec.x - borderItemOffset;
+ int xMax = parentRec.x - borderItemOffset + parentRec.width;
+ int yMin = parentRec.y - borderItemOffset;
+ int yMax = parentRec.y - borderItemOffset + parentRec.height;
+
+ // Modify Port location if MAX X or Y are exceeded
+ if (realLocation.x < xMin) {
+ realLocation.x = xMin;
+ }
+ if (realLocation.x > xMax) {
+ realLocation.x = xMax;
+ }
+ if (realLocation.y < yMin) {
+ realLocation.y = yMin;
+ }
+ if (realLocation.y > yMax) {
+ realLocation.y = yMax;
+ }
+
+ final Rectangle maxRect = parentRec.getCopy();
+ maxRect.shrink(-borderItemOffset, -borderItemOffset);
+ while (maxRect.contains(realLocation.getLocation())) {
+ maxRect.shrink(1, 1);
+ }
+ int pos = maxRect.getPosition(realLocation.getLocation());
+
+ switch (pos) {
+ case PositionConstants.NORTH:
+ realLocation.y = yMin;
+ break;
+ case PositionConstants.SOUTH:
+ realLocation.y = yMax;
+ break;
+ case PositionConstants.EAST:
+ realLocation.x = xMax;
+ break;
+ case PositionConstants.WEST:
+ realLocation.x = xMin;
+ break;
+ case PositionConstants.NORTH_EAST:
+ realLocation.x = xMax;
+ realLocation.y = yMin;
+ break;
+ case PositionConstants.NORTH_WEST:
+ realLocation.x = xMin;
+ realLocation.y = yMin;
+ break;
+ case PositionConstants.SOUTH_EAST:
+ realLocation.x = xMax;
+ realLocation.y = yMax;
+ break;
+ case PositionConstants.SOUTH_WEST:
+ realLocation.x = xMin;
+ realLocation.y = yMax;
+ break;
+ }
}
+ // Return constrained location
+ return realLocation;
+ }
- // commented by V. Lorenzo to allow to create port on the top of a figure
- // replaced by the next block of code
-
- // Ensure the port is positioned on its parent borders and not in the middle.
- // Modify position if needed.
- // if((realLocation.y != yMin) && (realLocation.y != yMax)) {
- // if((realLocation.x != xMin) && (realLocation.x != xMax)) {
- //
- // if(realLocation.x <= (xMin + (parentRec.width / 2))) {
- // realLocation.x = xMin;
- // } else {
- // realLocation.x = xMax;
- // }
- // }
- // }
-
- // this code replaces the previous commented lines
- final Rectangle maxRect = parentRec.getCopy();
- maxRect.shrink(-borderItemOffset, -borderItemOffset);
- while (maxRect.contains(realLocation.getLocation())) {
- maxRect.shrink(1, 1);
- }
- int pos = maxRect.getPosition(realLocation.getLocation());
- switch (pos) {
- case PositionConstants.NORTH:
- realLocation.y = yMin;
- break;
- case PositionConstants.SOUTH:
- realLocation.y = yMax;
- break;
- case PositionConstants.EAST:
- realLocation.x = xMax;
- break;
- case PositionConstants.WEST:
- realLocation.x = xMin;
- break;
- case PositionConstants.NORTH_EAST:
- realLocation.x = xMax;
- realLocation.y = yMin;
- break;
- case PositionConstants.NORTH_WEST:
- realLocation.x = xMin;
- realLocation.y = yMin;
- break;
- case PositionConstants.SOUTH_EAST:
- realLocation.x = xMax;
- realLocation.y = yMax;
- break;
- case PositionConstants.SOUTH_WEST:
- realLocation.x = xMin;
- realLocation.y = yMax;
- break;
+ /**
+ * @return
+ */
+ private Dimension getPortOffset() {
+ Dimension portOffset = new Dimension();
+ if (figure != null) {
+ if ("inside".equals(position)) {
+ portOffset.width = -figure.getBounds().width / 2;
+ portOffset.height = -figure.getBounds().height / 2;
+ } else if ("outside".equals(position)) {
+ portOffset.width = figure.getBounds().width / 2;
+ portOffset.height = figure.getBounds().height / 2;
+ }
+ // Else onLine: no offset is applied and the port is on the line.
}
+ return portOffset;
+ }
- // Return constrained location
- return realLocation;
+ /**
+ * @param position
+ * the position to set
+ */
+ public void setPortPosition(String position) {
+ this.position = position;
}
/**
+ * @param view
+ * the view to set
+ *
+ * /**
+ * Gets the current side of parent.
*
+ * @return the current side of parent
* @see org.eclipse.gmf.runtime.draw2d.ui.figures.IBorderItemLocator#getCurrentSideOfParent()
- *
- * @return
- * the position of the port around its parent. This position can be
- * <ul>
- * <li>{@linkplain PositionConstants#NORTH}</li>
- * <li> {@linkplain PositionConstants#SOUTH}</li>
- * <li> {@linkplain PositionConstants#EAST}</li>
- * <li> {@linkplain PositionConstants#WEST}</li>
- * <li> {@linkplain PositionConstants#NORTH_EAST}</li>
- * <li> {@linkplain PositionConstants#NORTH_WEST}</li>
- * <li> {@linkplain PositionConstants#SOUTH_EAST}</li>
- * <li> {@linkplain PositionConstants#SOUTH_WEST}</li>
- * </ul>
+ * the position of the port around its parent. This position can be
+ * <ul>
+ * <li>{@linkplain PositionConstants#NORTH}</li>
+ * <li> {@linkplain PositionConstants#SOUTH}</li>
+ * <li> {@linkplain PositionConstants#EAST}</li>
+ * <li> {@linkplain PositionConstants#WEST}</li>
+ * <li> {@linkplain PositionConstants#NORTH_EAST}</li>
+ * <li> {@linkplain PositionConstants#NORTH_WEST}</li>
+ * <li> {@linkplain PositionConstants#SOUTH_EAST}</li>
+ * <li> {@linkplain PositionConstants#SOUTH_WEST}</li>
+ * </ul>
*/
@Override
public int getCurrentSideOfParent() {
@@ -212,65 +266,69 @@ public class PortPositionLocator implements IBorderItemLocator {
// we are not on EAST, not on WEST, but we are on the NORTH
if ((constraint.x != parentFigure.getBounds().width - borderItemOffset) && (constraint.x != -this.borderItemOffset) && (constraint.y == -this.borderItemOffset)) {
position = PositionConstants.NORTH;
-
// we are not on the EAST and not on the WEST, but we are on the SOUTH
} else if ((constraint.x != parentFigure.getBounds().width - borderItemOffset) && (constraint.x != -this.borderItemOffset) && (constraint.y == parentFigure.getBounds().height - borderItemOffset)) {
position = PositionConstants.SOUTH;
-
// we are on the EAST, but we are not on the NORTH and not on the SOUTH
} else if ((constraint.x == parentFigure.getBounds().width - borderItemOffset) && (constraint.y != -this.borderItemOffset) && (constraint.y != parentFigure.getBounds().height - borderItemOffset)) {
position = PositionConstants.EAST;
-
// we are on the WEST, but we are not on the on the NORTH and not on the SOUTH
} else if ((constraint.x == -this.borderItemOffset) && (constraint.y != -this.borderItemOffset) && (constraint.y != parentFigure.getBounds().height - borderItemOffset)) {
position = PositionConstants.WEST;
-
// we are on the NORTH and on the EAST
} else if ((constraint.x == parentFigure.getBounds().width - borderItemOffset) && (constraint.y == -this.borderItemOffset)) {
position = PositionConstants.NORTH_EAST;
-
// we are on the NORTH and on the WEST
} else if ((constraint.x == -this.borderItemOffset) && (constraint.y == -this.borderItemOffset)) {
position = PositionConstants.NORTH_WEST;
-
// we are on the EAST and on the SOUTH
} else if ((constraint.x == parentFigure.getBounds().width - borderItemOffset) && (constraint.y == parentFigure.getBounds().height - borderItemOffset)) {
position = PositionConstants.SOUTH_EAST;
-
// we are on the WEST and on the SOUTH
} else if ((constraint.x == -this.borderItemOffset) && (constraint.y == parentFigure.getBounds().height - borderItemOffset)) {
position = PositionConstants.SOUTH_WEST;
}
-
return position;
}
/**
- *
- * @see org.eclipse.gmf.runtime.draw2d.ui.figures.IBorderItemLocator#setConstraint(org.eclipse.draw2d.geometry.Rectangle)
+ * Sets the constraint.
*
* @param constraint
+ * the new constraint
+ * @see org.eclipse.gmf.runtime.draw2d.ui.figures.IBorderItemLocator#setConstraint(org.eclipse.draw2d.geometry.Rectangle)
*/
@Override
public void setConstraint(Rectangle constraint) {
this.constraint = constraint;
-
}
/**
- *
- * @see org.eclipse.draw2d.Locator#relocate(org.eclipse.draw2d.IFigure)
+ * Relocate.
*
* @param target
+ * the target
+ * @see org.eclipse.draw2d.Locator#relocate(org.eclipse.draw2d.IFigure)
*/
@Override
public void relocate(IFigure target) {
+ if (figure == null) {
+ figure = target;
+ }
+
Rectangle proposedLocation = constraint.getCopy();
proposedLocation.setLocation(constraint.getLocation().translate(parentFigure.getBounds().getTopLeft()));
Point validLocation = getValidLocation(proposedLocation, target).getLocation();
-
- target.setBounds(new Rectangle(validLocation, target.getPreferredSize()));
+ if (FigureUtils.findChildFigureInstance(figure, RoundedRectangleNodePlateFigure.class) != null) {
+
+ Dimension preferredSize = target.getPreferredSize();
+ Rectangle rect = new Rectangle(validLocation, preferredSize);
+ rect.translate(-preferredSize.width / 2, -preferredSize.height / 2);
+ target.setBounds(rect);
+ } else {
+ target.setBounds(new Rectangle(validLocation, target.getPreferredSize()));
+ }
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/RoundedRectangleLabelPositionLocator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/RoundedRectangleLabelPositionLocator.java
new file mode 100644
index 00000000000..5756ef7e19c
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/RoundedRectangleLabelPositionLocator.java
@@ -0,0 +1,714 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.common.locator;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IRoundedRectangleFigure;
+
+/**
+ * This class is used to constrain the position of ExternalNodeLabel. The
+ * locator let the external node label be freely located by used anywhere around
+ * the parent figure.
+ */
+public class RoundedRectangleLabelPositionLocator extends ExternalLabelPositionLocator {
+
+ /** the figure around which this label appears. */
+ protected IFigure parentFigure = null;
+
+ /** The border item offset. */
+ private Dimension borderItemOffset = new Dimension(1, 1);
+
+ /** The preferred side. */
+ private int preferredSide = PositionConstants.NORTH;
+
+ /** remembers the preferred side used when the locator was created. */
+ private int originalPreferredSide = PositionConstants.NORTH;
+
+ /** The current side. */
+ private int currentSide = PositionConstants.NORTH;
+
+ /** The interval. */
+ private int interval;
+
+ /**
+ * The preferred side determines placement of figure.
+ *
+ * @param interval
+ * interval between border items used in collision resolving (must be > 0)
+ * @param parentFigure
+ * the parent figure
+ */
+ public RoundedRectangleLabelPositionLocator(int interval, IFigure parentFigure) {
+ super(parentFigure);
+ Assert.isTrue(interval > 0);
+ Assert.isNotNull(parentFigure);
+ this.parentFigure = parentFigure;
+ this.interval = interval;
+ }
+
+ /**
+ * The preferred side determines placement of figure.
+ *
+ * @param parentFigure
+ * the parent figure
+ */
+ public RoundedRectangleLabelPositionLocator(IFigure parentFigure) {
+ this(MapModeUtil.getMapMode(parentFigure).DPtoLP(8), parentFigure);
+ }
+
+ /**
+ * The preferred side determines placement of figure.
+ *
+ * @param parentFigure
+ * the parent figure
+ * @param preferredSide
+ * the preferred side of the parent figure on which to place this
+ * border item as defined in {@link PositionConstants}
+ */
+ public RoundedRectangleLabelPositionLocator(IFigure parentFigure, int preferredSide) {
+ this(parentFigure);
+ this.preferredSide = preferredSide;
+ this.originalPreferredSide = preferredSide;
+ }
+
+ /**
+ * The preferred side determines placement of figure.
+ *
+ * @param parentFigure
+ * the parent figure
+ * @param preferredSide
+ * the preferred side of the parent figure on which to place this
+ * border item as defined in {@link PositionConstants}
+ * @param interval
+ * interval between border items used in collision resolving (must be > 0)
+ */
+ public RoundedRectangleLabelPositionLocator(IFigure parentFigure, int preferredSide, int interval) {
+ this(interval, parentFigure);
+ this.preferredSide = preferredSide;
+ this.originalPreferredSide = preferredSide;
+ }
+
+ /**
+ * The preferred location overrides the preferred side.
+ *
+ * @param borderItem
+ * the border item
+ * @param parentFigure
+ * the parent figure
+ * @param constraint
+ * the constraint
+ */
+ public RoundedRectangleLabelPositionLocator(IFigure borderItem, IFigure parentFigure, Rectangle constraint) {
+ this(parentFigure);
+ setConstraint(constraint);
+ }
+
+ /**
+ * The preferred location overrides the preferred side.
+ *
+ * @param borderItem
+ * the border item
+ * @param parentFigure
+ * the parent figure
+ * @param constraint
+ * the constraint
+ * @param interval
+ * interval between border items used in collision resolving (must be > 0)
+ */
+ public RoundedRectangleLabelPositionLocator(IFigure borderItem, IFigure parentFigure, Rectangle constraint, int interval) {
+ this(interval, parentFigure);
+ setConstraint(constraint);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator#resetPosition(org.eclipse.draw2d.geometry.Rectangle)
+ */
+ /**
+ * @see org.eclipse.gmf.runtime.draw2d.ui.figures.IBorderItemLocator#setConstraint(org.eclipse.draw2d.geometry.Rectangle)
+ *
+ * @param theConstraint
+ */
+
+ public void setConstraint(Rectangle theConstraint) {
+ this.constraint = theConstraint;
+ if (!isLabelConstrained()) {
+ if (theConstraint.getTopLeft().x == 0 || theConstraint.getTopLeft().y == 0) {
+ setCurrentSideOfParent(getPreferredSideOfParent());
+ }
+ }
+
+ }
+
+ /**
+ * Get the preferred location. If none has been previously set, use the
+ * preferred side to take an initial guess.
+ *
+ * @param borderItem
+ * the border item
+ * @return point
+ */
+ protected Point getPreferredLocation(IFigure borderItem) {
+ Point constraintLocation = getConstraint().getLocation();
+ Point ptAbsoluteLocation = this.getAbsoluteToBorder(constraintLocation);
+ if (constraintLocation.x == 0 || constraintLocation.y == 0) {
+ return getPreferredLocation(getPreferredSideOfParent(), borderItem);
+ } else {
+ return ptAbsoluteLocation;
+ }
+ }
+
+ /**
+ * Utility to calculate the parent bounds with consideration for the handle
+ * bounds inset.
+ *
+ * @return <code>Rectangle</code> that is the bounds of the parent.
+ */
+ protected Rectangle getParentBorder() {
+ Rectangle bounds = getParentFigure().getBounds().getCopy();
+ if (getParentFigure() instanceof NodeFigure) {
+ bounds = ((NodeFigure) getParentFigure()).getHandleBounds().getCopy();
+ }
+ return bounds;
+ }
+
+ /**
+ * Get an initial location based on the side. ( choose middle of the side )
+ *
+ * @param side
+ * the preferred side of the parent figure on which to place this
+ * border item as defined in {@link PositionConstants}
+ * @param borderItem
+ * the border item
+ * @return point
+ */
+ protected Point getPreferredLocation(int side, IFigure borderItem) {
+
+ // get bounds of the parent
+ Rectangle bounds = getParentBorder();
+ int parentFigureWidth = bounds.width;
+ int parentFigureHeight = bounds.height;
+ int parentFigureX = bounds.x;
+ int parentFigureY = bounds.y;
+ int x = parentFigureX;
+ int y = parentFigureY;
+ Dimension borderItemSize = getSize(borderItem);
+
+ if (!isLabelConstrained()) {
+ // position if the label is free, taking into account of the offset
+ x = parentFigureX + getFloatingItemOffset().width;
+ y = parentFigureY + getFloatingItemOffset().height;
+
+ } else {
+ // position if a constraint position
+ if (side == PositionConstants.WEST) {
+ x = parentFigureX - borderItemSize.width + getBorderItemOffset().width;
+ y += parentFigureHeight / 2;
+ } else if (side == PositionConstants.EAST) {
+ x = parentFigureX + parentFigureWidth - getBorderItemOffset().width;
+ y += parentFigureHeight / 2;
+ } else if (side == PositionConstants.NORTH) {
+ y = parentFigureY - borderItemSize.height + getBorderItemOffset().height;
+ x += parentFigureWidth / 2;
+ } else if (side == PositionConstants.SOUTH) {
+ x += parentFigureWidth / 2;
+ y = parentFigureY + parentFigureHeight - getBorderItemOffset().height;
+ }
+ }
+
+ return new Point(x, y);
+ }
+
+ /**
+ * Ensure the suggested location actually lies on the parent boundary. The
+ * side takes precedence.
+ *
+ * @param suggestedLocation
+ * the suggested location
+ * @param suggestedSide
+ * the suggested side
+ * @param borderItem
+ * the border item
+ * @return point
+ */
+ protected Point locateOnParent(Point suggestedLocation, int suggestedSide, IFigure borderItem) {
+
+ Rectangle bounds = getParentBorder();
+ int parentFigureWidth = bounds.width;
+ int parentFigureHeight = bounds.height;
+ int parentFigureX = bounds.x;
+ int parentFigureY = bounds.y;
+ Dimension borderItemSize = getSize(borderItem);
+ int newX = suggestedLocation.x;
+ int newY = suggestedLocation.y;
+ int westX = parentFigureX - borderItemSize.width + getBorderItemOffset().width;
+ int eastX = parentFigureX + parentFigureWidth - getBorderItemOffset().width;
+ int southY = parentFigureY + parentFigureHeight - getBorderItemOffset().height;
+ int northY = parentFigureY - borderItemSize.height + getBorderItemOffset().height;
+
+ if (suggestedSide == PositionConstants.WEST) {
+ if (suggestedLocation.x != westX) {
+ newX = westX;
+ }
+ if (suggestedLocation.y < bounds.getTopLeft().y) {
+ newY = northY + borderItemSize.height;
+ } else if (suggestedLocation.y > bounds.getBottomLeft().y - borderItemSize.height) {
+ newY = southY - borderItemSize.height;
+ }
+ } else if (suggestedSide == PositionConstants.EAST) {
+ if (suggestedLocation.x != eastX) {
+ newX = eastX;
+ }
+ if (suggestedLocation.y < bounds.getTopLeft().y) {
+ newY = northY + borderItemSize.height;
+ } else if (suggestedLocation.y > bounds.getBottomLeft().y - borderItemSize.height) {
+ newY = southY - borderItemSize.height;
+ }
+ } else if (suggestedSide == PositionConstants.SOUTH) {
+ if (suggestedLocation.y != southY) {
+ newY = southY;
+ }
+ if (suggestedLocation.x < bounds.getBottomLeft().x) {
+ newX = westX + borderItemSize.width;
+ } else if (suggestedLocation.x > bounds.getBottomRight().x - borderItemSize.width) {
+ newX = eastX - borderItemSize.width;
+ }
+ } else { // NORTH
+ if (suggestedLocation.y != northY) {
+ newY = northY;
+ }
+ if (suggestedLocation.x < bounds.getBottomLeft().x) {
+ newX = westX + borderItemSize.width;
+ } else if (suggestedLocation.x > bounds.getBottomRight().x - borderItemSize.width) {
+ newX = eastX - borderItemSize.width;
+ }
+ }
+ return new Point(newX, newY);
+ }
+
+ /**
+ * Determine if the the given point conflicts with the position of an
+ * existing borderItemFigure and returns the conflicting border item figure.
+ *
+ * @param recommendedLocation
+ * the recommended location
+ * @param targetBorderItem
+ * the target border item
+ * @return the conflicting border item figure
+ */
+ protected IFigure getConflictingBorderItemFigure(Point recommendedLocation, IFigure targetBorderItem) {
+ Rectangle recommendedRect = new Rectangle(recommendedLocation, getSize(targetBorderItem));
+ List borderItems = targetBorderItem.getParent().getChildren();
+ // Only check those border items that would have already been
+ // relocated. See Bugzilla#214799.
+ int currentIndex = borderItems.indexOf(targetBorderItem);
+ for (int i = 0; i < currentIndex; i++) {
+ IFigure borderItem = (IFigure) borderItems.get(i);
+ if (borderItem.isVisible()) {
+ Rectangle rect = borderItem.getBounds().getCopy();
+ if (rect.intersects(recommendedRect)) {
+ return borderItem;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * The preferred side takes precedence.
+ *
+ * @param suggestedLocation
+ * the suggested location
+ * @param suggestedSide
+ * the suggested side
+ * @param circuitCount
+ * recursion count to avoid an infinite loop
+ * @param borderItem
+ * the border item
+ * @return point
+ */
+ protected Point locateOnBorder(Point suggestedLocation, int suggestedSide, int circuitCount, IFigure borderItem) {
+ Point recommendedLocation = locateOnParent(suggestedLocation, suggestedSide, borderItem);
+ Dimension borderItemSize = getSize(borderItem);
+ IFigure conflictingBorderItem = getConflictingBorderItemFigure(recommendedLocation, borderItem);
+ if (circuitCount < 4 && conflictingBorderItem != null) {
+ if (suggestedSide == PositionConstants.WEST) {
+ do {
+ calculateNextNonConflictingPosition(recommendedLocation, interval, suggestedSide, borderItem, conflictingBorderItem.getBounds());
+ conflictingBorderItem = getConflictingBorderItemFigure(recommendedLocation, borderItem);
+ } while (conflictingBorderItem != null);
+ if (recommendedLocation.y > getParentBorder().getBottomLeft().y - borderItemSize.height) { // off the bottom,
+ // wrap south
+ return locateOnBorder(recommendedLocation, PositionConstants.SOUTH, circuitCount + 1, borderItem);
+ } else if (recommendedLocation.y < getParentBorder().getTopLeft().y - borderItemSize.height) { // off the top, wrap north
+ return locateOnBorder(recommendedLocation, PositionConstants.NORTH, circuitCount + 1, borderItem);
+ }
+ } else if (suggestedSide == PositionConstants.SOUTH) {
+ do {
+ calculateNextNonConflictingPosition(recommendedLocation, interval, suggestedSide, borderItem, conflictingBorderItem.getBounds());
+ conflictingBorderItem = getConflictingBorderItemFigure(recommendedLocation, borderItem);
+ } while (conflictingBorderItem != null);
+ if (recommendedLocation.x > getParentBorder().getBottomRight().x - borderItemSize.width) {
+ return locateOnBorder(recommendedLocation, PositionConstants.EAST, circuitCount + 1, borderItem);
+ } else if (recommendedLocation.x < getParentBorder().getBottomLeft().x - borderItemSize.width) {
+ return locateOnBorder(recommendedLocation, PositionConstants.WEST, circuitCount + 1, borderItem);
+ }
+ } else if (suggestedSide == PositionConstants.EAST) {
+ // move up the east side
+ do {
+ calculateNextNonConflictingPosition(recommendedLocation, interval, suggestedSide, borderItem, conflictingBorderItem.getBounds());
+ conflictingBorderItem = getConflictingBorderItemFigure(recommendedLocation, borderItem);
+ } while (conflictingBorderItem != null);
+ if (recommendedLocation.y < getParentBorder().getTopRight().y) {
+ // east is full, try north.
+ return locateOnBorder(recommendedLocation, PositionConstants.NORTH, circuitCount + 1, borderItem);
+ } else if (recommendedLocation.y > getParentBorder().getBottomRight().y) {
+ // east is full, try south.
+ return locateOnBorder(recommendedLocation, PositionConstants.SOUTH, circuitCount + 1, borderItem);
+ }
+ } else { // NORTH
+ do {
+ calculateNextNonConflictingPosition(recommendedLocation, interval, suggestedSide, borderItem, conflictingBorderItem.getBounds());
+ conflictingBorderItem = getConflictingBorderItemFigure(recommendedLocation, borderItem);
+ } while (conflictingBorderItem != null);
+ if (recommendedLocation.x < getParentBorder().getTopLeft().x) {
+ return locateOnBorder(recommendedLocation, PositionConstants.WEST, circuitCount + 1, borderItem);
+ } else if (recommendedLocation.x > getParentBorder().getTopRight().x) {
+ return locateOnBorder(recommendedLocation, PositionConstants.EAST, circuitCount + 1, borderItem);
+ }
+ }
+ }
+ return recommendedLocation;
+ }
+
+ /**
+ * Modifies the location of the border item (currentLocation) to avoid
+ * overlapping with the obstacle rectangle (another border item bounds).
+ *
+ * @param currentLocation
+ * The current location of the border item
+ * @param interval
+ * The suggested spacing to try to find the next non-conflicting
+ * position
+ * @param currentSide
+ * The current side of the border item
+ * @param borderItem
+ * The borderItem being relocated (here to be used by subclasses
+ * if needed)
+ * @param obstacle
+ * The bounds of the border item conflicting with the border item
+ * currently being relocated
+ */
+ protected void calculateNextNonConflictingPosition(Point currentLocation, int interval, int currentSide, IFigure borderItem, Rectangle obstacle) {
+ switch (currentSide) {
+ case PositionConstants.WEST:
+ currentLocation.y = obstacle.getBottomLeft().y + interval;
+ break;
+ case PositionConstants.SOUTH: // Move towards the east side
+ currentLocation.x = obstacle.getBottomRight().x + interval;
+ break;
+ case PositionConstants.EAST:
+ currentLocation.y = obstacle.getTopRight().y - interval - getSize(borderItem).height;
+ break;
+ case PositionConstants.NORTH: // Move towards the west side
+ currentLocation.x = obstacle.getTopLeft().x - interval - getSize(borderItem).width;
+ break;
+ default:
+ throw new IllegalArgumentException("Invalid side argument: " //$NON-NLS-1$
+ + currentSide + ". Should be the value from PositionConstants: WEST, EAST, NORTH or SOUTH"); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Convert the relative coords in the model to ones that are Relative to the
+ * container (absolute in respect to the main figure).
+ *
+ * @param ptRelativeOffset
+ * the pt relative offset
+ * @return point
+ */
+ protected Point getAbsoluteToBorder(Point ptRelativeOffset) {
+ Point parentOrigin = getParentBorder().getTopLeft();
+ return parentOrigin.translate(ptRelativeOffset);
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.draw2d.ui.figures.IBorderItemLocator#getValidLocation(org.eclipse.draw2d.geometry.Rectangle, org.eclipse.draw2d.IFigure)
+ *
+ * @param proposedLocation
+ * @param borderItem
+ * @return
+ */
+ public Rectangle getValidLocation(Rectangle proposedLocation, IFigure borderItem) {
+ Rectangle realLocation = new Rectangle(proposedLocation);
+ if (!isLabelConstrained())
+ return realLocation;
+ int side = findClosestSideOfParent(proposedLocation, getParentBorder());
+ Point newTopLeft = locateOnBorder(realLocation.getTopLeft(), side, 0, borderItem);
+ realLocation.setLocation(newTopLeft);
+ return realLocation;
+ }
+
+ /**
+ * Checks if the label is constrained.
+ *
+ * @return true, if the label is constrained
+ */
+ public boolean isLabelConstrained() {
+ if (getParentFigure().getChildren().get(0) instanceof IRoundedRectangleFigure)
+ return ((IRoundedRectangleFigure) ((IFigure) getParentFigure().getChildren().get(0))).isFloatingNameConstrained();
+ return false;
+ }
+
+ /**
+ * Find the closest side when x,y is inside parent.
+ *
+ * @param proposedLocation
+ * the proposed location
+ * @param parentBorder
+ * the parent border
+ * @return draw constant
+ */
+ public static int findClosestSideOfParent(Rectangle proposedLocation, Rectangle parentBorder) {
+ // Rectangle parentBorder = getParentBorder();
+ Point parentCenter = parentBorder.getCenter();
+ Point childCenter = proposedLocation.getCenter();
+ if (childCenter.x < parentCenter.x) // West, North or South.
+ {
+ if (childCenter.y < parentCenter.y) // west or north
+ {
+ // closer to west or north?
+ Point parentTopLeft = parentBorder.getTopLeft();
+ if ((childCenter.x - parentTopLeft.x) <= (childCenter.y - parentTopLeft.y)) {
+ return PositionConstants.WEST;
+ } else {
+ return PositionConstants.NORTH;
+ }
+ } else { // west or south
+ Point parentBottomLeft = parentBorder.getBottomLeft();
+ if ((childCenter.x - parentBottomLeft.x) <= (parentBottomLeft.y - childCenter.y)) {
+ return PositionConstants.WEST;
+ } else {
+ return PositionConstants.SOUTH;
+ }
+ }
+ } else { // EAST, NORTH or SOUTH
+ if (childCenter.y < parentCenter.y) // north or east
+ {
+ Point parentTopRight = parentBorder.getTopRight();
+ if ((parentTopRight.x - childCenter.x) <= (childCenter.y - parentTopRight.y)) {
+ return PositionConstants.EAST;
+ } else {
+ return PositionConstants.NORTH;
+ }
+ } else { // south or east.
+ Point parentBottomRight = parentBorder.getBottomRight();
+ if ((parentBottomRight.x - childCenter.x) <= (parentBottomRight.y - childCenter.y)) {
+ return PositionConstants.EAST;
+ } else {
+ return PositionConstants.SOUTH;
+ }
+ }
+ }
+ }
+
+ /**
+ * Relocate the label
+ *
+ * @see org.eclipse.draw2d.Locator#relocate(org.eclipse.draw2d.IFigure)
+ *
+ * @param target
+ */
+
+ public void relocate(IFigure target) {
+ Dimension size = getSize(target);
+
+ // set the position of the floating label by setting the bounds
+ if (!isLabelConstrained()) {
+ // If you want to fix the label use this code
+ // Rectangle proposedBounds = constraint.getCopy();//To block the Label
+ // proposedBounds.setLocation((parentFigure.getBounds().getTopLeft().translate(getFloatingItemOffset())));//To block the Label
+ // proposedBounds.setSize(target.getPreferredSize());//To block the Label
+ // target.setBounds(proposedBounds);//To block the Label
+
+ super.relocate(target);
+ // target.setBounds(new Rectangle(getPreferredLocation(target), size));
+
+ } else {
+ Rectangle rectSuggested = new Rectangle(getPreferredLocation(target), size);
+ if (constraint.x == 0 && constraint.y == 0) {
+ // if setting back to the original position, use the preferred
+ // side that client indicated then
+ setPreferredSideOfParent(originalPreferredSide);
+ } else {
+ int closestSide = findClosestSideOfParent(rectSuggested, getParentBorder());
+ setPreferredSideOfParent(closestSide);
+ }
+ Point ptNewLocation = locateOnBorder(getPreferredLocation(target), getPreferredSideOfParent(), 0, target);
+ Rectangle proposedBounds = new Rectangle(ptNewLocation, size);
+
+ // Translate the label when it's on north or on south according to the text alignment
+ switch (getPreferredSideOfParent()) {
+ case PositionConstants.NORTH:
+ case PositionConstants.SOUTH:
+ int x;
+ // Set Location
+ switch (getTextAlignment()) {
+ case PositionConstants.LEFT:
+ x = 0;
+ break;
+ case PositionConstants.RIGHT:
+ x = -proposedBounds.width;
+ break;
+ case PositionConstants.CENTER:
+ x = -proposedBounds.width / 2;
+ break;
+ default:
+ x = 0;
+ break;
+ }
+ proposedBounds.translate(x, 0);
+ break;
+ default:
+ break;
+ }
+
+ target.setBounds(proposedBounds);
+ setCurrentSideOfParent(findClosestSideOfParent(new Rectangle(ptNewLocation, size), getParentBorder()));
+ }
+ }
+
+ /**
+ * getter for the parent figure.
+ *
+ * @return <code>IFigure</code>
+ */
+ public IFigure getParentFigure() {
+ return parentFigure;
+ }
+
+ /**
+ * Gets the border item offset.
+ *
+ * @return Returns the borderItemOffset.
+ */
+ public Dimension getBorderItemOffset() {
+ return borderItemOffset;
+ }
+
+ /**
+ * Sets the border item offset.
+ *
+ * @param borderItemOffset
+ * The borderItemOffset to set.
+ */
+ public void setBorderItemOffset(Dimension borderItemOffset) {
+ this.borderItemOffset = borderItemOffset;
+ }
+
+ /**
+ * Returns the preferred side of the parent figure on which to place this
+ * border item.
+ *
+ * @return the preferred side of the parent figure on which to place this
+ * border item as defined in {@link PositionConstants}
+ */
+ public int getPreferredSideOfParent() {
+ return preferredSide;
+ }
+
+ /**
+ * Sets the preferred side of the parent figure on which to place this
+ * border item.
+ *
+ * @param preferredSide
+ * the preferred side of the parent figure on which to place this
+ * border item as defined in {@link PositionConstants}
+ */
+ public void setPreferredSideOfParent(int preferredSide) {
+ this.preferredSide = preferredSide;
+ setCurrentSideOfParent(preferredSide);
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.draw2d.ui.figures.IBorderItemLocator#getCurrentSideOfParent()
+ *
+ * @return
+ */
+ public int getCurrentSideOfParent() {
+ if (!isLabelConstrained())
+ return PositionConstants.NONE;
+ return currentSide;
+ }
+
+ /**
+ * Sets the side of the parent figure on which the border item should
+ * appear.
+ *
+ * @param side
+ * the side on which this border item appears as defined in {@link PositionConstants}
+ */
+ public void setCurrentSideOfParent(int side) {
+ this.currentSide = side;
+ }
+
+ /**
+ * Gets the size of the border item figure.
+ *
+ * @param borderItem
+ * the border item
+ * @return the size of the border item figure.
+ */
+ protected final Dimension getSize(IFigure borderItem) {
+ Dimension size = getConstraint().getSize();
+ if (size.isEmpty()) {
+ size = borderItem.getPreferredSize();
+ }
+ return size;
+ }
+
+ /**
+ * Sets the floating item offset.
+ *
+ * @param dimension
+ * the new floating item offset
+ */
+ public void setFloatingItemOffset(Dimension dimension) {
+ if (getParentFigure().getChildren().get(0) instanceof IRoundedRectangleFigure)
+ // Set the rounded rectangle figure offset properties
+ ((IRoundedRectangleFigure) ((IFigure) getParentFigure().getChildren().get(0))).setFloatingNameOffset(dimension);
+ }
+
+ /**
+ * Gets the floating item offset.
+ *
+ * @return the floating item offset
+ */
+ public Dimension getFloatingItemOffset() {
+ if (getParentFigure().getChildren().get(0) instanceof IRoundedRectangleFigure)
+ // Get the rounded rectangle figure offset properties
+ return ((IRoundedRectangleFigure) ((IFigure) getParentFigure().getChildren().get(0))).getFloatingNameOffset();
+ return new Dimension();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF
index 81e3c18eaf6..2eb98234c73 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF
@@ -1,81 +1,81 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.diagram.communication,
- org.eclipse.papyrus.uml.diagram.communication.custom.commands,
- org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts,
- org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies,
- org.eclipse.papyrus.uml.diagram.communication.custom.factory,
- org.eclipse.papyrus.uml.diagram.communication.custom.figures,
- org.eclipse.papyrus.uml.diagram.communication.custom.helper,
- org.eclipse.papyrus.uml.diagram.communication.custom.parser,
- org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic,
- org.eclipse.papyrus.uml.diagram.communication.custom.providers,
- org.eclipse.papyrus.uml.diagram.communication.edit.commands,
- org.eclipse.papyrus.uml.diagram.communication.edit.helpers,
- org.eclipse.papyrus.uml.diagram.communication.edit.parts,
- org.eclipse.papyrus.uml.diagram.communication.edit.policies,
- org.eclipse.papyrus.uml.diagram.communication.expressions,
- org.eclipse.papyrus.uml.diagram.communication.navigator,
- org.eclipse.papyrus.uml.diagram.communication.parsers,
- org.eclipse.papyrus.uml.diagram.communication.part,
- org.eclipse.papyrus.uml.diagram.communication.preferences,
- org.eclipse.papyrus.uml.diagram.communication.providers
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.properties,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,
- org.eclipse.ocl.ecore,
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.1.0",
- org.eclipse.uml2.uml.resources;bundle-version="3.0.0",
- org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0",
- org.eclipse.ui.navigator.resources;bundle-version="3.4.400",
- org.eclipse.ui.navigator;bundle-version="3.5.200",
- org.eclipse.core.expressions;bundle-version="3.4.400",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.1.0",
- org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.7.0",
- org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.jface,
- org.eclipse.ui.views,
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.xmi,
- org.eclipse.emf.edit.ui,
- org.eclipse.gmf.runtime.emf.core,
- org.eclipse.gmf.runtime.emf.commands.core,
- org.eclipse.gmf.runtime.emf.ui.properties,
- org.eclipse.gmf.runtime.diagram.ui,
- org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.diagram.ui.providers.ide,
- org.eclipse.gmf.runtime.diagram.ui.render,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.draw2d;visibility:=reexport,
- org.eclipse.gmf.runtime.draw2d.ui;visibility:=reexport,
- org.eclipse.uml2.uml;visibility:=reexport,
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.emf.ecore.edit;visibility:=reexport,
- org.eclipse.emf.validation;visibility:=reexport,
- org.eclipse.gef,
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0"
-Bundle-Vendor: %providerName
-Eclipse-LazyStart: true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.communication.part.U
- MLDiagramEditorPlugin
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.communication; singleton:=true
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.uml.diagram.communication,
+ org.eclipse.papyrus.uml.diagram.communication.custom.commands,
+ org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts,
+ org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies,
+ org.eclipse.papyrus.uml.diagram.communication.custom.factory,
+ org.eclipse.papyrus.uml.diagram.communication.custom.figures,
+ org.eclipse.papyrus.uml.diagram.communication.custom.helper,
+ org.eclipse.papyrus.uml.diagram.communication.custom.parser,
+ org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic,
+ org.eclipse.papyrus.uml.diagram.communication.custom.providers,
+ org.eclipse.papyrus.uml.diagram.communication.edit.commands,
+ org.eclipse.papyrus.uml.diagram.communication.edit.helpers,
+ org.eclipse.papyrus.uml.diagram.communication.edit.parts,
+ org.eclipse.papyrus.uml.diagram.communication.edit.policies,
+ org.eclipse.papyrus.uml.diagram.communication.expressions,
+ org.eclipse.papyrus.uml.diagram.communication.navigator,
+ org.eclipse.papyrus.uml.diagram.communication.parsers,
+ org.eclipse.papyrus.uml.diagram.communication.part,
+ org.eclipse.papyrus.uml.diagram.communication.preferences,
+ org.eclipse.papyrus.uml.diagram.communication.providers
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.properties,
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,
+ org.eclipse.ocl.ecore,
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.1.0",
+ org.eclipse.uml2.uml.resources;bundle-version="3.0.0",
+ org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0",
+ org.eclipse.ui.navigator.resources;bundle-version="3.4.400",
+ org.eclipse.ui.navigator;bundle-version="3.5.200",
+ org.eclipse.core.expressions;bundle-version="3.4.400",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.1.0",
+ org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.7.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.jface,
+ org.eclipse.ui.views,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.emf.edit.ui,
+ org.eclipse.gmf.runtime.emf.core,
+ org.eclipse.gmf.runtime.emf.commands.core,
+ org.eclipse.gmf.runtime.emf.ui.properties,
+ org.eclipse.gmf.runtime.diagram.ui,
+ org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui.providers.ide,
+ org.eclipse.gmf.runtime.diagram.ui.render,
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor,
+ org.eclipse.draw2d;visibility:=reexport,
+ org.eclipse.gmf.runtime.draw2d.ui;visibility:=reexport,
+ org.eclipse.uml2.uml;visibility:=reexport,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.emf.validation;visibility:=reexport,
+ org.eclipse.gef,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.core.databinding.observable
+Bundle-Vendor: %providerName
+Eclipse-LazyStart: true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorPlugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.communication; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/AbstractObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/AbstractObservationEditPart.java
deleted file mode 100644
index 10d5825c5a8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/AbstractObservationEditPart.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://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.communication.custom.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.GraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editparts.IUMLNamedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-
-/**
- * This is a super class for observation edit parts
- *
- */
-public abstract class AbstractObservationEditPart extends NamedElementEditPart implements IUMLNamedElementEditPart {
-
- /**
- *
- * Constructor.
- *
- * @param view
- */
- public AbstractObservationEditPart(View view) {
- super(view);
- }
-
- /**
- *
- * {@inheritDoc}
- */
- @Override
- protected void refreshBounds() {
-
- int width = 20;
- int height = 20;
- 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));
-
- }
-
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
- // set the figure active when the feature of the of a class is true
- if (resolveSemanticElement() != null) {
- refreshFontColor();
-
- // To adapt the display of the container to the icon!
- refreshBounds();
- }
-
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomDurationObservationLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomDurationObservationLabelEditPartCN.java
new file mode 100644
index 00000000000..bb6ae11ef41
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomDurationObservationLabelEditPartCN.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * 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:
+ * Céline Janssens (ALL4TEC) celine.janssens@all4tec.net - Bug 440224 : Label Alignment
+ * Mickaël ADAM (ALL4TEC) mickael.adam@all4tec.net - Text alignment implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts;
+
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationLabelEditPartCN;
+
+/**
+ * The Class CustomTimeObservationNameEditPartCN.
+ */
+public class CustomDurationObservationLabelEditPartCN extends DurationObservationLabelEditPartCN {
+
+
+ /**
+ * Instantiates a new custom time observation name edit part child node.
+ *
+ * @param view
+ * the view
+ */
+ public CustomDurationObservationLabelEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * Gets the default text alignment.
+ *
+ * @return the default text alignment
+ */
+ @Override
+ protected int getDefaultTextAlignment() {
+ return PositionConstants.LEFT;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart#getDefaultLabelVisibility()
+ *
+ * @return
+ */
+ @Override
+ protected boolean getDefaultLabelVisibility() {
+ return true;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomLifelineEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomLifelineEditPartCN.java
index 7e38558a4e2..76807b59142 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomLifelineEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomLifelineEditPartCN.java
@@ -10,6 +10,7 @@
* Contributors:
* Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - use of rounded compartment edit part as super type.
*
*****************************************************************************/
@@ -18,18 +19,12 @@ package org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
-import org.eclipse.gmf.runtime.notation.FillStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.runtime.notation.datatype.GradientData;
import org.eclipse.papyrus.uml.diagram.common.helper.NotificationHelper;
import org.eclipse.papyrus.uml.diagram.common.providers.UIAdapterImpl;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN;
-import org.eclipse.swt.graphics.Color;
import org.eclipse.uml2.uml.ConnectableElement;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.Property;
@@ -168,56 +163,6 @@ public class CustomLifelineEditPartCN extends LifelineEditPartCN {
}
/**
- * Create specific anchor to handle connection on top, on center and on
- * bottom of the lifeline
- */
- /*
- * @Override
- * public ConnectionAnchor getTargetConnectionAnchor(
- * ConnectionEditPart connEditPart) {
- * if (connEditPart instanceof MessageEditPart) {
- * // Create message
- * return new org.eclipse.papyrus.uml.diagram.communication.custom.figures.LifelineAnchor(
- * getPrimaryShape().getNameLabel());
- * } else {
- * return super.getTargetConnectionAnchor(connEditPart);
- * }
- *
- * }
- */
- /**
- * Create specific anchor to handle connection on top, on center and on
- * bottom of the lifeline
- */
- /*
- * @Override
- * public ConnectionAnchor getTargetConnectionAnchor(Request request) {
- * if (request instanceof CreateUnspecifiedTypeConnectionRequest) {
- * CreateUnspecifiedTypeConnectionRequest createRequest = (CreateUnspecifiedTypeConnectionRequest) request;
- * List<?> relationshipTypes = createRequest.getElementTypes();
- * for (Object obj : relationshipTypes) {
- * if (org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes.Message_8009
- * .equals(obj)) {
- * // Create Message
- * return new org.eclipse.papyrus.uml.diagram.communication.custom.figures.LifelineAnchor(
- * getPrimaryShape().getNameLabel());
- * }
- * }
- * } else if (request instanceof ReconnectRequest) {
- * ReconnectRequest reconnectRequest = (ReconnectRequest) request;
- * ConnectionEditPart connectionEditPart = reconnectRequest
- * .getConnectionEditPart();
- * if (connectionEditPart instanceof MessageEditPart) {
- * // Create
- * return new LifelineAnchor(getPrimaryShape().getNameLabel());
- * }
- * }
- *
- * return super.getTargetConnectionAnchor(request);
- * }
- */
-
- /**
* Remove listeners for Lifeline to handle notification in the message
* occurence specification
*/
@@ -227,80 +172,4 @@ public class CustomLifelineEditPartCN extends LifelineEditPartCN {
super.removeNotify();
}
- /**
- * Overrides because getNodeFigure() doesn't return the getFigure() anymore.
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#setBackgroundColor(org.eclipse.swt.graphics.Color)
- */
- @Override
- protected void setBackgroundColor(Color c) {
- NodeFigure fig = (NodeFigure) getFigure();
- fig.setBackgroundColor(c);
- fig.setIsUsingGradient(false);
- fig.setGradientData(-1, -1, 0);
- }
-
- /**
- * Overrides because getNodeFigure() doesn't return the getFigure() anymore.
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#setGradient(org.eclipse.gmf.runtime.notation.datatype.GradientData)
- */
- @Override
- protected void setGradient(GradientData gradient) {
- NodeFigure fig = (NodeFigure) getFigure();
- FillStyle style = (FillStyle) getPrimaryView().getStyle(NotationPackage.Literals.FILL_STYLE);
- if (gradient != null) {
- fig.setIsUsingGradient(true);
- fig.setGradientData(style.getFillColor(), gradient.getGradientColor1(), gradient.getGradientStyle());
- } else {
- fig.setIsUsingGradient(false);
- }
- }
-
- /**
- * Overrides because getNodeFigure() doesn't return the getFigure() anymore.
- *
- * @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart#setTransparency(int)
- */
- @Override
- protected void setTransparency(int transp) {
- NodeFigure fig = (NodeFigure) getFigure();
- fig.setTransparency(transp);
- }
-
- /**
- * Update the rectangle bounds. In case of a creation, the lifeline width
- * and height will be 0. Get the preferred size In case of a move, when the
- * lifeline has not be resize, the width or height may be set to -1. Get the
- * according figure bounds.
- *
- * @param rect
- * the rectangle to update
- */
- @SuppressWarnings("unused")
- private void updateRectangleBounds(Rectangle rect) {
-
- // When moving the lifeline
- if (rect.width == -1) {
- rect.width = getFigure().getBounds().width;
- }
- if (rect.height == -1) {
- rect.height = getFigure().getBounds().height;
- }
- if (rect.x == -1) {
- rect.x = getFigure().getBounds().x;
- }
- if (rect.y == -1) {
- rect.y = getFigure().getBounds().y;
- }
-
- // When creating the lifeline
- if (rect.width == 0) {
- rect.width = getFigure().getPreferredSize().width;
- }
- if (rect.height == 0) {
- rect.height = getFigure().getPreferredSize().height;
- }
- }
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomTimeObservationNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomTimeObservationNameEditPartCN.java
new file mode 100644
index 00000000000..bc8f902e77d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/edit/parts/CustomTimeObservationNameEditPartCN.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * 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:
+ * Céline Janssens (ALL4TEC) celine.janssens@all4tec.net - Bug 440224 : Label Alignment
+ * Mickaël ADAM (ALL4TEC) mickael.adam@all4tec.net - Text alignment implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts;
+
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationNameEditPartCN;
+
+/**
+ * The Class CustomTimeObservationNameEditPartCN.
+ */
+public class CustomTimeObservationNameEditPartCN extends TimeObservationNameEditPartCN {
+
+
+ /**
+ * Instantiates a new custom time observation name edit part child node.
+ *
+ * @param view
+ * the view
+ */
+ public CustomTimeObservationNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * Gets the default text alignment.
+ *
+ * @return the default text alignment
+ */
+ @Override
+ protected int getDefaultTextAlignment() {
+ return PositionConstants.LEFT;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart#getDefaultLabelVisibility()
+ *
+ * @return
+ */
+ @Override
+ protected boolean getDefaultLabelVisibility() {
+ return true;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/factory/CustomUMLeditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/factory/CustomUMLeditPartFactory.java
index fe0fa19b93f..eb06bdad056 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/factory/CustomUMLeditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/factory/CustomUMLeditPartFactory.java
@@ -15,14 +15,18 @@ package org.eclipse.papyrus.uml.diagram.communication.custom.factory;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts.CustomDurationObservationLabelEditPartCN;
import org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts.CustomInteractionEditPart;
import org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts.CustomLifelineEditPartCN;
import org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts.CustomMessageEditPart;
import org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts.CustomMessageNameEditPart;
+import org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts.CustomTimeObservationNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationLabelEditPartCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationNameEditPartCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.UMLEditPartFactory;
import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
@@ -54,6 +58,10 @@ public class CustomUMLeditPartFactory extends UMLEditPartFactory {
return new CustomMessageEditPart(view);
case InteractionEditPart.VISUAL_ID:
return new CustomInteractionEditPart(view);
+ case TimeObservationNameEditPartCN.VISUAL_ID:
+ return new CustomTimeObservationNameEditPartCN(view);
+ case DurationObservationLabelEditPartCN.VISUAL_ID:
+ return new CustomDurationObservationLabelEditPartCN(view);
}
}
return super.createEditPart(context, model);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/InteractionRectangleFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/InteractionRectangleFigure.java
index 10d43bc8098..50f4d95901c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/InteractionRectangleFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/figures/InteractionRectangleFigure.java
@@ -1,102 +1,65 @@
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
*
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Atos Origin - Initial API and implementation
- * Saadia DHOUIB (CEA LIST) saadia.dhouib@cea.fr - adapted from sequence diagram
+ * Mickael ADAM (ALL4TEC) - mickael.adam@all4tec.net
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.communication.custom.figures;
-import org.eclipse.draw2d.BorderLayout;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.OrderedLayout;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.ToolbarLayout;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.InteractionFigure;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.LeftToolbarLayout;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
/**
- *
- *
- *
+ * The Class InteractionRectangleFigure.
*/
-public class InteractionRectangleFigure extends NodeNamedElementFigure {
+public class InteractionRectangleFigure extends RoundedCompartmentFigure {
- protected InteractionFigure interactionLabelContainer;
+ /** The Attribute Compartment. */
+ private final static String INTERACTION_CONTENT_PANE_COMPARTMENT = "interactionContentPaneCompartment";
- protected RectangleFigure interactionContentPane;
+ /** The List of Compartment. */
+ private final static List<String> COMPARTMENT = new ArrayList<String>() {
- protected WrappingLabel interactionLabel;
+ private static final long serialVersionUID = 1L;
- private boolean myUseLocalCoordinates = false;
+ {
+ add(INTERACTION_CONTENT_PANE_COMPARTMENT);
+ }
+ };
/**
- * @param marginBorder
- *
+ * Default Constructor.
*/
public InteractionRectangleFigure() {
- setLayoutManager(new BorderLayout());
- createContents();
- }
-
- protected void createContents() {
- add(createHeader(), BorderLayout.TOP);
- add(createContentPane(), BorderLayout.CENTER);
- }
-
- protected RectangleFigure createContentPane() {
- interactionContentPane = new RectangleFigure();
- // Margin allow to add message easily
- interactionContentPane.setBorder(new MarginBorder(5, 5, 5, 5));
- interactionContentPane.setFill(false);
- interactionContentPane.setOutline(true);
- return interactionContentPane;
- }
-
- protected RectangleFigure createHeader() {
- interactionLabel = new WrappingLabel();
- interactionLabelContainer = new InteractionFigure();
- interactionLabelContainer.setBorder(new MarginBorder(3, 3, 3, 3));
- interactionLabelContainer.setLayoutManager(new LeftToolbarLayout());
- interactionLabelContainer.add(interactionLabel);
- RectangleFigure container = new RectangleFigure();
- container.setOutline(false);
- container.setFill(false);
- container.setLayoutManager(new ToolbarLayout(false));
- container.add(interactionLabelContainer, OrderedLayout.ALIGN_CENTER);
- return container;
- }
-
- @Override
- protected boolean useLocalCoordinates() {
- return myUseLocalCoordinates;
- }
-
- protected void setUseLocalCoordinates(boolean useLocalCoordinates) {
- myUseLocalCoordinates = useLocalCoordinates;
+ this(null);
}
/**
+ * Create a new Classifier figure with the given tag.
*
- * @return the interaction wrapping label
+ * @param tagLabel
+ * a String that will be displayed at the top of the figure
*/
- public WrappingLabel getHeaderLabel() {
- return interactionLabel;
+ public InteractionRectangleFigure(String tagLabel) {
+ super(COMPARTMENT, tagLabel);
}
/**
+ * Gets the compartment figure.
*
* @return the interactionContentPane
*/
public RectangleFigure getCompartmentFigure() {
- return interactionContentPane;
+ return getCompartment(INTERACTION_CONTENT_PANE_COMPARTMENT);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.gmfgen
index c948d6805da..44b4a17ac43 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/model/communicationdiagram.gmfgen
@@ -1,1059 +1,1135 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
- xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
- <gmfgen:GenEditorGenerator
- packageNamePrefix="org.eclipse.papyrus.uml.diagram.communication"
- modelID="PapyrusUMLCommunicationDiagram"
- diagramFileExtension="PapyrusUMLCommunication_diagram"
- domainFileExtension="PapyrusUMLCommunication"
- dynamicTemplates="true"
- templateDirectory="/org.eclipse.papyrus.def/xtend/"
- copyrightText="Copyright (c) 2014 CEA LIST.&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation">
- <diagram
- visualID="1000"
- editPartClassName="ModelEditPart"
- canonicalEditPolicyClassName="ModelCanonicalEditPolicy"
- editingDomainID="org.eclipse.papyrus.uml.diagram.communication.EditingDomain"
- validationEnabled="true"
- validationDecorators="true"
- liveValidationUIFeedback="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.Package_1000"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CustomOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <domainDiagramElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <childNodes
- visualID="8001"
- editPartClassName="LifelineEditPartCN"
- itemSemanticEditPolicyClassName="LifelineItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="LifelineCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="LifelineGraphicalNodeEditPolicyCN"
- createCommandClassName="LifelineCreateCommandCN"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.Lifeline_8001"
- displayName="Lifeline"
- editHelperClassName="LifelineEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="25"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CommunicationGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic.CustomLifelineItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Lifeline"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/lifeline"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/lifeline"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.5">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5002"
- editPartClassName="LifelineNameEditPart">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.4"
- viewPattern="{0}"
- editorPattern="{0}"
- editPattern="{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="8004"
- editPartClassName="ConstraintEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyCN"
- createCommandClassName="ConstraintCreateCommandCN"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.Constraint_8004"
- displayName="Constraint"
- editHelperClassName="ConstraintEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.5">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.6">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5064"
- editPartClassName="ConstraintNameEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="5160"
- editPartClassName="ConstraintBodyEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="8005"
- editPartClassName="CommentEditPartCN"
- itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="CommentCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyCN"
- createCommandClassName="CommentCreateCommandCN"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.Comment_8005"
- displayName="Comment"
- editHelperClassName="CommentEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.7">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5150"
- editPartClassName="CommentBodyEditPartCN"
- itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCornerBentFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="8006"
- editPartClassName="TimeObservationEditPartCN"
- itemSemanticEditPolicyClassName="TimeObservationItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="TimeObservationCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="TimeObservationGraphicalNodeEditPolicyCN"
- createCommandClassName="TimeObservationCreateCommandCN"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.TimeObservation_8006"
- displayName="TimeObservation"
- editHelperClassName="TimeObservationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.figures.TimeObservationNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.ObservationLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeObservation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.5">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5153"
- editPartClassName="TimeObservationNameEditPartCN"
- itemSemanticEditPolicyClassName="TimeObservationNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5154"
- editPartClassName="TimeObservationStereotypeLabelEditPartCN"
- itemSemanticEditPolicyClassName="TimeObservationStereotypeLabelItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="8007"
- editPartClassName="DurationObservationEditPartCN"
- itemSemanticEditPolicyClassName="DurationObservationItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="DurationObservationCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="DurationObservationGraphicalNodeEditPolicyCN"
- createCommandClassName="DurationObservationCreateCommandCN"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.DurationObservation_8007"
- displayName="DurationObservation"
- editHelperClassName="DurationObservationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.figures.DurationObservationNodeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.ObservationLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationObservation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.5">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5155"
- editPartClassName="DurationObservationLabelEditPartCN"
- itemSemanticEditPolicyClassName="DurationObservationLabelItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5156"
- editPartClassName="DurationObservationStereotypeLabelEditPartCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <topLevelNodes
- visualID="8002"
- editPartClassName="InteractionEditPart"
- itemSemanticEditPolicyClassName="InteractionItemSemanticEditPolicy"
- canonicalEditPolicyClassName="InteractionCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.0"
- graphicalNodeEditPolicyClassName="InteractionGraphicalNodeEditPolicy"
- createCommandClassName="InteractionCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- displayName="Interaction"
- editHelperClassName="InteractionEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.figures.InteractionRectangleFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="857"
- height="757"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CommunicationGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.5">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5001">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getHeaderLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="{0}"
- editorPattern="{0}"
- editPattern="{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="8016"
- editPartClassName="ShortCutDiagramEditPart"
- itemSemanticEditPolicyClassName="ShortCutDiagramItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ShortCutDiagramCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ShortCutDiagramGraphicalNodeEditPolicy"
- createCommandClassName="ShortCutDiagramCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.Diagram_8016"
- displayName="ShortCutDiagram"
- editHelperClassName="ShortCutDiagramEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DiagramNodeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="20"
- height="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.OPEN_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShortCutDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic.CustomShortcutDiagramItemSemanticEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- editPartClassName="DiagramNameEditPart"
- itemSemanticEditPolicyClassName="DiagramNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.5">
- <metaFeatures
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <links
- visualID="8009"
- editPartClassName="MessageEditPart"
- itemSemanticEditPolicyClassName="MessageItemSemanticEditPolicy"
- incomingCreationAllowed="true"
- createCommandClassName="MessageCreateCommand"
- reorientCommandClassName="MessageReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.Message_8009"
- displayName="Message"
- editHelperClassName="MessageEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.figures.MessageFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic.CustomMessageItemSemanticEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet"
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.5">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Message"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.5">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/owner"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedElement"/>
- </modelFacet>
- <labels
- visualID="6001"
- editPartClassName="MessageNameEditPart"
- itemSemanticEditPolicyClassName="MessageNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getFigureMessageCreateLabelFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.figures.CustomWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-23"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic.CustomMessageNameItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;CustomDisplay&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.MessageNameEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editorPattern="{0}"
- editPattern="{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6012"
- editPartClassName="AppliedStereotypeMessageEditPart"
- itemSemanticEditPolicyClassName="AppliedStereotypeMessageEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.figures.CustomWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="1"
- y="-53"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.0/@expressions.3"
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.3"/>
- </links>
- <links
- visualID="8010"
- editPartClassName="CommentAnnotatedElementEditPart"
- itemSemanticEditPolicyClassName="CommentAnnotatedElementItemSemanticEditPolicy"
- createCommandClassName="CommentAnnotatedElementCreateCommand"
- reorientCommandClassName="CommentAnnotatedElementReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.CommentAnnotatedElement_8010"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
- </modelFacet>
- </links>
- <links
- visualID="8011"
- editPartClassName="ConstraintConstrainedElementEditPart"
- itemSemanticEditPolicyClassName="ConstraintConstrainedElementItemSemanticEditPolicy"
- createCommandClassName="ConstraintConstrainedElementCreateCommand"
- reorientCommandClassName="ConstraintConstrainedElementReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.ConstraintConstrainedElement_8011"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
- </modelFacet>
- </links>
- <links
- visualID="8012"
- editPartClassName="ConnectorDurationObservationEditPart"
- itemSemanticEditPolicyClassName="ConnectorDurationObservationItemSemanticEditPolicy"
- createCommandClassName="ConnectorDurationObservationCreateCommand"
- reorientCommandClassName="ConnectorDurationObservationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.DurationObservationEvent_8012"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationObservation/event"/>
- </modelFacet>
- </links>
- <links
- visualID="8013"
- editPartClassName="ConnectorTimeObservationEditPart"
- itemSemanticEditPolicyClassName="ConnectorTimeObservationItemSemanticEditPolicy"
- createCommandClassName="ConnectorTimeObservationCreateCommand"
- reorientCommandClassName="ConnectorTimeObservationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.TimeObservationEvent_8013"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeObservation/event"/>
- </modelFacet>
- </links>
- <compartments
- visualID="7001"
- editPartClassName="InteractionCompartmentEditPart"
- itemSemanticEditPolicyClassName="InteractionCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="InteractionCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4"
- title="InteractionCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@topLevelNodes.0"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic.CustomInteractionCompartmentSemanticEditPolicy"/>
- </compartments>
- <palette
- factoryClassName="UMLPaletteFactory">
- <groups
- title="Nodes"
- description="Nodes"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- id="&quot;communication.group.nodes&quot;"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Lifeline"
- description="Create a Lifeline"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
- createMethodName="createLifelineComCreationTool"
- id="&quot;communication.tool.lifeline&quot;"
- genNodes="/0/@diagram/@childNodes.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Comment"
- description="Create new Comment"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- createMethodName="createComment7CreationTool"
- id="&quot;communication.tool.comment&quot;"
- genNodes="/0/@diagram/@childNodes.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Constraint"
- description="Create a constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- createMethodName="createConstraint5CreationTool"
- id="&quot;communication.tool.constraint&quot;"
- genNodes="/0/@diagram/@childNodes.1"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Duration Observation"
- description="Create a Duration Observation on a Message"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
- createMethodName="createDurationObservation4CreationTool"
- id="&quot;communication.tool.durationobservation&quot;"
- genNodes="/0/@diagram/@childNodes.4"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Time Observation"
- description="Create a Time Observation"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
- createMethodName="createTimeObservation6CreationTool"
- id="&quot;communication.tool.timeobservation&quot;"
- qualifiedToolName=""
- genNodes="/0/@diagram/@childNodes.3"/>
- </groups>
- <groups
- title="Edges"
- description="Edges tools"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createEdges2Group"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Message"
- description="MessageCreate"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif"
- createMethodName="createMessageCreateCreationTool"
- qualifiedToolName=""
- genLinks="/0/@diagram/@links.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Link"
- description="Creation of a link for comment, constraint, TimeObservation, DurationObservation"
- largeIconPath="icons/obj16/Link.gif"
- smallIconPath="icons/obj16/Link.gif"
- createMethodName="createLink13CreationTool"
- genLinks="/0/@diagram/@links.1 /0/@diagram/@links.2 /0/@diagram/@links.3 /0/@diagram/@links.4"/>
- </groups>
- </palette>
- <preferencePages
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.general"
- name="UML Diagram">
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.appearance"
- name="Appearance"
- kind="Appearance"
- className="DiagramAppearancePreferencePage"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.connections"
- name="Connections"
- kind="Connections"
- className="DiagramConnectionsPreferencePage"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.printing"
- name="Printing"
- kind="Printing"
- className="DiagramPrintingPreferencePage"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
- name="Rulers And Grid"
- kind="RulersAndGrid"
- className="DiagramRulersAndGridPreferencePage"/>
- </preferencePages>
- </diagram>
- <plugin
- iD="org.eclipse.papyrus.uml.diagram.communication"
- name="org.eclipse.papyrus.uml.diagram.communication">
- <requiredPlugins>org.eclipse.draw2d</requiredPlugins>
- <requiredPlugins>org.eclipse.papyrus.uml.diagram.common</requiredPlugins>
- <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
- </plugin>
- <editor/>
- <navigator/>
- <diagramUpdater/>
- <domainGenModel
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
- <expressionProviders>
- <providers
- xsi:type="gmfgen:GenExpressionInterpreter">
- <expressions
- body="let base : String = 'Lifeline' in&#xD;&#xA;let suffixes : Sequence(String) = Sequence {'', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'} in &#xD;&#xA;let space : Namespace = self.namespace in&#xD;&#xA;let allMissed : Sequence(String) = suffixes->&#xD;&#xA; select(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s))&#xD;&#xA; ) in&#xD;&#xA;let firstMissed : String = allMissed->first() in &#xD;&#xA;let noMisses : Boolean = firstMissed.oclIsUndefined() in&#xD;&#xA;let allNames : Set(String) = &#xD;&#xA; if noMisses &#xD;&#xA; then &#xD;&#xA; space.member->collect(e : NamedElement | &#xD;&#xA; if e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) &lt;> base&#xD;&#xA; then '' &#xD;&#xA; else e.name &#xD;&#xA; endif)->asSet()->excluding('') else Set{'not in use'} &#xD;&#xA; endif in &#xD;&#xA;let longestName : String = &#xD;&#xA; if noMisses&#xD;&#xA; then allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first() &#xD;&#xA; else 'not in use' &#xD;&#xA; endif in &#xD;&#xA;if noMisses then &#xD;&#xA; if longestName.oclIsUndefined() &#xD;&#xA; then base &#xD;&#xA; else longestName.concat('1') &#xD;&#xA; endif &#xD;&#xA;else &#xD;&#xA; base.concat(firstMissed) &#xD;&#xA;endif "/>
- <expressions
- body="let base : String = 'Interaction' in&#xD;&#xA;let suffixes : Sequence(String) = Sequence {'', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'} in &#xD;&#xA;let space : Namespace = self.namespace in&#xD;&#xA;let allMissed : Sequence(String) = suffixes->&#xD;&#xA; select(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s))&#xD;&#xA; ) in&#xD;&#xA;let firstMissed : String = allMissed->first() in &#xD;&#xA;let noMisses : Boolean = firstMissed.oclIsUndefined() in&#xD;&#xA;let allNames : Set(String) = &#xD;&#xA; if noMisses &#xD;&#xA; then &#xD;&#xA; space.member->collect(e : NamedElement | &#xD;&#xA; if e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) &lt;> base&#xD;&#xA; then '' &#xD;&#xA; else e.name &#xD;&#xA; endif)->asSet()->excluding('') else Set{'not in use'} &#xD;&#xA; endif in &#xD;&#xA;let longestName : String = &#xD;&#xA; if noMisses&#xD;&#xA; then allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first() &#xD;&#xA; else 'not in use' &#xD;&#xA; endif in &#xD;&#xA;if noMisses then &#xD;&#xA; if longestName.oclIsUndefined() &#xD;&#xA; then base &#xD;&#xA; else longestName.concat('1') &#xD;&#xA; endif &#xD;&#xA;else &#xD;&#xA; base.concat(firstMissed) &#xD;&#xA;endif "/>
- <expressions
- body="self.messageSort=MessageSort::createMessage and self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::Lifeline)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
- <expressions
- body="'OpaqueExpression'"/>
- <expressions
- body="' '"/>
- </providers>
- <providers
- xsi:type="gmfgen:GenJavaExpressionProvider"
- injectExpressionBody="true">
- <expressions
- body="return self.getBody();"/>
- <expressions
- body="return getName(self);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, &quot;t&quot;, &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
- <expressions
- body="return getNamedElement(self, &quot;&quot;, &quot;d&quot;, &quot;&quot;);"/>
- <expressions
- body="return org.eclipse.papyrus.uml.tools.utils.NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());"/>
- <expressions
- body="org.eclipse.uml2.uml.LiteralString literalString=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();&#xD;&#xA;literalString.setValue(&quot;&quot;);&#xD;&#xA;return literalString;"/>
- </providers>
- <providers
- xsi:type="gmfgen:GenLiteralExpressionProvider">
- <expressions
- body="0"/>
- <expressions
- body="1"/>
- </providers>
- </expressionProviders>
- <labelParsers
- extensibleViaService="true">
- <implementations
- xsi:type="gmfgen:PredefinedParser"
- uses="/0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@childNodes.1/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.3/@labels.0/@modelFacet /0/@diagram/@links.0/@labels.0/@modelFacet"
- className="MessageFormatParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.2/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.3/@labels.1/@modelFacet /0/@diagram/@childNodes.4/@labels.1/@modelFacet /0/@diagram/@links.0/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.1/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.0/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.communication.custom.parser.LifelineCustomParsers"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@topLevelNodes.1/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ShortcutDiagramParser"/>
- </labelParsers>
- </gmfgen:GenEditorGenerator>
- <papyrusgmfgenextension:PapyrusExtensionRootNode
- comment="Papyrus specific extension for GMFGen">
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Adds a superclass for DurationObservationEditPart, TimeObservationEditPart"
- genView="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4"
- name="EP_Observation_NODE"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts.AbstractObservationEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
- comment="External node label locator"
- classpath="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator"
- genExternalNodeLabel="/0/@diagram/@childNodes.3/@labels.1 /0/@diagram/@childNodes.4/@labels.1"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Manages stereotype shown with External Label"
- genView="/0/@diagram/@childNodes.3/@labels.0 /0/@diagram/@childNodes.4/@labels.0"
- name="EP_Stereotypes_EXT_NODE"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="adding to manange otherNamedElement"
- genView="/0/@diagram /0/@diagram/@childNodes.0 /0/@diagram/@topLevelNodes.0"
- name="OtherNamedElementEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="this is an extension to manage the comment"
- genView="/0/@diagram/@childNodes.2"
- name="comment extended node"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="this is an extension for constraint "
- genView="/0/@diagram/@childNodes.1"
- name="ConstraintEditPart extension"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Name of the shorcut diagram"
- genView="/0/@diagram/@topLevelNodes.1/@labels.0"
- name="AbstractShortcutDiagramNameEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortcutDiagramNameEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="add superclass for short cut"
- genView="/0/@diagram/@topLevelNodes.1"
- name="AbstractShortCutDiagramEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortCutDiagramEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificDiagramUpdater"
- comment="InteractionCompartment custom DiagramUpdater"
- classpath="org.eclipse.papyrus.uml.diagram.communication.custom.parts.InteractionCompartmentDiagramUpdater"
- genNode="/0/@diagram/@compartments.0"/>
- </papyrusgmfgenextension:PapyrusExtensionRootNode>
-</xmi:XMI> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
+ xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
+ <gmfgen:GenEditorGenerator
+ packageNamePrefix="org.eclipse.papyrus.uml.diagram.communication"
+ modelID="PapyrusUMLCommunicationDiagram"
+ diagramFileExtension="PapyrusUMLCommunication_diagram"
+ domainFileExtension="PapyrusUMLCommunication"
+ dynamicTemplates="true"
+ templateDirectory="/org.eclipse.papyrus.def/xtend/"
+ copyrightText="Copyright (c) 2014 CEA LIST.&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation">
+ <diagram
+ visualID="1000"
+ editPartClassName="ModelEditPart"
+ canonicalEditPolicyClassName="ModelCanonicalEditPolicy"
+ editingDomainID="org.eclipse.papyrus.uml.diagram.communication.EditingDomain"
+ validationEnabled="true"
+ validationDecorators="true"
+ liveValidationUIFeedback="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.Package_1000"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CustomOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <domainDiagramElement
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <childNodes
+ visualID="8001"
+ editPartClassName="LifelineEditPartCN"
+ itemSemanticEditPolicyClassName="LifelineItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="LifelineCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="LifelineGraphicalNodeEditPolicyCN"
+ createCommandClassName="LifelineCreateCommandCN"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.Lifeline_8001"
+ displayName="Lifeline"
+ editHelperClassName="LifelineEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="25"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CommunicationGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic.CustomLifelineItemSemanticEditPolicyCN"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Lifeline"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/lifeline"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/lifeline"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.5">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5002"
+ editPartClassName="LifelineNameEditPart">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.4"
+ viewPattern="{0}"
+ editorPattern="{0}"
+ editPattern="{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6014"
+ editPartClassName="LifelineFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="LifelineFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="8004"
+ editPartClassName="ConstraintEditPartCN"
+ itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyCN"
+ createCommandClassName="ConstraintCreateCommandCN"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.Constraint_8004"
+ displayName="Constraint"
+ editHelperClassName="ConstraintEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.5">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.6">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5064"
+ editPartClassName="ConstraintNameEditPartCN"
+ itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="5160"
+ editPartClassName="ConstraintBodyEditPartCN"
+ itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3"
+ viewPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="8005"
+ editPartClassName="CommentEditPartCN"
+ itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="CommentCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyCN"
+ createCommandClassName="CommentCreateCommandCN"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.Comment_8005"
+ displayName="Comment"
+ editHelperClassName="CommentEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.7">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5150"
+ editPartClassName="CommentBodyEditPartCN"
+ itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCornerBentFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="8006"
+ editPartClassName="TimeObservationEditPartCN"
+ itemSemanticEditPolicyClassName="TimeObservationItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="TimeObservationCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="TimeObservationGraphicalNodeEditPolicyCN"
+ createCommandClassName="TimeObservationCreateCommandCN"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.TimeObservation_8006"
+ displayName="TimeObservation"
+ editHelperClassName="TimeObservationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeObservation"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.5">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5153"
+ editPartClassName="TimeObservationNameEditPartCN"
+ itemSemanticEditPolicyClassName="TimeObservationNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5154"
+ editPartClassName="TimeObservationStereotypeLabelEditPartCN"
+ itemSemanticEditPolicyClassName="TimeObservationStereotypeLabelItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.2"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="8007"
+ editPartClassName="DurationObservationEditPartCN"
+ itemSemanticEditPolicyClassName="DurationObservationItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="DurationObservationCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="DurationObservationGraphicalNodeEditPolicyCN"
+ createCommandClassName="DurationObservationCreateCommandCN"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.DurationObservation_8007"
+ displayName="DurationObservation"
+ editHelperClassName="DurationObservationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationObservation"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.5">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5155"
+ editPartClassName="DurationObservationLabelEditPartCN"
+ itemSemanticEditPolicyClassName="DurationObservationLabelItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5156"
+ editPartClassName="DurationObservationStereotypeLabelEditPartCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.2"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <topLevelNodes
+ visualID="8002"
+ editPartClassName="InteractionEditPart"
+ itemSemanticEditPolicyClassName="InteractionItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InteractionCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.0"
+ graphicalNodeEditPolicyClassName="InteractionGraphicalNodeEditPolicy"
+ createCommandClassName="InteractionCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ displayName="Interaction"
+ editHelperClassName="InteractionEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.figures.InteractionRectangleFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="857"
+ height="757"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CommunicationGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.5">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5001"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern="{0}"
+ editorPattern="{0}"
+ editPattern="{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6013"
+ editPartClassName="InteractionFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="InteractionFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="50"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="8016"
+ editPartClassName="ShortCutDiagramEditPart"
+ itemSemanticEditPolicyClassName="ShortCutDiagramItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ShortCutDiagramCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ShortCutDiagramGraphicalNodeEditPolicy"
+ createCommandClassName="ShortCutDiagramCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.Diagram_8016"
+ displayName="ShortCutDiagram"
+ editHelperClassName="ShortCutDiagramEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DiagramNodeFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.OPEN_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShortCutDiagramEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic.CustomShortcutDiagramItemSemanticEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ editPartClassName="DiagramNameEditPart"
+ itemSemanticEditPolicyClassName="DiagramNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.5">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <links
+ visualID="8009"
+ editPartClassName="MessageEditPart"
+ itemSemanticEditPolicyClassName="MessageItemSemanticEditPolicy"
+ incomingCreationAllowed="true"
+ createCommandClassName="MessageCreateCommand"
+ reorientCommandClassName="MessageReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.Message_8009"
+ displayName="Message"
+ editHelperClassName="MessageEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.figures.MessageFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic.CustomMessageItemSemanticEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet"
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.5">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Message"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interaction/message"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.5">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/owner"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedElement"/>
+ </modelFacet>
+ <labels
+ visualID="6001"
+ editPartClassName="MessageNameEditPart"
+ itemSemanticEditPolicyClassName="MessageNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getFigureMessageCreateLabelFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.figures.CustomWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="1"
+ y="-23"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic.CustomMessageNameItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;CustomDisplay&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.MessageNameEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editorPattern="{0}"
+ editPattern="{0}">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6012"
+ editPartClassName="AppliedStereotypeMessageEditPart"
+ itemSemanticEditPolicyClassName="AppliedStereotypeMessageEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.figures.CustomWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="1"
+ y="-53"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.2"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <creationConstraints
+ sourceEnd="/0/@expressionProviders/@providers.0/@expressions.3"
+ targetEnd="/0/@expressionProviders/@providers.0/@expressions.3"/>
+ </links>
+ <links
+ visualID="8010"
+ editPartClassName="CommentAnnotatedElementEditPart"
+ itemSemanticEditPolicyClassName="CommentAnnotatedElementItemSemanticEditPolicy"
+ createCommandClassName="CommentAnnotatedElementCreateCommand"
+ reorientCommandClassName="CommentAnnotatedElementReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.CommentAnnotatedElement_8010"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="8011"
+ editPartClassName="ConstraintConstrainedElementEditPart"
+ itemSemanticEditPolicyClassName="ConstraintConstrainedElementItemSemanticEditPolicy"
+ createCommandClassName="ConstraintConstrainedElementCreateCommand"
+ reorientCommandClassName="ConstraintConstrainedElementReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.ConstraintConstrainedElement_8011"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="8012"
+ editPartClassName="ConnectorDurationObservationEditPart"
+ itemSemanticEditPolicyClassName="ConnectorDurationObservationItemSemanticEditPolicy"
+ createCommandClassName="ConnectorDurationObservationCreateCommand"
+ reorientCommandClassName="ConnectorDurationObservationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.DurationObservationEvent_8012"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DurationObservation/event"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="8013"
+ editPartClassName="ConnectorTimeObservationEditPart"
+ itemSemanticEditPolicyClassName="ConnectorTimeObservationItemSemanticEditPolicy"
+ createCommandClassName="ConnectorTimeObservationCreateCommand"
+ reorientCommandClassName="ConnectorTimeObservationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.communication.TimeObservationEvent_8013"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/TimeObservation/event"/>
+ </modelFacet>
+ </links>
+ <compartments
+ visualID="7001"
+ editPartClassName="InteractionCompartmentEditPart"
+ itemSemanticEditPolicyClassName="InteractionCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InteractionCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4"
+ title="InteractionCompartment"
+ needsTitle="false"
+ node="/0/@diagram/@topLevelNodes.0"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic.CustomInteractionCompartmentSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
+ </compartments>
+ <palette
+ factoryClassName="UMLPaletteFactory">
+ <groups
+ title="Nodes"
+ description="Nodes"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="&quot;communication.group.nodes&quot;"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Lifeline"
+ description="Create a Lifeline"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
+ createMethodName="createLifelineComCreationTool"
+ id="&quot;communication.tool.lifeline&quot;"
+ genNodes="/0/@diagram/@childNodes.0"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Comment"
+ description="Create new Comment"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ createMethodName="createComment7CreationTool"
+ id="&quot;communication.tool.comment&quot;"
+ genNodes="/0/@diagram/@childNodes.2"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Constraint"
+ description="Create a constraint"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ createMethodName="createConstraint5CreationTool"
+ id="&quot;communication.tool.constraint&quot;"
+ genNodes="/0/@diagram/@childNodes.1"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Duration Observation"
+ description="Create a Duration Observation on a Message"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
+ createMethodName="createDurationObservation4CreationTool"
+ id="&quot;communication.tool.durationobservation&quot;"
+ genNodes="/0/@diagram/@childNodes.4"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Time Observation"
+ description="Create a Time Observation"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
+ createMethodName="createTimeObservation6CreationTool"
+ id="&quot;communication.tool.timeobservation&quot;"
+ qualifiedToolName=""
+ genNodes="/0/@diagram/@childNodes.3"/>
+ </groups>
+ <groups
+ title="Edges"
+ description="Edges tools"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createEdges2Group"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Message"
+ description="MessageCreate"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif"
+ createMethodName="createMessageCreateCreationTool"
+ qualifiedToolName=""
+ genLinks="/0/@diagram/@links.0"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Link"
+ description="Creation of a link for comment, constraint, TimeObservation, DurationObservation"
+ largeIconPath="icons/obj16/Link.gif"
+ smallIconPath="icons/obj16/Link.gif"
+ createMethodName="createLink13CreationTool"
+ genLinks="/0/@diagram/@links.1 /0/@diagram/@links.2 /0/@diagram/@links.3 /0/@diagram/@links.4"/>
+ </groups>
+ </palette>
+ <preferencePages
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.general"
+ name="UML Diagram">
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.appearance"
+ name="Appearance"
+ kind="Appearance"
+ className="DiagramAppearancePreferencePage"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.connections"
+ name="Connections"
+ kind="Connections"
+ className="DiagramConnectionsPreferencePage"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.printing"
+ name="Printing"
+ kind="Printing"
+ className="DiagramPrintingPreferencePage"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
+ name="Rulers And Grid"
+ kind="RulersAndGrid"
+ className="DiagramRulersAndGridPreferencePage"/>
+ </preferencePages>
+ </diagram>
+ <plugin
+ iD="org.eclipse.papyrus.uml.diagram.communication"
+ name="org.eclipse.papyrus.uml.diagram.communication"
+ version="1.1.0.qualifier">
+ <requiredPlugins>org.eclipse.draw2d</requiredPlugins>
+ <requiredPlugins>org.eclipse.papyrus.uml.diagram.common</requiredPlugins>
+ <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
+ </plugin>
+ <editor/>
+ <navigator/>
+ <diagramUpdater/>
+ <domainGenModel
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
+ <expressionProviders>
+ <providers
+ xsi:type="gmfgen:GenExpressionInterpreter">
+ <expressions
+ body="let base : String = 'Lifeline' in&#xD;&#xA;let suffixes : Sequence(String) = Sequence {'', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'} in &#xD;&#xA;let space : Namespace = self.namespace in&#xD;&#xA;let allMissed : Sequence(String) = suffixes->&#xD;&#xA; select(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s))&#xD;&#xA; ) in&#xD;&#xA;let firstMissed : String = allMissed->first() in &#xD;&#xA;let noMisses : Boolean = firstMissed.oclIsUndefined() in&#xD;&#xA;let allNames : Set(String) = &#xD;&#xA; if noMisses &#xD;&#xA; then &#xD;&#xA; space.member->collect(e : NamedElement | &#xD;&#xA; if e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) &lt;> base&#xD;&#xA; then '' &#xD;&#xA; else e.name &#xD;&#xA; endif)->asSet()->excluding('') else Set{'not in use'} &#xD;&#xA; endif in &#xD;&#xA;let longestName : String = &#xD;&#xA; if noMisses&#xD;&#xA; then allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first() &#xD;&#xA; else 'not in use' &#xD;&#xA; endif in &#xD;&#xA;if noMisses then &#xD;&#xA; if longestName.oclIsUndefined() &#xD;&#xA; then base &#xD;&#xA; else longestName.concat('1') &#xD;&#xA; endif &#xD;&#xA;else &#xD;&#xA; base.concat(firstMissed) &#xD;&#xA;endif "/>
+ <expressions
+ body="let base : String = 'Interaction' in&#xD;&#xA;let suffixes : Sequence(String) = Sequence {'', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'} in &#xD;&#xA;let space : Namespace = self.namespace in&#xD;&#xA;let allMissed : Sequence(String) = suffixes->&#xD;&#xA; select(s : String | not space.member->exists(e : NamedElement | e.name = base.concat(s))&#xD;&#xA; ) in&#xD;&#xA;let firstMissed : String = allMissed->first() in &#xD;&#xA;let noMisses : Boolean = firstMissed.oclIsUndefined() in&#xD;&#xA;let allNames : Set(String) = &#xD;&#xA; if noMisses &#xD;&#xA; then &#xD;&#xA; space.member->collect(e : NamedElement | &#xD;&#xA; if e = self or e.name.oclIsUndefined() or e.name.substring(1, e.name.size().min(base.size())) &lt;> base&#xD;&#xA; then '' &#xD;&#xA; else e.name &#xD;&#xA; endif)->asSet()->excluding('') else Set{'not in use'} &#xD;&#xA; endif in &#xD;&#xA;let longestName : String = &#xD;&#xA; if noMisses&#xD;&#xA; then allNames->select(n : String | not allNames->exists(nn : String | nn.size() > n.size()))->asSequence()->first() &#xD;&#xA; else 'not in use' &#xD;&#xA; endif in &#xD;&#xA;if noMisses then &#xD;&#xA; if longestName.oclIsUndefined() &#xD;&#xA; then base &#xD;&#xA; else longestName.concat('1') &#xD;&#xA; endif &#xD;&#xA;else &#xD;&#xA; base.concat(firstMissed) &#xD;&#xA;endif "/>
+ <expressions
+ body="self.messageSort=MessageSort::createMessage and self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.oclIsKindOf(uml::Lifeline)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.oclIsKindOf(uml::InteractionFragment) or self.oclIsKindOf(uml::Lifeline)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.sendEvent&lt;>null and self.receiveEvent&lt;>null"/>
+ <expressions
+ body="'OpaqueExpression'"/>
+ <expressions
+ body="' '"/>
+ </providers>
+ <providers
+ xsi:type="gmfgen:GenJavaExpressionProvider"
+ injectExpressionBody="true">
+ <expressions
+ body="return self.getBody();"/>
+ <expressions
+ body="return getName(self);"/>
+ <expressions
+ body="return getNamedElement(self, &quot;&quot;, &quot;t&quot;, &quot;&quot;);"/>
+ <expressions
+ body="return getNamedElement(self, &quot;&quot;, self.eClass().getName(), &quot;&quot;);"/>
+ <expressions
+ body="return getNamedElement(self, &quot;&quot;, &quot;d&quot;, &quot;&quot;);"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.tools.utils.NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());"/>
+ <expressions
+ body="org.eclipse.uml2.uml.LiteralString literalString=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();&#xD;&#xA;literalString.setValue(&quot;&quot;);&#xD;&#xA;return literalString;"/>
+ </providers>
+ <providers
+ xsi:type="gmfgen:GenLiteralExpressionProvider">
+ <expressions
+ body="0"/>
+ <expressions
+ body="1"/>
+ </providers>
+ </expressionProviders>
+ <labelParsers
+ extensibleViaService="true">
+ <implementations
+ xsi:type="gmfgen:PredefinedParser"
+ uses="/0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@childNodes.1/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.3/@labels.0/@modelFacet /0/@diagram/@links.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.1/@modelFacet /0/@diagram/@childNodes.0/@labels.1/@modelFacet"
+ className="MessageFormatParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.2/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.3/@labels.1/@modelFacet /0/@diagram/@childNodes.4/@labels.1/@modelFacet /0/@diagram/@links.0/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.1/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.0/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.communication.custom.parser.LifelineCustomParsers"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@topLevelNodes.1/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ShortcutDiagramParser"/>
+ </labelParsers>
+ </gmfgen:GenEditorGenerator>
+ <papyrusgmfgenextension:PapyrusExtensionRootNode
+ comment="Papyrus specific extension for GMFGen">
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
+ comment="External node label locator"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator"
+ genExternalNodeLabel="/0/@diagram/@childNodes.3/@labels.1 /0/@diagram/@childNodes.4/@labels.1"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="adding to manange otherNamedElement"
+ genView="/0/@diagram"
+ name="OtherNamedElementEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="this is an extension to manage the comment"
+ genView="/0/@diagram/@childNodes.2"
+ name="comment extended node"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="this is an extension for constraint "
+ genView="/0/@diagram/@childNodes.1"
+ name="ConstraintEditPart extension"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Name of the shorcut diagram"
+ genView="/0/@diagram/@topLevelNodes.1/@labels.0"
+ name="AbstractShortcutDiagramNameEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortcutDiagramNameEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add superclass for short cut"
+ genView="/0/@diagram/@topLevelNodes.1"
+ name="AbstractShortCutDiagramEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortCutDiagramEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificDiagramUpdater"
+ comment="InteractionCompartment custom DiagramUpdater"
+ classpath="org.eclipse.papyrus.uml.diagram.communication.custom.parts.InteractionCompartmentDiagramUpdater"
+ genNode="/0/@diagram/@compartments.0"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add superclass for floating Label"
+ genView="/0/@diagram/@topLevelNodes.0/@labels.1 /0/@diagram/@childNodes.4/@labels.0 /0/@diagram/@childNodes.3/@labels.0 /0/@diagram/@childNodes.0/@labels.1"
+ name="FloatingLabelEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ genView="/0/@diagram/@topLevelNodes.0"
+ name="AbstractInteractionEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractInteractionEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
+ comment="Locator for external Floating label of RoundedCompartment EP"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator"
+ genExternalNodeLabel="/0/@diagram/@topLevelNodes.0/@labels.1 /0/@diagram/@childNodes.3/@labels.0 /0/@diagram/@childNodes.4/@labels.0 /0/@diagram/@childNodes.0/@labels.1"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ genView="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.0"
+ name="RoundedCompartmentEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart"/>
+ </papyrusgmfgenextension:PapyrusExtensionRootNode>
+</xmi:XMI>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml
index 172df25d7e8..1b03f487bcd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml
@@ -45,526 +45,526 @@
</extension>
-<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
- <?gmfgen generated="true"?>
- <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLMarkerNavigationProvider">
- <MarkerType name="org.eclipse.papyrus.uml.diagram.communication.diagnostic"/>
- <Priority name="Lowest"/>
- </MarkerNavigationProvider>
- </extension>
+<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
+ <?gmfgen generated="true"?>
+ <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLMarkerNavigationProvider">
+ <MarkerType name="org.eclipse.papyrus.uml.diagram.communication.diagnostic"/>
+ <Priority name="Lowest"/>
+ </MarkerNavigationProvider>
+ </extension>
-<extension id="diagnostic" name="org.eclipse.papyrus.uml.diagram.communication problems" point="org.eclipse.core.resources.markers">
- <?gmfgen generated="true"?>
- <super type="org.eclipse.core.resources.problemmarker"/>
- <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
- <persistent value="true"/>
- </extension> <extension
- id="org.eclipse.papyrus.uml.diagram.communication.palettedefinition"
- name="org.eclipse.papyrus.uml.diagram.communication Predefined Entries"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Lowest"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.communication.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
-
- <entry
- defineOnly="true"
- description="Create a Lifeline"
- id="communication.tool.lifeline"
- kind="tool"
- label="Lifeline"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Comment"
- id="communication.tool.comment"
- kind="tool"
- label="Comment"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a constraint"
- id="communication.tool.constraint"
- kind="tool"
- label="Constraint"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Duration Observation on a Message"
- id="communication.tool.durationobservation"
- kind="tool"
- label="Duration Observation"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Time Observation"
- id="communication.tool.timeobservation"
- kind="tool"
- label="Time Observation"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif">
- </entry>
- <entry
- defineOnly="true"
- description="MessageCreate"
- id="createMessageCreateCreationTool"
- kind="tool"
- label="Message"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Creation of a link for comment, constraint, TimeObservation, DurationObservation"
- id="createLink13CreationTool"
- kind="tool"
- label="Link"
- large_icon="icons/obj16/Link.gif"
- path=""
- small_icon="icons/obj16/Link.gif">
- </entry>
-
- </contribution>
- </paletteProvider>
-
- </extension>
+<extension id="diagnostic" name="org.eclipse.papyrus.uml.diagram.communication problems" point="org.eclipse.core.resources.markers">
+ <?gmfgen generated="true"?>
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
+ <persistent value="true"/>
+ </extension> <extension
+ id="org.eclipse.papyrus.uml.diagram.communication.palettedefinition"
+ name="org.eclipse.papyrus.uml.diagram.communication Predefined Entries"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Lowest"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.communication.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+
+ <entry
+ defineOnly="true"
+ description="Create a Lifeline"
+ id="communication.tool.lifeline"
+ kind="tool"
+ label="Lifeline"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Lifeline.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Comment"
+ id="communication.tool.comment"
+ kind="tool"
+ label="Comment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a constraint"
+ id="communication.tool.constraint"
+ kind="tool"
+ label="Constraint"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Duration Observation on a Message"
+ id="communication.tool.durationobservation"
+ kind="tool"
+ label="Duration Observation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DurationObservation.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Time Observation"
+ id="communication.tool.timeobservation"
+ kind="tool"
+ label="Time Observation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/TimeObservation.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="MessageCreate"
+ id="createMessageCreateCreationTool"
+ kind="tool"
+ label="Message"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Message_createMessage.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Creation of a link for comment, constraint, TimeObservation, DurationObservation"
+ id="createLink13CreationTool"
+ kind="tool"
+ label="Link"
+ large_icon="icons/obj16/Link.gif"
+ path=""
+ small_icon="icons/obj16/Link.gif">
+ </entry>
+
+ </contribution>
+ </paletteProvider>
+
+ </extension>
-<extension
- id="org.eclipse.papyrus.uml.diagram.communication.standard"
- name="org.eclipse.papyrus.uml.diagram.communication Standard Palette"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Low"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.communication.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
-
- <entry
- description="Nodes"
- id="communication.group.nodes"
- kind="drawer"
- label="Nodes"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
- <predefinedEntry
- id="communication.tool.lifeline"
- path="/communication.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="communication.tool.comment"
- path="/communication.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="communication.tool.constraint"
- path="/communication.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="communication.tool.durationobservation"
- path="/communication.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="communication.tool.timeobservation"
- path="/communication.group.nodes">
- </predefinedEntry>
- <entry
- description="Edges tools"
- id="createEdges2Group"
- kind="drawer"
- label="Edges"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
- <predefinedEntry
- id="createMessageCreateCreationTool"
- path="/createEdges2Group">
- </predefinedEntry>
- <predefinedEntry
- id="createLink13CreationTool"
- path="/createEdges2Group">
- </predefinedEntry>
- </contribution>
- <editor id="org.eclipse.papyrus.uml.diagram.communication"/>
- </paletteProvider>
-
-</extension>
+<extension
+ id="org.eclipse.papyrus.uml.diagram.communication.standard"
+ name="org.eclipse.papyrus.uml.diagram.communication Standard Palette"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Low"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.communication.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+
+ <entry
+ description="Nodes"
+ id="communication.group.nodes"
+ kind="drawer"
+ label="Nodes"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="communication.tool.lifeline"
+ path="/communication.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="communication.tool.comment"
+ path="/communication.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="communication.tool.constraint"
+ path="/communication.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="communication.tool.durationobservation"
+ path="/communication.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="communication.tool.timeobservation"
+ path="/communication.group.nodes">
+ </predefinedEntry>
+ <entry
+ description="Edges tools"
+ id="createEdges2Group"
+ kind="drawer"
+ label="Edges"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="createMessageCreateCreationTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createLink13CreationTool"
+ path="/createEdges2Group">
+ </predefinedEntry>
+ </contribution>
+ <editor id="org.eclipse.papyrus.uml.diagram.communication"/>
+ </paletteProvider>
+
+</extension>
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
- <?gmfgen generated="true"?>
-<page
- id="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLCommunicationDiagram"
- name="PapyrusUMLCommunicationDiagram Diagram"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
- class="org.eclipse.papyrus.uml.diagram.communication.preferences.DiagramGeneralPreferencePage">
-</page>
-<page
- id="org.eclipse.papyrus.uml.diagram.communication.preferences.DiagramPrintingPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.printing"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLCommunicationDiagram"
- class="org.eclipse.papyrus.uml.diagram.communication.preferences.DiagramPrintingPreferencePage">
-</page>
-<page
- id="org.eclipse.papyrus.uml.diagram.communication.preferences.DiagramRulersAndGridPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLCommunicationDiagram"
- class="org.eclipse.papyrus.uml.diagram.communication.preferences.DiagramRulersAndGridPreferencePage">
-</page>
- </extension>
+<extension point="org.eclipse.ui.preferencePages" id="prefpages">
+ <?gmfgen generated="true"?>
+<page
+ id="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLCommunicationDiagram"
+ name="PapyrusUMLCommunicationDiagram Diagram"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
+ class="org.eclipse.papyrus.uml.diagram.communication.preferences.DiagramGeneralPreferencePage">
+</page>
+<page
+ id="org.eclipse.papyrus.uml.diagram.communication.preferences.DiagramPrintingPreferencePage"
+ name="%prefpage.org.eclipse.uml2.uml.diagram.printing"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLCommunicationDiagram"
+ class="org.eclipse.papyrus.uml.diagram.communication.preferences.DiagramPrintingPreferencePage">
+</page>
+<page
+ id="org.eclipse.papyrus.uml.diagram.communication.preferences.DiagramRulersAndGridPreferencePage"
+ name="%prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLCommunicationDiagram"
+ class="org.eclipse.papyrus.uml.diagram.communication.preferences.DiagramRulersAndGridPreferencePage">
+</page>
+ </extension>
-<extension point="org.eclipse.core.runtime.preferences" id="prefs">
- <?gmfgen generated="true"?>
- <initializer class="org.eclipse.papyrus.uml.diagram.communication.preferences.DiagramPreferenceInitializer"/>
- </extension>
+<extension point="org.eclipse.core.runtime.preferences" id="prefs">
+ <?gmfgen generated="true"?>
+ <initializer class="org.eclipse.papyrus.uml.diagram.communication.preferences.DiagramPreferenceInitializer"/>
+ </extension>
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
- <?gmfgen generated="true"?>
- <viewProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLViewProvider">
- <Priority name="Lowest"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLCommunicationDiagram"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="8002,8016,8001,8004,8005,8006,8007"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="8009,8010,8011,8012,8013"/>
- </viewProvider>
- </extension>
+<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
+ <?gmfgen generated="true"?>
+ <viewProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLViewProvider">
+ <Priority name="Lowest"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLCommunicationDiagram"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="8002,8016,8001,8004,8005,8006,8007"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="8009,8010,8011,8012,8013"/>
+ </viewProvider>
+ </extension>
-<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
- <?gmfgen generated="true"?>
- <editpartProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLEditPartProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
- <method name="getType()" value="PapyrusUMLCommunicationDiagram"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
- <method name="getType()" value="8002,8016,8001,8004,8005,8006,8007"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
- <method name="getType()" value="8009,8010,8011,8012,8013"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
- <method name="getType()" value="5001,0,5002,5064,5160,5150,5153,5154,5155,5156"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
- <method name="getType()" value="7001"/>
- </object>
- <context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
- </editpartProvider>
- </extension>
+<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
+ <?gmfgen generated="true"?>
+ <editpartProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLEditPartProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
+ <method name="getType()" value="PapyrusUMLCommunicationDiagram"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
+ <method name="getType()" value="8002,8016,8001,8004,8005,8006,8007"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
+ <method name="getType()" value="8009,8010,8011,8012,8013"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
+ <method name="getType()" value="5001,6013,0,5002,6014,5064,5160,5150,5153,5154,5155,5156"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
+ <method name="getType()" value="7001"/>
+ </object>
+ <context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
+ </editpartProvider>
+ </extension>
-<extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
- <?gmfgen generated="true"?>
- <IconProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLIconProvider">
- <Priority name="Lowest"/>
- </IconProvider>
- </extension>
+<extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
+ <?gmfgen generated="true"?>
+ <IconProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLIconProvider">
+ <Priority name="Lowest"/>
+ </IconProvider>
+ </extension>
-<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
- <?gmfgen generated="true"?>
- <ParserProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLParserProvider">
- <Priority name="Lowest"/>
- </ParserProvider>
- </extension>
+<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
+ <?gmfgen generated="true"?>
+ <ParserProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLParserProvider">
+ <Priority name="Lowest"/>
+ </ParserProvider>
+ </extension>
-<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
- <?gmfgen generated="true"?>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.communication.Package_1000"
- name="%metatype.name.Package_1000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Package"
- edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.PackageEditHelper">
- <param name="semanticHint" value="1000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.communication.Interaction_8002"
- name="%metatype.name.Interaction_8002"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Interaction"
- edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.InteractionEditHelper">
- <param name="semanticHint" value="8002"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/gmf/runtime/1.0.2/notation">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.communication.Diagram_8016"
- name="%metatype.name.Diagram_8016"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Diagram"
- edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.ShortCutDiagramEditHelper">
- <param name="semanticHint" value="8016"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.communication.Lifeline_8001"
- name="%metatype.name.Lifeline_8001"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Lifeline"
- edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.LifelineEditHelper">
- <param name="semanticHint" value="8001"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.communication.Constraint_8004"
- name="%metatype.name.Constraint_8004"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Constraint"
- edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.ConstraintEditHelper">
- <param name="semanticHint" value="8004"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.communication.Comment_8005"
- name="%metatype.name.Comment_8005"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Comment"
- edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.CommentEditHelper">
- <param name="semanticHint" value="8005"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.communication.TimeObservation_8006"
- name="%metatype.name.TimeObservation_8006"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="TimeObservation"
- edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.TimeObservationEditHelper">
- <param name="semanticHint" value="8006"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.communication.DurationObservation_8007"
- name="%metatype.name.DurationObservation_8007"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="DurationObservation"
- edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.DurationObservationEditHelper">
- <param name="semanticHint" value="8007"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.communication.Message_8009"
- name="%metatype.name.Message_8009"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Message"
- edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.MessageEditHelper">
- <param name="semanticHint" value="8009"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.communication.CommentAnnotatedElement_8010"
- name="%metatype.name.CommentAnnotatedElement_8010"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="8010"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.communication.ConstraintConstrainedElement_8011"
- name="%metatype.name.ConstraintConstrainedElement_8011"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="8011"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.communication.DurationObservationEvent_8012"
- name="%metatype.name.DurationObservationEvent_8012"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="8012"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.communication.TimeObservationEvent_8013"
- name="%metatype.name.TimeObservationEvent_8013"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="8013"/>
- </specializationType>
- </metamodel>
- </extension>
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
+ <?gmfgen generated="true"?>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.communication.Package_1000"
+ name="%metatype.name.Package_1000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Package"
+ edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.PackageEditHelper">
+ <param name="semanticHint" value="1000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.communication.Interaction_8002"
+ name="%metatype.name.Interaction_8002"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Interaction"
+ edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.InteractionEditHelper">
+ <param name="semanticHint" value="8002"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/gmf/runtime/1.0.2/notation">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.communication.Diagram_8016"
+ name="%metatype.name.Diagram_8016"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Diagram"
+ edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.ShortCutDiagramEditHelper">
+ <param name="semanticHint" value="8016"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.communication.Lifeline_8001"
+ name="%metatype.name.Lifeline_8001"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Lifeline"
+ edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.LifelineEditHelper">
+ <param name="semanticHint" value="8001"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.communication.Constraint_8004"
+ name="%metatype.name.Constraint_8004"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Constraint"
+ edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.ConstraintEditHelper">
+ <param name="semanticHint" value="8004"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.communication.Comment_8005"
+ name="%metatype.name.Comment_8005"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Comment"
+ edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.CommentEditHelper">
+ <param name="semanticHint" value="8005"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.communication.TimeObservation_8006"
+ name="%metatype.name.TimeObservation_8006"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="TimeObservation"
+ edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.TimeObservationEditHelper">
+ <param name="semanticHint" value="8006"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.communication.DurationObservation_8007"
+ name="%metatype.name.DurationObservation_8007"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="DurationObservation"
+ edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.DurationObservationEditHelper">
+ <param name="semanticHint" value="8007"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.communication.Message_8009"
+ name="%metatype.name.Message_8009"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Message"
+ edithelper="org.eclipse.papyrus.uml.diagram.communication.edit.helpers.MessageEditHelper">
+ <param name="semanticHint" value="8009"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.communication.CommentAnnotatedElement_8010"
+ name="%metatype.name.CommentAnnotatedElement_8010"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="8010"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.communication.ConstraintConstrainedElement_8011"
+ name="%metatype.name.ConstraintConstrainedElement_8011"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="8011"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.communication.DurationObservationEvent_8012"
+ name="%metatype.name.DurationObservationEvent_8012"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="8012"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.communication.TimeObservationEvent_8013"
+ name="%metatype.name.TimeObservationEvent_8013"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="8013"/>
+ </specializationType>
+ </metamodel>
+ </extension>
-<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
- <?gmfgen generated="true"?>
- <clientContext id="org.eclipse.papyrus.uml.diagram.communication.TypeContext">
- <enablement>
- <test
- property="org.eclipse.gmf.runtime.emf.core.editingDomain"
- value="org.eclipse.papyrus.uml.diagram.communication.EditingDomain"/>
- </enablement>
- </clientContext>
- <binding context="org.eclipse.papyrus.uml.diagram.communication.TypeContext">
- <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Package_1000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Interaction_8002"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Diagram_8016"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Lifeline_8001"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Constraint_8004"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Comment_8005"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.communication.TimeObservation_8006"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.communication.DurationObservation_8007"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Message_8009"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.communication.CommentAnnotatedElement_8010"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.communication.ConstraintConstrainedElement_8011"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.communication.DurationObservationEvent_8012"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.communication.TimeObservationEvent_8013"/>
- <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
- </binding>
- </extension>
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
+ <?gmfgen generated="true"?>
+ <clientContext id="org.eclipse.papyrus.uml.diagram.communication.TypeContext">
+ <enablement>
+ <test
+ property="org.eclipse.gmf.runtime.emf.core.editingDomain"
+ value="org.eclipse.papyrus.uml.diagram.communication.EditingDomain"/>
+ </enablement>
+ </clientContext>
+ <binding context="org.eclipse.papyrus.uml.diagram.communication.TypeContext">
+ <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Package_1000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Interaction_8002"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Diagram_8016"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Lifeline_8001"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Constraint_8004"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Comment_8005"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.communication.TimeObservation_8006"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.communication.DurationObservation_8007"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.communication.Message_8009"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.communication.CommentAnnotatedElement_8010"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.communication.ConstraintConstrainedElement_8011"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.communication.DurationObservationEvent_8012"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.communication.TimeObservationEvent_8013"/>
+ <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
+ </binding>
+ </extension>
-<extension point="org.eclipse.core.expressions.propertyTesters" id="navigator-proptest.isURIEditorInput">
- <?gmfgen generated="true"?>
- <propertyTester
- id="org.eclipse.papyrus.uml.diagram.communication.URIEditorInputPropertyTester"
- type="org.eclipse.emf.common.ui.URIEditorInput"
- namespace="org.eclipse.papyrus.uml.diagram.communication"
- properties="isURIEditorInput"
- class="org.eclipse.papyrus.uml.diagram.communication.part.UMLUriEditorInputTester">
- </propertyTester>
- </extension>
+<extension point="org.eclipse.core.expressions.propertyTesters" id="navigator-proptest.isURIEditorInput">
+ <?gmfgen generated="true"?>
+ <propertyTester
+ id="org.eclipse.papyrus.uml.diagram.communication.URIEditorInputPropertyTester"
+ type="org.eclipse.emf.common.ui.URIEditorInput"
+ namespace="org.eclipse.papyrus.uml.diagram.communication"
+ properties="isURIEditorInput"
+ class="org.eclipse.papyrus.uml.diagram.communication.part.UMLUriEditorInputTester">
+ </propertyTester>
+ </extension>
-<extension point="org.eclipse.ui.navigator.viewer" id="navigator-viewbinding">
- <?gmfgen generated="true"?>
- <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <contentExtension pattern="org.eclipse.papyrus.uml.diagram.communication.resourceContent"/>
- <contentExtension pattern="org.eclipse.papyrus.uml.diagram.communication.domainResourceContent"/>
- <contentExtension pattern="org.eclipse.papyrus.uml.diagram.communication.navigatorLinkHelper"/>
- </includes>
- </viewerContentBinding>
- <viewerActionBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <actionExtension pattern="org.eclipse.papyrus.uml.diagram.communication.navigatorActionProvider"/>
- </includes>
- </viewerActionBinding>
- </extension>
+<extension point="org.eclipse.ui.navigator.viewer" id="navigator-viewbinding">
+ <?gmfgen generated="true"?>
+ <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
+ <includes>
+ <contentExtension pattern="org.eclipse.papyrus.uml.diagram.communication.resourceContent"/>
+ <contentExtension pattern="org.eclipse.papyrus.uml.diagram.communication.domainResourceContent"/>
+ <contentExtension pattern="org.eclipse.papyrus.uml.diagram.communication.navigatorLinkHelper"/>
+ </includes>
+ </viewerContentBinding>
+ <viewerActionBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
+ <includes>
+ <actionExtension pattern="org.eclipse.papyrus.uml.diagram.communication.navigatorActionProvider"/>
+ </includes>
+ </viewerActionBinding>
+ </extension>
-<extension point="org.eclipse.ui.navigator.navigatorContent" id="navigator-content">
- <?gmfgen generated="true"?>
- <navigatorContent
- id="org.eclipse.papyrus.uml.diagram.communication.resourceContent"
- name="%navigatorContentName"
- priority="normal"
- contentProvider="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorContentProvider"
- labelProvider="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorLabelProvider"
- icon="icons/obj16/UMLDiagramFile.gif"
- activeByDefault="true">
- <triggerPoints>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="PapyrusUMLCommunication_diagram"/>
- </and>
- <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </triggerPoints>
- <possibleChildren>
- <or>
- <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </possibleChildren>
- <commonSorter
- id="org.eclipse.papyrus.uml.diagram.communication.navigatorSorter"
- class="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorSorter">
- <parentExpression>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="PapyrusUMLCommunication_diagram"/>
- </and>
- <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </parentExpression>
- </commonSorter>
- </navigatorContent>
- <navigatorContent
- id="org.eclipse.papyrus.uml.diagram.communication.domainResourceContent"
- name="%domainNavigatorContentName"
- priority="normal"
- contentProvider="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLDomainNavigatorContentProvider"
- labelProvider="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLDomainNavigatorLabelProvider"
- icon="icons/obj16/UMLDiagramFile.gif"
- activeByDefault="true">
- <triggerPoints>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="PapyrusUMLCommunication"/>
- </and>
- <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLDomainNavigatorItem"/>
- </or>
- </triggerPoints>
- <possibleChildren>
- <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLDomainNavigatorItem"/>
- </possibleChildren>
- </navigatorContent>
- <actionProvider
- id="org.eclipse.papyrus.uml.diagram.communication.navigatorActionProvider"
- class="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorActionProvider">
- <enablement>
- <or>
- <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </enablement>
- </actionProvider>
- </extension>
+<extension point="org.eclipse.ui.navigator.navigatorContent" id="navigator-content">
+ <?gmfgen generated="true"?>
+ <navigatorContent
+ id="org.eclipse.papyrus.uml.diagram.communication.resourceContent"
+ name="%navigatorContentName"
+ priority="normal"
+ contentProvider="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorContentProvider"
+ labelProvider="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorLabelProvider"
+ icon="icons/obj16/UMLDiagramFile.gif"
+ activeByDefault="true">
+ <triggerPoints>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <test property="org.eclipse.core.resources.extension" value="PapyrusUMLCommunication_diagram"/>
+ </and>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLAbstractNavigatorItem"/>
+ </or>
+ </triggerPoints>
+ <possibleChildren>
+ <or>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLAbstractNavigatorItem"/>
+ </or>
+ </possibleChildren>
+ <commonSorter
+ id="org.eclipse.papyrus.uml.diagram.communication.navigatorSorter"
+ class="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorSorter">
+ <parentExpression>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <test property="org.eclipse.core.resources.extension" value="PapyrusUMLCommunication_diagram"/>
+ </and>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLAbstractNavigatorItem"/>
+ </or>
+ </parentExpression>
+ </commonSorter>
+ </navigatorContent>
+ <navigatorContent
+ id="org.eclipse.papyrus.uml.diagram.communication.domainResourceContent"
+ name="%domainNavigatorContentName"
+ priority="normal"
+ contentProvider="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLDomainNavigatorContentProvider"
+ labelProvider="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLDomainNavigatorLabelProvider"
+ icon="icons/obj16/UMLDiagramFile.gif"
+ activeByDefault="true">
+ <triggerPoints>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <test property="org.eclipse.core.resources.extension" value="PapyrusUMLCommunication"/>
+ </and>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLDomainNavigatorItem"/>
+ </or>
+ </triggerPoints>
+ <possibleChildren>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLDomainNavigatorItem"/>
+ </possibleChildren>
+ </navigatorContent>
+ <actionProvider
+ id="org.eclipse.papyrus.uml.diagram.communication.navigatorActionProvider"
+ class="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorActionProvider">
+ <enablement>
+ <or>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLAbstractNavigatorItem"/>
+ </or>
+ </enablement>
+ </actionProvider>
+ </extension>
-<extension point="org.eclipse.ui.navigator.linkHelper" id="navigator-linkhelper">
- <?gmfgen generated="true"?>
- <linkHelper
- id="org.eclipse.papyrus.uml.diagram.communication.navigatorLinkHelper"
- class="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorLinkHelper">
- <editorInputEnablement>
- <and>
- <instanceof value="org.eclipse.emf.common.ui.URIEditorInput"/>
- <test property="org.eclipse.papyrus.uml.diagram.communication.isURIEditorInput"/>
- </and>
- </editorInputEnablement>
- <selectionEnablement>
- <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLAbstractNavigatorItem"/>
- </selectionEnablement>
- </linkHelper>
- </extension>
+<extension point="org.eclipse.ui.navigator.linkHelper" id="navigator-linkhelper">
+ <?gmfgen generated="true"?>
+ <linkHelper
+ id="org.eclipse.papyrus.uml.diagram.communication.navigatorLinkHelper"
+ class="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLNavigatorLinkHelper">
+ <editorInputEnablement>
+ <and>
+ <instanceof value="org.eclipse.emf.common.ui.URIEditorInput"/>
+ <test property="org.eclipse.papyrus.uml.diagram.communication.isURIEditorInput"/>
+ </and>
+ </editorInputEnablement>
+ <selectionEnablement>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.communication.navigator.UMLAbstractNavigatorItem"/>
+ </selectionEnablement>
+ </linkHelper>
+ </extension>
@@ -595,15 +595,15 @@
</editpartProvider>
</extension>
-<extension point="org.eclipse.ui.contexts" id="ui-context">
- <?gmfgen generated="true"?>
- <context
- description="%context.description"
- id="org.eclipse.papyrus.uml.diagram.communication.ui.diagramContext"
- name="%context.name"
- parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
- </context>
- </extension>
+<extension point="org.eclipse.ui.contexts" id="ui-context">
+ <?gmfgen generated="true"?>
+ <context
+ description="%context.description"
+ id="org.eclipse.papyrus.uml.diagram.communication.ui.diagramContext"
+ name="%context.name"
+ parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
+ </context>
+ </extension>
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
@@ -621,13 +621,13 @@
</action>
</objectContribution>
</extension>
-<extension point="org.eclipse.ui.menus" id="context-menus">
- <?gmfgen generated="true"?>
- <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
- </menuContribution>
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
- </menuContribution -->
- </extension>
+<extension point="org.eclipse.ui.menus" id="context-menus">
+ <?gmfgen generated="true"?>
+ <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
+ </menuContribution>
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
+ </menuContribution -->
+ </extension>
<extension
point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
@@ -684,14 +684,14 @@
</metamodel>
</extension>
-<extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
- <?gmfgen generated="true"?>
- <decoratorProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLValidationDecoratorProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
- <context decoratorTargets="PRIMARY_VIEW"/>
- </decoratorProvider>
- </extension>
+<extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
+ <?gmfgen generated="true"?>
+ <decoratorProvider class="org.eclipse.papyrus.uml.diagram.communication.providers.UMLValidationDecoratorProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
+ <context decoratorTargets="PRIMARY_VIEW"/>
+ </decoratorProvider>
+ </extension>
<extension point="org.eclipse.papyrus.infra.gmfdiag.common.notationTypesMapping">
<diagramMappings diagramID="PapyrusUMLCommunicationDiagram">
<mapping type="PapyrusUMLCommunicationDiagram" humanReadableType="CommunicationDiagram"/>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentAnnotatedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentAnnotatedElementReorientCommand.java
index b0d3871e4cf..074677ec773 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentAnnotatedElementReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentAnnotatedElementReorientCommand.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
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.emf.type.core.requests.ReorientRequest;
import org.eclipse.papyrus.uml.diagram.communication.edit.policies.UMLBaseItemSemanticEditPolicy;
import org.eclipse.uml2.uml.Comment;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConnectorDurationObservationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConnectorDurationObservationReorientCommand.java
index 0706cf53acb..a5c19a0b221 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConnectorDurationObservationReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConnectorDurationObservationReorientCommand.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
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.emf.type.core.requests.ReorientRequest;
import org.eclipse.papyrus.uml.diagram.communication.edit.policies.UMLBaseItemSemanticEditPolicy;
import org.eclipse.uml2.uml.DurationObservation;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConnectorTimeObservationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConnectorTimeObservationReorientCommand.java
index 50667e5cc23..838562c223c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConnectorTimeObservationReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConnectorTimeObservationReorientCommand.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
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.emf.type.core.requests.ReorientRequest;
import org.eclipse.papyrus.uml.diagram.communication.edit.policies.UMLBaseItemSemanticEditPolicy;
import org.eclipse.uml2.uml.NamedElement;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintConstrainedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintConstrainedElementReorientCommand.java
index 6f5128dc454..bfa10a4b772 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintConstrainedElementReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintConstrainedElementReorientCommand.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
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.emf.type.core.requests.ReorientRequest;
import org.eclipse.papyrus.uml.diagram.communication.edit.policies.UMLBaseItemSemanticEditPolicy;
import org.eclipse.uml2.uml.Constraint;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ShortCutDiagramCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ShortCutDiagramCreateCommand.java
index 33187d3be4c..5845ccfa693 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ShortCutDiagramCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ShortCutDiagramCreateCommand.java
@@ -68,9 +68,9 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
// 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();
+ // ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getContainer().eResource();
// if (resource == null) {
- // return null;
+ // return null;
// }
Resource resource = getElementToEdit().eResource();
Diagram newElement = NotationFactory.eINSTANCE.createDiagram();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/AppliedStereotypeMessageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/AppliedStereotypeMessageEditPart.java
index 7de2aa2a5b6..389b7cf0a61 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/AppliedStereotypeMessageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/AppliedStereotypeMessageEditPart.java
@@ -1,817 +1,818 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.communication.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.communication.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.communication.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 AppliedStereotypeMessageEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6012;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.AppliedStereotypeMessageEditPart.VISUAL_ID), new Point(1, -53));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypeMessageEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- 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() == IParserEditStatus.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.Message_8009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.AppliedStereotypeMessageEditPart.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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.communication.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.communication.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 AppliedStereotypeMessageEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6012;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.AppliedStereotypeMessageEditPart.VISUAL_ID), new Point(1, -53));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypeMessageEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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() == IParserEditStatus.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.Message_8009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.AppliedStereotypeMessageEditPart.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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentBodyEditPartCN.java
index 84f03d05b23..dcf84a58817 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentBodyEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentBodyEditPartCN.java
@@ -29,7 +29,6 @@ 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;
@@ -836,7 +835,7 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentEditPartCN.java
index 5c3d4e3b10d..23e1497c817 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/CommentEditPartCN.java
@@ -23,11 +23,11 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -77,7 +77,6 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
new OpenDiagramEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusReflowableShapeEditPolicy());
-
// 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);
}
@@ -197,7 +196,7 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintBodyEditPartCN.java
index ac30d4751df..b100e00d080 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintBodyEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintBodyEditPartCN.java
@@ -29,7 +29,6 @@ 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;
@@ -836,7 +835,7 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintEditPartCN.java
index 1667f868533..a06742f9453 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintEditPartCN.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure;
@@ -195,7 +195,7 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintNameEditPartCN.java
index 65a6d09a866..bf298303fae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ConstraintNameEditPartCN.java
@@ -30,7 +30,6 @@ 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;
@@ -853,7 +852,7 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DiagramNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DiagramNameEditPart.java
index 04445453829..0e1579ee84f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DiagramNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DiagramNameEditPart.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -60,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -145,6 +145,7 @@ public class DiagramNameEditPart extends AbstractShortcutDiagramNameEditPart imp
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationEditPartCN.java
index 2c8c848c735..c593578ee41 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationEditPartCN.java
@@ -15,8 +15,6 @@ import java.util.Collections;
import java.util.List;
import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
@@ -30,22 +28,22 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts.AbstractObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.ObservationLayoutEditPolicy;
-import org.eclipse.papyrus.uml.diagram.communication.custom.figures.DurationObservationNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.communication.edit.policies.DurationObservationItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -53,7 +51,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class DurationObservationEditPartCN extends AbstractObservationEditPart {
+public class DurationObservationEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
@@ -87,7 +85,7 @@ public class DurationObservationEditPartCN extends AbstractObservationEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, new ObservationLayoutEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -164,7 +162,7 @@ public class DurationObservationEditPartCN extends AbstractObservationEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new DurationObservationNodeFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -173,8 +171,8 @@ public class DurationObservationEditPartCN extends AbstractObservationEditPart {
* @generated
*/
@Override
- public DurationObservationNodeFigure getPrimaryShape() {
- return (DurationObservationNodeFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -183,8 +181,7 @@ public class DurationObservationEditPartCN extends AbstractObservationEditPart {
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
if (borderItemEditPart instanceof DurationObservationLabelEditPartCN) {
- BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
- locator.setBorderItemOffset(new Dimension(-20, -20));
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof DurationObservationStereotypeLabelEditPartCN) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -200,7 +197,7 @@ public class DurationObservationEditPartCN extends AbstractObservationEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationLabelEditPartCN.java
index 011734cec8a..50f2c66eb79 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationLabelEditPartCN.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -60,11 +59,12 @@ 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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
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.communication.edit.policies.UMLTextSelectionEditPolicy;
@@ -84,7 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DurationObservationLabelEditPartCN extends AbstractLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+public class DurationObservationLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -146,6 +146,7 @@ public class DurationObservationLabelEditPartCN extends AbstractLabelEditPart im
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationStereotypeLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationStereotypeLabelEditPartCN.java
index c7624b99fe8..85e9773e544 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationStereotypeLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/DurationObservationStereotypeLabelEditPartCN.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -61,6 +60,7 @@ 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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -149,6 +149,7 @@ public class DurationObservationStereotypeLabelEditPartCN extends PapyrusLabelEd
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionCompartmentEditPart.java
index 3ad8791ba10..b912d6dfcf7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionCompartmentEditPart.java
@@ -17,15 +17,18 @@ 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.ShapeCompartmentEditPart;
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.diagram.ui.figures.ResizableCompartmentFigure;
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.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.OrphanViewPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
@@ -75,16 +78,18 @@ public class InteractionCompartmentEditPart extends ShapeCompartmentEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new InteractionCompartmentItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.communication.edit.policies.InteractionCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.communication.edit.policies.InteractionCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new OrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomInteractionCompartmentSemanticEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionEditPart.java
index c067ee665d7..0b68d1355ee 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionEditPart.java
@@ -11,27 +11,39 @@
*/
package org.eclipse.papyrus.uml.diagram.communication.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractInteractionEditPart;
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.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CommunicationGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.communication.custom.figures.InteractionRectangleFigure;
@@ -42,7 +54,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class InteractionEditPart extends NamedElementEditPart {
+public class InteractionEditPart extends AbstractInteractionEditPart {
/**
* @generated
@@ -78,6 +90,7 @@ public class InteractionEditPart extends NamedElementEditPart {
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -90,6 +103,20 @@ public class InteractionEditPart extends NamedElementEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case InteractionFloatingLabelEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -117,6 +144,19 @@ public class InteractionEditPart extends NamedElementEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -144,7 +184,7 @@ public class InteractionEditPart extends NamedElementEditPart {
*/
protected boolean addFixedChild(EditPart childEditPart) {
if (childEditPart instanceof InteractionNameEditPart) {
- ((InteractionNameEditPart) childEditPart).setLabel(getPrimaryShape().getHeaderLabel());
+ ((InteractionNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
@@ -204,6 +244,9 @@ public class InteractionEditPart extends NamedElementEditPart {
if (editPart instanceof InteractionCompartmentEditPart) {
return getPrimaryShape().getCompartmentFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -211,8 +254,22 @@ public class InteractionEditPart extends NamedElementEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof InteractionFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(857, 757);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(857, 757);
return result;
}
@@ -225,7 +282,7 @@ public class InteractionEditPart extends NamedElementEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionFloatingLabelEditPart.java
new file mode 100644
index 00000000000..92c04b2bb7f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionFloatingLabelEditPart.java
@@ -0,0 +1,849 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.edit.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.communication.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.communication.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 InteractionFloatingLabelEditPart extends FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6013;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public InteractionFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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() == IParserEditStatus.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.Interaction_8002, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionFloatingLabelEditPart.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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionNameEditPart.java
index 42cbc958183..21c59993dd8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/InteractionNameEditPart.java
@@ -18,6 +18,7 @@ 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;
@@ -29,7 +30,6 @@ 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;
@@ -58,6 +58,8 @@ 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;
@@ -65,6 +67,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEd
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.communication.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
@@ -239,6 +242,16 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart implemen
* @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;
}
@@ -806,6 +819,9 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart implemen
}
}
}
+ if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ refreshLabel();
+ }
super.handleNotificationEvent(event);
}
@@ -836,7 +852,7 @@ public class InteractionNameEditPart extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineEditPartCN.java
index 5232c7689e5..b44b08f578a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineEditPartCN.java
@@ -11,28 +11,40 @@
*/
package org.eclipse.papyrus.uml.diagram.communication.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.CommunicationGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic.CustomLifelineItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.policies.LifelineItemSemanticEditPolicyCN;
@@ -42,7 +54,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class LifelineEditPartCN extends NamedElementEditPart {
+public class LifelineEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
@@ -78,6 +90,7 @@ public class LifelineEditPartCN extends NamedElementEditPart {
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomLifelineItemSemanticEditPolicyCN());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -90,6 +103,20 @@ public class LifelineEditPartCN extends NamedElementEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case LifelineFloatingLabelEditPartCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -117,6 +144,19 @@ public class LifelineEditPartCN extends NamedElementEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -126,7 +166,7 @@ public class LifelineEditPartCN extends NamedElementEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new NodeNamedElementFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -135,8 +175,8 @@ public class LifelineEditPartCN extends NamedElementEditPart {
* @generated
*/
@Override
- public NodeNamedElementFigure getPrimaryShape() {
- return (NodeNamedElementFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -189,6 +229,9 @@ public class LifelineEditPartCN extends NamedElementEditPart {
*/
@Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -196,8 +239,22 @@ public class LifelineEditPartCN extends NamedElementEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof LifelineFloatingLabelEditPartCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 25);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 25);
return result;
}
@@ -210,7 +267,7 @@ public class LifelineEditPartCN extends NamedElementEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineFloatingLabelEditPartCN.java
new file mode 100644
index 00000000000..01783d6717b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineFloatingLabelEditPartCN.java
@@ -0,0 +1,850 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.edit.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.communication.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.communication.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 LifelineFloatingLabelEditPartCN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6014;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineFloatingLabelEditPartCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public LifelineFloatingLabelEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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() == IParserEditStatus.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.Lifeline_8001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineFloatingLabelEditPartCN.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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineNameEditPart.java
index e9ce6f46195..c0708106372 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/LifelineNameEditPart.java
@@ -29,7 +29,6 @@ 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;
@@ -836,7 +835,7 @@ public class LifelineNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/MessageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/MessageNameEditPart.java
index 63faccef637..7c48c216cb2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/MessageNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/MessageNameEditPart.java
@@ -1,839 +1,840 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.communication.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.communication.custom.edit.policies.MessageNameEditPolicy;
-import org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic.CustomMessageNameItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.communication.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.communication.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 MessageNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6001;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart.VISUAL_ID), new Point(1, -23));
- }
-
- /**
- * @generated
- */
- public MessageNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomMessageNameItemSemanticEditPolicy());
- installEditPolicy("CustomDisplay", new MessageNameEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- 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() == IParserEditStatus.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.Message_8009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart.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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.EditPolicyRoles;
+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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.communication.custom.edit.policies.MessageNameEditPolicy;
+import org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemantic.CustomMessageNameItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.communication.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.communication.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 MessageNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6001;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart.VISUAL_ID), new Point(1, -23));
+ }
+
+ /**
+ * @generated
+ */
+ public MessageNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomMessageNameItemSemanticEditPolicy());
+ installEditPolicy("CustomDisplay", new MessageNameEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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() == IParserEditStatus.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.Message_8009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart.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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ModelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ModelEditPart.java
index 1d36c633627..006686b7442 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ModelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ModelEditPart.java
@@ -53,8 +53,8 @@ public class ModelEditPart extends PapyrusDiagramEditPart {
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageItemSemanticEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.communication.edit.policies.ModelCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.communication.edit.policies.ModelCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new CustomOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ShortCutDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ShortCutDiagramEditPart.java
index 9ec2ce7a571..5efece3aad8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ShortCutDiagramEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/ShortCutDiagramEditPart.java
@@ -31,12 +31,12 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortCutDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShortCutDiagramEditPolicy;
@@ -191,7 +191,7 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(20, 20);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationEditPartCN.java
index 5bd71271363..04ea249428a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationEditPartCN.java
@@ -15,8 +15,6 @@ import java.util.Collections;
import java.util.List;
import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
@@ -30,22 +28,22 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.communication.custom.edit.parts.AbstractObservationEditPart;
-import org.eclipse.papyrus.uml.diagram.communication.custom.edit.policies.ObservationLayoutEditPolicy;
-import org.eclipse.papyrus.uml.diagram.communication.custom.figures.TimeObservationNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.communication.edit.policies.TimeObservationItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.communication.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -53,7 +51,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class TimeObservationEditPartCN extends AbstractObservationEditPart {
+public class TimeObservationEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
@@ -87,7 +85,7 @@ public class TimeObservationEditPartCN extends AbstractObservationEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeIconlDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, new ObservationLayoutEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -164,7 +162,7 @@ public class TimeObservationEditPartCN extends AbstractObservationEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new TimeObservationNodeFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -173,8 +171,8 @@ public class TimeObservationEditPartCN extends AbstractObservationEditPart {
* @generated
*/
@Override
- public TimeObservationNodeFigure getPrimaryShape() {
- return (TimeObservationNodeFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -183,8 +181,7 @@ public class TimeObservationEditPartCN extends AbstractObservationEditPart {
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
if (borderItemEditPart instanceof TimeObservationNameEditPartCN) {
- BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
- locator.setBorderItemOffset(new Dimension(-20, -20));
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof TimeObservationStereotypeLabelEditPartCN) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -200,7 +197,7 @@ public class TimeObservationEditPartCN extends AbstractObservationEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationNameEditPartCN.java
index eeb3e60435d..a7db4ecab19 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationNameEditPartCN.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -60,11 +59,12 @@ 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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
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.communication.edit.policies.UMLTextSelectionEditPolicy;
@@ -84,7 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class TimeObservationNameEditPartCN extends AbstractLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+public class TimeObservationNameEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -146,6 +146,7 @@ public class TimeObservationNameEditPartCN extends AbstractLabelEditPart impleme
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationStereotypeLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationStereotypeLabelEditPartCN.java
index 2978184e7bd..9abeaff0132 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationStereotypeLabelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/TimeObservationStereotypeLabelEditPartCN.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -61,6 +60,7 @@ 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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -149,6 +149,7 @@ public class TimeObservationStereotypeLabelEditPartCN extends PapyrusLabelEditPa
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/UMLEditPartFactory.java
index 8f02dab9e73..6206b0c4c0d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/UMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/parts/UMLEditPartFactory.java
@@ -47,6 +47,9 @@ public class UMLEditPartFactory implements EditPartFactory {
case InteractionNameEditPart.VISUAL_ID:
return new InteractionNameEditPart(view);
+ case InteractionFloatingLabelEditPart.VISUAL_ID:
+ return new InteractionFloatingLabelEditPart(view);
+
case ShortCutDiagramEditPart.VISUAL_ID:
return new ShortCutDiagramEditPart(view);
@@ -59,6 +62,9 @@ public class UMLEditPartFactory implements EditPartFactory {
case LifelineNameEditPart.VISUAL_ID:
return new LifelineNameEditPart(view);
+ case LifelineFloatingLabelEditPartCN.VISUAL_ID:
+ return new LifelineFloatingLabelEditPartCN(view);
+
case ConstraintEditPartCN.VISUAL_ID:
return new ConstraintEditPartCN(view);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/CommentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/CommentItemSemanticEditPolicyCN.java
index 2c10b8a4460..61b53aa2070 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/CommentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/CommentItemSemanticEditPolicyCN.java
@@ -66,7 +66,7 @@ public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ConstraintItemSemanticEditPolicyCN.java
index 8e6f0fa84f2..1e114031240 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ConstraintItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ConstraintItemSemanticEditPolicyCN.java
@@ -72,7 +72,7 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/DurationObservationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/DurationObservationItemSemanticEditPolicyCN.java
index ff77c1f3ac4..1ee1ec6ddb7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/DurationObservationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/DurationObservationItemSemanticEditPolicyCN.java
@@ -72,7 +72,7 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionItemSemanticEditPolicy.java
index f8eb2c7783f..e5efd26381a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionItemSemanticEditPolicy.java
@@ -87,7 +87,7 @@ public class InteractionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/LifelineItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/LifelineItemSemanticEditPolicyCN.java
index 3a325dce1ac..ad84bbd4de5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/LifelineItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/LifelineItemSemanticEditPolicyCN.java
@@ -72,7 +72,7 @@ public class LifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/MessageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/MessageItemSemanticEditPolicy.java
index 8a9964adcde..bd5c4e72fb0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/MessageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/MessageItemSemanticEditPolicy.java
@@ -64,10 +64,10 @@ public class MessageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
cmd.setTransactionNestingEnabled(true);
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 org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
return getGEFWrapper(cmd.reduce());
- //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ // return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ModelCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ModelCanonicalEditPolicy.java
index ae5c428a7d7..beaf4d2731c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ModelCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ModelCanonicalEditPolicy.java
@@ -32,7 +32,6 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.Edge;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java
index 33efd734c7d..2188c9eea57 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java
@@ -51,7 +51,7 @@ public class ShortCutDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEd
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/TimeObservationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/TimeObservationItemSemanticEditPolicyCN.java
index 5ac56db765c..5c448a1705e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/TimeObservationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/TimeObservationItemSemanticEditPolicyCN.java
@@ -72,7 +72,7 @@ public class TimeObservationItemSemanticEditPolicyCN extends UMLBaseItemSemantic
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorContentProvider.java
index 58db3178f6e..e04e52b1004 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorContentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLDomainNavigatorContentProvider.java
@@ -26,7 +26,6 @@ import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.papyrus.uml.diagram.communication.part.UMLDiagramEditorPlugin;
import org.eclipse.ui.IMemento;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorContentProvider.java
index f5eeb8d3505..059c0136d6b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorContentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/navigator/UMLNavigatorContentProvider.java
@@ -26,7 +26,6 @@ import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.ModelEditPart;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditorUtil.java
index 0d23bf236e3..3a355ab2876 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditorUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramEditorUtil.java
@@ -48,7 +48,6 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalViewer;
import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
@@ -183,6 +182,7 @@ public class UMLDiagramEditorUtil {
* Create a new instance of domain element associated with canvas.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static Package createInitialModel() {
@@ -193,6 +193,7 @@ public class UMLDiagramEditorUtil {
* Store model element in the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static void attachModelToResource(Package model, Resource resource) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramUpdater.java
index 9f9f3436c06..c505603238f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDiagramUpdater.java
@@ -66,7 +66,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
protected UMLDiagramUpdater() {
- //to prevent instantiation allowing the override
+ // to prevent instantiation allowing the override
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDocumentProvider.java
index c3d76a5955c..343732a3f10 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDocumentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLDocumentProvider.java
@@ -550,7 +550,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
info.stopResourceListening();
fireElementStateChanging(element);
try {
- monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); //"Saving diagram"
+ monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); // "Saving diagram"
for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
monitor.setTaskName(NLS.bind(
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLInitDiagramFileAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLInitDiagramFileAction.java
index 85b682ea6fd..24deb08b440 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLInitDiagramFileAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLInitDiagramFileAction.java
@@ -19,7 +19,6 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLVisualIDRegistry.java
index a2d8ddb41c1..bda356344db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLVisualIDRegistry.java
@@ -30,8 +30,10 @@ import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservat
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationStereotypeLabelEditPartCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionEditPart;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionNameEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineFloatingLabelEditPartCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineNameEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart;
@@ -201,6 +203,9 @@ public class UMLVisualIDRegistry {
if (InteractionNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (InteractionFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (InteractionCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -214,6 +219,9 @@ public class UMLVisualIDRegistry {
if (LifelineNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (LifelineFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case ConstraintEditPartCN.VISUAL_ID:
if (ConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
@@ -309,7 +317,7 @@ public class UMLVisualIDRegistry {
*/
public static boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
if (candidate == -1) {
- //unrecognized id is always bad
+ // unrecognized id is always bad
return false;
}
int basic = getNodeVisualID(containerView, domainElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/providers/UMLParserProvider.java
index 2e5d4c36db8..6275461e3ee 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/providers/UMLParserProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/providers/UMLParserProvider.java
@@ -35,7 +35,9 @@ import org.eclipse.papyrus.uml.diagram.communication.edit.parts.ConstraintNameEd
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DiagramNameEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationLabelEditPartCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationStereotypeLabelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionNameEditPart;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineFloatingLabelEditPartCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineNameEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.TimeObservationNameEditPartCN;
@@ -74,6 +76,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser interactionName_6013Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInteractionName_6013Parser() {
+ if (interactionName_6013Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ interactionName_6013Parser = parser;
+ }
+ return interactionName_6013Parser;
+ }
+
+ /**
+ * @generated
+ */
private ShortcutDiagramParser diagramName_0Parser;
/**
@@ -104,6 +125,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser lifelineName_6014Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getLifelineName_6014Parser() {
+ if (lifelineName_6014Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ lifelineName_6014Parser = parser;
+ }
+ return lifelineName_6014Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser constraintName_5064Parser;
/**
@@ -261,12 +301,16 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
switch (visualID) {
case InteractionNameEditPart.VISUAL_ID:
return getInteractionName_5001Parser();
+ case InteractionFloatingLabelEditPart.VISUAL_ID:
+ return getInteractionName_6013Parser();
case DiagramNameEditPart.VISUAL_ID:
return getDiagramName_0Parser();
case LifelineNameEditPart.VISUAL_ID:
return getLifelineName_5002Parser();
+ case LifelineFloatingLabelEditPartCN.VISUAL_ID:
+ return getLifelineName_6014Parser();
case ConstraintNameEditPartCN.VISUAL_ID:
return getConstraintName_5064Parser();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/providers/UMLViewProvider.java
index cd6783a5afd..3ee951d9e4d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/providers/UMLViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/providers/UMLViewProvider.java
@@ -73,8 +73,10 @@ import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservat
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationStereotypeLabelEditPartCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionEditPart;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.InteractionNameEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineEditPartCN;
+import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineFloatingLabelEditPartCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.LifelineNameEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageEditPart;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.MessageNameEditPart;
@@ -115,10 +117,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
*/
protected boolean provides(CreateViewForKindOperation op) {
/*
- if (op.getViewKind() == Node.class)
- return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
- if (op.getViewKind() == Edge.class)
- return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ * if (op.getViewKind() == Node.class)
+ * return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ * if (op.getViewKind() == Edge.class)
+ * return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
*/
// check Diagram Type should be the class diagram
@@ -144,7 +146,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* <p>
* This method can be overloaded when diagram editor inherits from another one, but should never be <code>null</code>
* </p>
- *
+ *
* @return the unique identifier of the diagram for which views are provided.
*/
return ModelEditPart.MODEL_ID;
@@ -228,7 +230,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
*/
protected boolean provides(CreateEdgeViewOperation op) {
IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- //RS: add code for extended types creation
+ // RS: add code for extended types creation
if (elementType instanceof IExtendedHintedElementType) {
IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType);
if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) {
@@ -239,9 +241,9 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
return false; // foreign element type
}
}
- //if (!org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
- // return false; // foreign element type
- //}
+ // if (!org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
+ // return false; // foreign element type
+ // }
// END R.S.
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) {
@@ -337,7 +339,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interaction");
Node label5001 = createLabel(node, UMLVisualIDRegistry.getType(InteractionNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(InteractionCompartmentEditPart.VISUAL_ID), false, false, false, false);
+ Node label6013 = createLabel(node, UMLVisualIDRegistry.getType(InteractionFloatingLabelEditPart.VISUAL_ID));
+ label6013.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6013 = (Location) label6013.getLayoutConstraint();
+ location6013.setX(50);
+ location6013.setY(0);
+ createCompartment(node, UMLVisualIDRegistry.getType(InteractionCompartmentEditPart.VISUAL_ID), true, false, false, false);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Interaction");
return node;
}
@@ -378,6 +385,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Lifeline");
Node label5002 = createLabel(node, UMLVisualIDRegistry.getType(LifelineNameEditPart.VISUAL_ID));
+ Node label6014 = createLabel(node, UMLVisualIDRegistry.getType(LifelineFloatingLabelEditPartCN.VISUAL_ID));
+ label6014.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6014 = (Location) label6014.getLayoutConstraint();
+ location6014.setX(0);
+ location6014.setY(5);
return node;
}
@@ -488,10 +500,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Message");
- //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);
- //}
+ // 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);
+ // }
Node label6001 = createLabel(edge, UMLVisualIDRegistry.getType(MessageNameEditPart.VISUAL_ID));
label6001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6001 = (Location) label6001.getLayoutConstraint();
@@ -524,10 +536,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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;
}
@@ -550,10 +562,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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;
}
@@ -576,10 +588,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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;
}
@@ -602,10 +614,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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;
}
@@ -636,9 +648,9 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* @generated
*/
protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) {
- //SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
- //rv.setShowTitle(showTitle);
- //rv.setCollapsed(isCollapsed);
+ // SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
+ // rv.setShowTitle(showTitle);
+ // rv.setCollapsed(isCollapsed);
Node rv;
if (canCollapse) {
rv = NotationFactory.eINSTANCE.createBasicCompartment();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF
index a1bbfd6123b..ae6da797ea6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF
@@ -62,13 +62,11 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.1.0",
org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.1.0",
org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0"
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
+ org.eclipse.core.databinding.observable
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.component.part.UMLDi
- agramEditorPlugin
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramEditorPlugin
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.component;singlet
- on:=true
-
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.component; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/edit/part/CustomPortEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/edit/part/CustomPortEditPart.java
new file mode 100644
index 00000000000..be7ea68f4a9
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/edit/part/CustomPortEditPart.java
@@ -0,0 +1,39 @@
+package org.eclipse.papyrus.uml.diagram.component.custom.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.PortEditPart;
+
+
+
+public class CustomPortEditPart extends PortEditPart {
+
+ public CustomPortEditPart(View view) {
+ super(view);
+ }
+
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new RoundedRectangleNodePlateFigure(20, 20);
+ return result;
+ }
+
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if(borderItemEditPart instanceof FloatingLabelEditPart) {
+ //Create specific locator
+ RoundedRectangleLabelPositionLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure(), PositionConstants.SOUTH);
+ //Offset from the parent for the attached case
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/figure/nodes/CompositeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/figure/nodes/CompositeFigure.java
index be39fb3ae2d..cbaba3f4b85 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/figure/nodes/CompositeFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/figure/nodes/CompositeFigure.java
@@ -19,7 +19,7 @@ import java.util.List;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.papyrus.uml.diagram.common.Activator;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.CompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramEditorPlugin;
import org.eclipse.swt.graphics.Image;
@@ -27,7 +27,7 @@ import org.eclipse.swt.graphics.Image;
/**
* Figure for Composite representation of Class.
*/
-public class CompositeFigure extends CompartmentFigure {
+public class CompositeFigure extends RoundedCompartmentFigure {
/* to present the class as an active class */
/** The active. Default value is false */
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/figure/nodes/LollipopInterfaceFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/figure/nodes/LollipopInterfaceFigure.java
index fc4d8858e3f..846bac6ba91 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/figure/nodes/LollipopInterfaceFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/figure/nodes/LollipopInterfaceFigure.java
@@ -18,14 +18,14 @@ import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
/**
* Figure for Required interface. It draws an half circle.
*/
-public class LollipopInterfaceFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
+public class LollipopInterfaceFigure extends RoundedCompartmentFigure implements IPapyrusNodeUMLElementFigure {
/** sets the beginning of the arc */
protected int arcStarting = 0;
@@ -105,7 +105,7 @@ public class LollipopInterfaceFigure extends PapyrusNodeFigure implements IPapyr
/*
* (non-Javadoc)
- *
+ *
* @see
* com.cea.papyrus.diagram.composite.figure.ProvidedInterfaceFigure#paintFigure(org.eclipse.
* draw2d.Graphics)
@@ -148,10 +148,7 @@ public class LollipopInterfaceFigure extends PapyrusNodeFigure implements IPapyr
graphics.drawOval(area.x, area.y, area.width - 1, area.height - 1);
graphics.popState();
-
}
-
-
}
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/locators/PortPositionLocator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/locators/PortPositionLocator.java
index 83410210b06..7b62513dafb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/locators/PortPositionLocator.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/locators/PortPositionLocator.java
@@ -13,11 +13,15 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.component.custom.locators;
+import org.eclipse.draw2d.ConnectionAnchor;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SlidableRoundedRectangleAnchor;
// TODO: Auto-generated Javadoc
/**
@@ -43,6 +47,8 @@ import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
*
* .
*/
+@Deprecated
+// use org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator instead
public class PortPositionLocator implements IBorderItemLocator {
/** the figure around which this border item appears. */
@@ -105,6 +111,7 @@ public class PortPositionLocator implements IBorderItemLocator {
// and resolve the bounds of it graphical parent
Rectangle realLocation = new Rectangle(proposedLocation);
+
Rectangle parentRec = getParentFigure().getBounds().getCopy();
// Calculate Max position around the graphical parent (1/2 size or the port around
@@ -143,6 +150,27 @@ public class PortPositionLocator implements IBorderItemLocator {
}
}
}
+ // If it's a SVGNodePlate get the anchor to get the position
+ if (parentFigure instanceof SVGNodePlateFigure) {
+
+ // Translate location to absolute before calculate location Point
+ parentFigure.translateToAbsolute(proposedLocation);
+ parentFigure.translateToAbsolute(parentRec);
+
+ // Get the anchor
+ ConnectionAnchor connectionAnchor = ((SVGNodePlateFigure) parentFigure).getConnectionAnchor("");
+
+ // Get the location point, with anchor.
+ Point locationForPort = ((SlidableRoundedRectangleAnchor) connectionAnchor).getLocation(parentRec.getCenter(), proposedLocation.getLocation());
+ if (locationForPort != null) {
+ proposedLocation.setLocation(locationForPort);
+ }
+ // Translate to relative the location
+ parentFigure.translateToRelative(proposedLocation);
+
+ // Set the location
+ realLocation.setLocation(proposedLocation.getLocation());
+ }
// Return constrained location
return realLocation;
@@ -233,6 +261,10 @@ public class PortPositionLocator implements IBorderItemLocator {
Point validLocation = getValidLocation(proposedLocation, target).getLocation();
- target.setBounds(new Rectangle(validLocation, target.getPreferredSize()));
+ Dimension preferredSize = target.getPreferredSize();
+ Rectangle rect = new Rectangle(validLocation, preferredSize);
+ rect.translate(-preferredSize.width / 2, -preferredSize.height / 2);
+
+ target.setBounds(rect);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen
index 994a05dfe99..82c3e85e1d8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/model/ComponentDiagram.gmfgen
@@ -360,6 +360,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
@@ -395,6 +399,26 @@
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6033"
+ editPartClassName="RectangleInterfaceFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="InterfaceFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
</childNodes>
<childNodes
visualID="3070"
@@ -453,6 +477,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component"/>
@@ -491,6 +519,26 @@
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6026"
+ editPartClassName="ComponentFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="ComponentFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
</childNodes>
<childNodes
visualID="3071"
@@ -549,6 +597,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component"/>
@@ -586,6 +638,26 @@
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6027"
+ editPartClassName="ComponentFloatingLabelEditPartPCN"
+ itemSemanticEditPolicyClassName="ComponentFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
</childNodes>
<childNodes
visualID="3074"
@@ -915,6 +987,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
@@ -948,6 +1024,26 @@
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6028"
+ editPartClassName="InterfaceFloatingLabelEditPartPCN"
+ itemSemanticEditPolicyClassName="InterfaceFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
</childNodes>
<childNodes
visualID="3079"
@@ -1055,7 +1151,7 @@
editHelperClassName="DependencyEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DependencyNodeFigure">
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
<attributes
xsi:type="gmfgen:DefaultSizeAttributes"
width="10"
@@ -1069,6 +1165,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
@@ -1094,6 +1194,26 @@
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6029"
+ editPartClassName="DependencyNodeFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="DependencyFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
</topLevelNodes>
<topLevelNodes
visualID="2002"
@@ -1150,6 +1270,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component"/>
@@ -1186,6 +1310,26 @@
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6030"
+ editPartClassName="ComponentFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="ComponentFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
</topLevelNodes>
<topLevelNodes
visualID="3202"
@@ -1373,6 +1517,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
@@ -1408,6 +1556,26 @@
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6031"
+ editPartClassName="RectangleInterfaceFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="InterfaceFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
</topLevelNodes>
<topLevelNodes
visualID="3201"
@@ -1660,6 +1828,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
<modelFacet>
<metaClass
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Interface"/>
@@ -1694,6 +1866,26 @@
href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6032"
+ editPartClassName="InterfaceFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="InterfaceFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
</topLevelNodes>
<links
visualID="4001"
@@ -2559,6 +2751,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
</compartments>
<compartments
visualID="7006"
@@ -2684,6 +2880,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
</compartments>
<compartments
visualID="7004"
@@ -2709,6 +2909,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
</compartments>
<compartments
visualID="7008"
@@ -2728,6 +2932,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
</compartments>
<compartments
visualID="7009"
@@ -2747,6 +2955,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
</compartments>
<compartments
visualID="7010"
@@ -2766,6 +2978,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
</compartments>
<compartments
visualID="7011"
@@ -2785,6 +3001,10 @@
xsi:type="gmfgen:CustomBehaviour"
key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
</compartments>
<palette>
<groups
@@ -2794,7 +3014,6 @@
smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
createMethodName="createNodesGroup"
id="&quot;component.group.nodes&quot;"
- stack="true"
collapse="true">
<entries
xsi:type="gmfgen:ToolEntry"
@@ -2896,7 +3115,6 @@
smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
createMethodName="createLinksGroup"
id="&quot;component.group.links&quot;"
- stack="true"
collapse="true">
<entries
xsi:type="gmfgen:ToolEntry"
@@ -3028,7 +3246,8 @@
<plugin
iD="org.eclipse.papyrus.uml.diagram.component"
name="Papyrus Component Diagram "
- provider="Eclipse Modeling Project">
+ provider="Eclipse Modeling Project"
+ version="1.1.0.qualifier">
<requiredPlugins>org.eclipse.draw2d</requiredPlugins>
<requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
</plugin>
@@ -3103,7 +3322,7 @@
extensibleViaService="true">
<implementations
xsi:type="gmfgen:PredefinedParser"
- uses="/0/@diagram/@childNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.1/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.8/@labels.0/@modelFacet /0/@diagram/@links.4/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.3/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.5/@labels.0/@modelFacet /0/@diagram/@childNodes.11/@labels.0/@modelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet /0/@diagram/@links.6/@labels.0/@modelFacet /0/@diagram/@links.3/@labels.0/@modelFacet /0/@diagram/@links.5/@labels.0/@modelFacet /0/@diagram/@links.10/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.2/@labels.0/@modelFacet /0/@diagram/@childNodes.1/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.7/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labelModelFacet /0/@diagram/@childNodes.9/@labelModelFacet /0/@diagram/@childNodes.10/@labelModelFacet /0/@diagram/@childNodes.3/@labels.0/@modelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet /0/@diagram/@links.13/@labels.1/@modelFacet"/>
+ uses="/0/@diagram/@childNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.1/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.8/@labels.0/@modelFacet /0/@diagram/@links.4/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.3/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.5/@labels.0/@modelFacet /0/@diagram/@childNodes.11/@labels.0/@modelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet /0/@diagram/@links.6/@labels.0/@modelFacet /0/@diagram/@links.3/@labels.0/@modelFacet /0/@diagram/@links.5/@labels.0/@modelFacet /0/@diagram/@links.10/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.2/@labels.0/@modelFacet /0/@diagram/@childNodes.1/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.7/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labelModelFacet /0/@diagram/@childNodes.9/@labelModelFacet /0/@diagram/@childNodes.10/@labelModelFacet /0/@diagram/@childNodes.3/@labels.0/@modelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet /0/@diagram/@links.13/@labels.1/@modelFacet /0/@diagram/@childNodes.3/@labels.1/@modelFacet /0/@diagram/@childNodes.4/@labels.1/@modelFacet /0/@diagram/@childNodes.5/@labels.1/@modelFacet /0/@diagram/@childNodes.11/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.1/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.4/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.8/@labels.1/@modelFacet"/>
<implementations
xsi:type="gmfgen:CustomParser"
uses="/0/@diagram/@topLevelNodes.5/@labels.0/@modelFacet /0/@diagram/@childNodes.6/@labels.0/@modelFacet"
@@ -3129,8 +3348,8 @@
xsi:type="papyrusgmfgenextension:ExtendedGenView"
comment="Manage named element figure relying on Affixed Node"
genView="/0/@diagram/@childNodes.0"
- name="EP_NamedElement_AFF_NODE"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractBorderEditPart"/>
+ name="RoundedBorderNamedElementEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart"/>
<extensionNodes
xsi:type="papyrusgmfgenextension:ExtendedGenView"
comment="Label in charge to display applied stereotypes on links"
@@ -3145,12 +3364,6 @@
superOwnedEditPart="org.eclipse.papyrus.uml.diagram.component.custom.edit.part.CustomPropertyPartEditPartCN"/>
<extensionNodes
xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Elements that inherits Composite"
- genView="/0/@diagram/@topLevelNodes.1 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5"
- name="Composite inheritance"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
comment="adding to manange otherNamedElement"
genView="/0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.3 /0/@diagram /0/@diagram/@topLevelNodes.4/@labels.0"
name="OtherNamedElementEditPart"
@@ -3188,7 +3401,7 @@
<extensionNodes
xsi:type="papyrusgmfgenextension:SpecificLocator"
comment="Affixed Port locator"
- classpath="org.eclipse.papyrus.uml.diagram.component.custom.locators.PortPositionLocator"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator"
genChildSideAffixedNode="/0/@diagram/@childNodes.0"/>
<extensionNodes
xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
@@ -3242,5 +3455,21 @@
role="Name"
linkLabels="/0/@diagram/@links.13/@labels.1"
visibleByDefault="false"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add superclass for floating Label"
+ genView="/0/@diagram/@childNodes.3/@labels.1 /0/@diagram/@childNodes.4/@labels.1 /0/@diagram/@childNodes.5/@labels.1 /0/@diagram/@childNodes.11/@labels.1 /0/@diagram/@topLevelNodes.0/@labels.1 /0/@diagram/@topLevelNodes.1/@labels.1 /0/@diagram/@topLevelNodes.4/@labels.1 /0/@diagram/@topLevelNodes.8/@labels.1"
+ name="FloatingLabelEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ genView="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@topLevelNodes.1 /0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.3 /0/@diagram/@topLevelNodes.4"
+ name="RoundedCompartmentEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
+ comment="Locator for external Floating label of RoundedCompartment EP"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator"
+ genExternalNodeLabel="/0/@diagram/@childNodes.3/@labels.1 /0/@diagram/@childNodes.4/@labels.1 /0/@diagram/@childNodes.5/@labels.1 /0/@diagram/@childNodes.11/@labels.1 /0/@diagram/@topLevelNodes.0/@labels.1 /0/@diagram/@topLevelNodes.1/@labels.1 /0/@diagram/@topLevelNodes.4/@labels.1 /0/@diagram/@topLevelNodes.8/@labels.1"/>
</papyrusgmfgenextension:PapyrusExtensionRootNode>
</xmi:XMI>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml
index 090d84fbdcb..af282543937 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml
@@ -134,595 +134,595 @@
</extension>
- <extension point="org.eclipse.ui.contexts" id="ui-context">
- <?gmfgen generated="true"?>
- <context
- description="%context.description"
- id="org.eclipse.papyrus.uml.diagram.component.ui.diagramContext"
- name="%context.name"
- parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
- </context>
- </extension>
+ <extension point="org.eclipse.ui.contexts" id="ui-context">
+ <?gmfgen generated="true"?>
+ <context
+ description="%context.description"
+ id="org.eclipse.papyrus.uml.diagram.component.ui.diagramContext"
+ name="%context.name"
+ parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
+ </context>
+ </extension>
- <extension point="org.eclipse.ui.preferencePages" id="prefpages">
- <?gmfgen generated="true"?>
-<page
- id="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLComponentDiagram"
- name="PapyrusUMLComponentDiagram Diagram"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
- class="org.eclipse.papyrus.uml.diagram.component.preferences.DiagramGeneralPreferencePage">
-</page>
-<page
- id="org.eclipse.papyrus.uml.diagram.component.preferences.DiagramPrintingPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.printing"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLComponentDiagram"
- class="org.eclipse.papyrus.uml.diagram.component.preferences.DiagramPrintingPreferencePage">
-</page>
-<page
- id="org.eclipse.papyrus.uml.diagram.component.preferences.DiagramRulersAndGridPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLComponentDiagram"
- class="org.eclipse.papyrus.uml.diagram.component.preferences.DiagramRulersAndGridPreferencePage">
-</page>
- </extension>
+ <extension point="org.eclipse.ui.preferencePages" id="prefpages">
+ <?gmfgen generated="true"?>
+<page
+ id="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLComponentDiagram"
+ name="PapyrusUMLComponentDiagram Diagram"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
+ class="org.eclipse.papyrus.uml.diagram.component.preferences.DiagramGeneralPreferencePage">
+</page>
+<page
+ id="org.eclipse.papyrus.uml.diagram.component.preferences.DiagramPrintingPreferencePage"
+ name="%prefpage.org.eclipse.uml2.uml.diagram.printing"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLComponentDiagram"
+ class="org.eclipse.papyrus.uml.diagram.component.preferences.DiagramPrintingPreferencePage">
+</page>
+<page
+ id="org.eclipse.papyrus.uml.diagram.component.preferences.DiagramRulersAndGridPreferencePage"
+ name="%prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLComponentDiagram"
+ class="org.eclipse.papyrus.uml.diagram.component.preferences.DiagramRulersAndGridPreferencePage">
+</page>
+ </extension>
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
- <?gmfgen generated="true"?>
- <propertyContributor
- contributorId="org.eclipse.papyrus.uml.diagram.component"
- labelProvider="org.eclipse.papyrus.uml.diagram.component.sheet.UMLSheetLabelProvider">
- <propertyCategory category="domain"/>
- <propertyCategory category="visual"/>
- <propertyCategory category="extra"/>
- </propertyContributor>
- </extension>
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
+ <?gmfgen generated="true"?>
+ <propertyContributor
+ contributorId="org.eclipse.papyrus.uml.diagram.component"
+ labelProvider="org.eclipse.papyrus.uml.diagram.component.sheet.UMLSheetLabelProvider">
+ <propertyCategory category="domain"/>
+ <propertyCategory category="visual"/>
+ <propertyCategory category="extra"/>
+ </propertyContributor>
+ </extension>
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
- <?gmfgen generated="true"?>
- <propertyTabs contributorId="org.eclipse.papyrus.uml.diagram.component">
- <propertyTab
- category="visual"
- id="property.tab.AppearancePropertySection"
- label="%tab.appearance"/>
- <propertyTab
- category="visual"
- id="property.tab.DiagramPropertySection"
- label="%tab.diagram"/>
- <propertyTab
- category="domain"
- id="property.tab.domain"
- label="%tab.domain"/>
- </propertyTabs>
- </extension>
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
+ <?gmfgen generated="true"?>
+ <propertyTabs contributorId="org.eclipse.papyrus.uml.diagram.component">
+ <propertyTab
+ category="visual"
+ id="property.tab.AppearancePropertySection"
+ label="%tab.appearance"/>
+ <propertyTab
+ category="visual"
+ id="property.tab.DiagramPropertySection"
+ label="%tab.diagram"/>
+ <propertyTab
+ category="domain"
+ id="property.tab.domain"
+ label="%tab.domain"/>
+ </propertyTabs>
+ </extension>
- <extension point="org.eclipse.ui.views.properties.tabbed.propertySections" id="propsections">
- <?gmfgen generated="true"?>
- <propertySections contributorId="org.eclipse.papyrus.uml.diagram.component">
- <propertySection id="property.section.ConnectorAppearancePropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.ShapeColorAndFontPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.DiagramColorsAndFontsPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.RulerGridPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection"
- tab="property.tab.DiagramPropertySection">
- </propertySection>
- <propertySection
- id="property.section.domain"
- tab="property.tab.domain"
- class="org.eclipse.papyrus.uml.diagram.component.sheet.UMLPropertySection">
- <input type="org.eclipse.gmf.runtime.notation.View"/>
- <input type="org.eclipse.gef.EditPart"/>
- </propertySection>
- </propertySections>
- </extension>
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertySections" id="propsections">
+ <?gmfgen generated="true"?>
+ <propertySections contributorId="org.eclipse.papyrus.uml.diagram.component">
+ <propertySection id="property.section.ConnectorAppearancePropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.ShapeColorAndFontPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.DiagramColorsAndFontsPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.RulerGridPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection"
+ tab="property.tab.DiagramPropertySection">
+ </propertySection>
+ <propertySection
+ id="property.section.domain"
+ tab="property.tab.domain"
+ class="org.eclipse.papyrus.uml.diagram.component.sheet.UMLPropertySection">
+ <input type="org.eclipse.gmf.runtime.notation.View"/>
+ <input type="org.eclipse.gef.EditPart"/>
+ </propertySection>
+ </propertySections>
+ </extension>
- <extension point="org.eclipse.core.runtime.preferences" id="prefs">
- <?gmfgen generated="true"?>
- <initializer class="org.eclipse.papyrus.uml.diagram.component.preferences.DiagramPreferenceInitializer"/>
- </extension>
+ <extension point="org.eclipse.core.runtime.preferences" id="prefs">
+ <?gmfgen generated="true"?>
+ <initializer class="org.eclipse.papyrus.uml.diagram.component.preferences.DiagramPreferenceInitializer"/>
+ </extension>
- <extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
- <?gmfgen generated="true"?>
- <viewProvider class="org.eclipse.papyrus.uml.diagram.component.providers.UMLViewProvider">
- <Priority name="Lowest"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLComponentDiagram"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="3203,2002,3202,3200,3205,3201,3199,3204,2003,3069,3077,3076,3078,3070,3071,3074,3075,1,5,6,3072,3079"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4001,4006,4003,4012,4014,4007,4013,4016,4015,4009,4010,4017,4018,4019"/>
- </viewProvider>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
+ <?gmfgen generated="true"?>
+ <viewProvider class="org.eclipse.papyrus.uml.diagram.component.providers.UMLViewProvider">
+ <Priority name="Lowest"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLComponentDiagram"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="3203,2002,3202,3200,3205,3201,3199,3204,2003,3069,3077,3076,3078,3070,3071,3074,3075,1,5,6,3072,3079"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4001,4006,4003,4012,4014,4007,4013,4016,4015,4009,4010,4017,4018,4019"/>
+ </viewProvider>
+ </extension>
- <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
- <?gmfgen generated="true"?>
- <editpartProvider class="org.eclipse.papyrus.uml.diagram.component.providers.UMLEditPartProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
- <method name="getType()" value="PapyrusUMLComponentDiagram"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
- <method name="getType()" value="3203,2002,3202,3200,3205,3201,3199,3204,2003,3069,3077,3076,3078,3070,3071,3074,3075,1,5,6,3072,3079"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
- <method name="getType()" value="4001,4006,4003,4012,4014,4007,4013,4016,4015,4009,4010,4017,4018,4019"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
- <method name="getType()" value="5008,5004,5262,5254,5266,5255,5252,5253,5265,5005,5006,5007,5264,5261,5267,5256,5257,5258,5259,5260,0,5268"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
- <method name="getType()" value="7001,7006,7002,7007,7005,7003,7004,7008,7009,7010,7011"/>
- </object>
- <context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
- </editpartProvider>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
+ <?gmfgen generated="true"?>
+ <editpartProvider class="org.eclipse.papyrus.uml.diagram.component.providers.UMLEditPartProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
+ <method name="getType()" value="PapyrusUMLComponentDiagram"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
+ <method name="getType()" value="3203,2002,3202,3200,3205,3201,3199,3204,2003,3069,3077,3076,3078,3070,3071,3074,3075,1,5,6,3072,3079"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
+ <method name="getType()" value="4001,4006,4003,4012,4014,4007,4013,4016,4015,4009,4010,4017,4018,4019"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
+ <method name="getType()" value="5008,6029,5004,6030,5262,5254,5266,6031,5255,5252,5253,5265,5005,6032,5006,5007,5264,5261,5267,6033,5256,6026,5257,6027,5258,5259,5260,0,6028,5268"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
+ <method name="getType()" value="7001,7006,7002,7007,7005,7003,7004,7008,7009,7010,7011"/>
+ </object>
+ <context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
+ </editpartProvider>
+ </extension>
- <extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
- <?gmfgen generated="true"?>
- <IconProvider class="org.eclipse.papyrus.uml.diagram.component.providers.UMLIconProvider">
- <Priority name="Low"/>
- </IconProvider>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
+ <?gmfgen generated="true"?>
+ <IconProvider class="org.eclipse.papyrus.uml.diagram.component.providers.UMLIconProvider">
+ <Priority name="Low"/>
+ </IconProvider>
+ </extension>
- <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
- <?gmfgen generated="true"?>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Model_1000"
- name="%metatype.name.Package_1000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Package"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ModelEditHelper">
- <param name="semanticHint" value="1000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.DependencyNode_3203"
- name="%metatype.name.Dependency_3203"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Dependency"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.DependencyEditHelper">
- <param name="semanticHint" value="3203"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Component_2002"
- name="%metatype.name.Component_2002"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Component"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ComponentEditHelper">
- <param name="semanticHint" value="2002"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Model_3202"
- name="%metatype.name.Model_3202"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Model"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ModelEditHelper">
- <param name="semanticHint" value="3202"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Package_3200"
- name="%metatype.name.Package_3200"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Package"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.PackageEditHelper">
- <param name="semanticHint" value="3200"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Interface_3205"
- name="%metatype.name.Interface_3205"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Interface"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.InterfaceEditHelper">
- <param name="semanticHint" value="3205"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Comment_3201"
- name="%metatype.name.Comment_3201"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Comment"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.CommentEditHelper">
- <param name="semanticHint" value="3201"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Comment_3199"
- name="%metatype.name.Constraint_3199"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Constraint"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ConstraintEditHelper">
- <param name="semanticHint" value="3199"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.DefaultNamedElement_3204"
- name="%metatype.name.NamedElement_3204"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="NamedElement"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.DefaultNamedElementEditHelper">
- <param name="semanticHint" value="3204"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Interface_2003"
- name="%metatype.name.Interface_2003"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Interface"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.InterfaceEditHelper">
- <param name="semanticHint" value="2003"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Port_3069"
- name="%metatype.name.Port_3069"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Port"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.PortEditHelper">
- <param name="semanticHint" value="3069"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Model_3077"
- name="%metatype.name.Model_3077"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Model"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ModelEditHelper">
- <param name="semanticHint" value="3077"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Package_3076"
- name="%metatype.name.Package_3076"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Package"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.PackageEditHelper">
- <param name="semanticHint" value="3076"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Interface_3078"
- name="%metatype.name.Interface_3078"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Interface"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.InterfaceEditHelper">
- <param name="semanticHint" value="3078"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.component.Component_3070"
- name="%metatype.name.Component_3070"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.component.Component_2002"/>
- <param name="semanticHint" value="3070"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.component.Component_3071"
- name="%metatype.name.Component_3071"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.component.Component_2002"/>
- <param name="semanticHint" value="3071"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.component.Comment_3074"
- name="%metatype.name.Comment_3074"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.component.Comment_3201"/>
- <param name="semanticHint" value="3074"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.component.Constraint_3075"
- name="%metatype.name.Constraint_3075"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.component.Comment_3199"/>
- <param name="semanticHint" value="3075"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Property_1"
- name="%metatype.name.Property_1"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Property"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.PropertyEditHelper">
- <param name="semanticHint" value="1"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Operation_5"
- name="%metatype.name.Operation_5"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Operation"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.OperationEditHelper">
- <param name="semanticHint" value="5"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Reception_6"
- name="%metatype.name.Reception_6"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Reception"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ReceptionEditHelper">
- <param name="semanticHint" value="6"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.component.Interface_3072"
- name="%metatype.name.Interface_3072"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.component.Interface_2003"/>
- <param name="semanticHint" value="3072"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Property_3079"
- name="%metatype.name.Property_3079"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Property"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.PropertyEditHelper">
- <param name="semanticHint" value="3079"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Usage_4001"
- name="%metatype.name.Usage_4001"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Usage"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.UsageEditHelper">
- <param name="semanticHint" value="4001"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.InterfaceRealization_4006"
- name="%metatype.name.InterfaceRealization_4006"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="InterfaceRealization"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.InterfaceRealizationEditHelper">
- <param name="semanticHint" value="4006"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Generalization_4003"
- name="%metatype.name.Generalization_4003"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Generalization"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.GeneralizationEditHelper">
- <param name="semanticHint" value="4003"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Substitution_4012"
- name="%metatype.name.Substitution_4012"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Substitution"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.SubstitutionEditHelper">
- <param name="semanticHint" value="4012"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Manifestation_4014"
- name="%metatype.name.Manifestation_4014"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Manifestation"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ManifestationEditHelper">
- <param name="semanticHint" value="4014"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.ComponentRealization_4007"
- name="%metatype.name.ComponentRealization_4007"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ComponentRealization"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ComponentRealizationEditHelper">
- <param name="semanticHint" value="4007"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Abstraction_4013"
- name="%metatype.name.Abstraction_4013"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Abstraction"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.AbstractionEditHelper">
- <param name="semanticHint" value="4013"/>
- </metamodelType>
- </metamodel>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.component.Link_4016"
- name="%metatype.name.Link_4016"
- kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4016"/>
- </specializationType>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.component.CommentAnnotatedElement_4008"
- name="%metatype.name.CommentAnnotatedElement_4015"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4015"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.component.ConstraintConstrainedElement_4009"
- name="%metatype.name.ConstraintConstrainedElement_4009"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4009"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.component.Dependency_4010"
- name="%metatype.name.Dependency_4010"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.component.DependencyNode_3203"/>
- <param name="semanticHint" value="4010"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.component.Dependency_4017"
- name="%metatype.name.Dependency_4017"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- edithelperadvice="org.eclipse.papyrus.uml.diagram.component.edit.helpers.DependencyBranchLink">
- <specializes id="org.eclipse.papyrus.uml.diagram.component.DependencyNode_3203"/>
- <param name="semanticHint" value="4017"/>
- </specializationType>
- </metamodel>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.component.Link_4018"
- name="%metatype.name.Link_4018"
- kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4018"/>
- </specializationType>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.component.Connector_4019"
- name="%metatype.name.Connector_4019"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Connector"
- edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ConnectorEditHelper">
- <param name="semanticHint" value="4019"/>
- </metamodelType>
- </metamodel>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
+ <?gmfgen generated="true"?>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Model_1000"
+ name="%metatype.name.Package_1000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Package"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ModelEditHelper">
+ <param name="semanticHint" value="1000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.DependencyNode_3203"
+ name="%metatype.name.Dependency_3203"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Dependency"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.DependencyEditHelper">
+ <param name="semanticHint" value="3203"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Component_2002"
+ name="%metatype.name.Component_2002"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Component"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ComponentEditHelper">
+ <param name="semanticHint" value="2002"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Model_3202"
+ name="%metatype.name.Model_3202"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Model"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ModelEditHelper">
+ <param name="semanticHint" value="3202"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Package_3200"
+ name="%metatype.name.Package_3200"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Package"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.PackageEditHelper">
+ <param name="semanticHint" value="3200"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Interface_3205"
+ name="%metatype.name.Interface_3205"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Interface"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.InterfaceEditHelper">
+ <param name="semanticHint" value="3205"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Comment_3201"
+ name="%metatype.name.Comment_3201"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Comment"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.CommentEditHelper">
+ <param name="semanticHint" value="3201"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Comment_3199"
+ name="%metatype.name.Constraint_3199"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Constraint"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ConstraintEditHelper">
+ <param name="semanticHint" value="3199"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.DefaultNamedElement_3204"
+ name="%metatype.name.NamedElement_3204"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="NamedElement"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.DefaultNamedElementEditHelper">
+ <param name="semanticHint" value="3204"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Interface_2003"
+ name="%metatype.name.Interface_2003"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Interface"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.InterfaceEditHelper">
+ <param name="semanticHint" value="2003"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Port_3069"
+ name="%metatype.name.Port_3069"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Port"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.PortEditHelper">
+ <param name="semanticHint" value="3069"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Model_3077"
+ name="%metatype.name.Model_3077"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Model"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ModelEditHelper">
+ <param name="semanticHint" value="3077"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Package_3076"
+ name="%metatype.name.Package_3076"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Package"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.PackageEditHelper">
+ <param name="semanticHint" value="3076"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Interface_3078"
+ name="%metatype.name.Interface_3078"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Interface"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.InterfaceEditHelper">
+ <param name="semanticHint" value="3078"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.component.Component_3070"
+ name="%metatype.name.Component_3070"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.component.Component_2002"/>
+ <param name="semanticHint" value="3070"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.component.Component_3071"
+ name="%metatype.name.Component_3071"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.component.Component_2002"/>
+ <param name="semanticHint" value="3071"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.component.Comment_3074"
+ name="%metatype.name.Comment_3074"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.component.Comment_3201"/>
+ <param name="semanticHint" value="3074"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.component.Constraint_3075"
+ name="%metatype.name.Constraint_3075"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.component.Comment_3199"/>
+ <param name="semanticHint" value="3075"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Property_1"
+ name="%metatype.name.Property_1"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Property"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.PropertyEditHelper">
+ <param name="semanticHint" value="1"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Operation_5"
+ name="%metatype.name.Operation_5"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Operation"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.OperationEditHelper">
+ <param name="semanticHint" value="5"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Reception_6"
+ name="%metatype.name.Reception_6"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Reception"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ReceptionEditHelper">
+ <param name="semanticHint" value="6"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.component.Interface_3072"
+ name="%metatype.name.Interface_3072"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.component.Interface_2003"/>
+ <param name="semanticHint" value="3072"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Property_3079"
+ name="%metatype.name.Property_3079"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Property"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.PropertyEditHelper">
+ <param name="semanticHint" value="3079"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Usage_4001"
+ name="%metatype.name.Usage_4001"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Usage"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.UsageEditHelper">
+ <param name="semanticHint" value="4001"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.InterfaceRealization_4006"
+ name="%metatype.name.InterfaceRealization_4006"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="InterfaceRealization"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.InterfaceRealizationEditHelper">
+ <param name="semanticHint" value="4006"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Generalization_4003"
+ name="%metatype.name.Generalization_4003"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Generalization"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.GeneralizationEditHelper">
+ <param name="semanticHint" value="4003"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Substitution_4012"
+ name="%metatype.name.Substitution_4012"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Substitution"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.SubstitutionEditHelper">
+ <param name="semanticHint" value="4012"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Manifestation_4014"
+ name="%metatype.name.Manifestation_4014"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Manifestation"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ManifestationEditHelper">
+ <param name="semanticHint" value="4014"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.ComponentRealization_4007"
+ name="%metatype.name.ComponentRealization_4007"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="ComponentRealization"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ComponentRealizationEditHelper">
+ <param name="semanticHint" value="4007"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Abstraction_4013"
+ name="%metatype.name.Abstraction_4013"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Abstraction"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.AbstractionEditHelper">
+ <param name="semanticHint" value="4013"/>
+ </metamodelType>
+ </metamodel>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.component.Link_4016"
+ name="%metatype.name.Link_4016"
+ kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4016"/>
+ </specializationType>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.component.CommentAnnotatedElement_4008"
+ name="%metatype.name.CommentAnnotatedElement_4015"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4015"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.component.ConstraintConstrainedElement_4009"
+ name="%metatype.name.ConstraintConstrainedElement_4009"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4009"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.component.Dependency_4010"
+ name="%metatype.name.Dependency_4010"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.component.DependencyNode_3203"/>
+ <param name="semanticHint" value="4010"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.component.Dependency_4017"
+ name="%metatype.name.Dependency_4017"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ edithelperadvice="org.eclipse.papyrus.uml.diagram.component.edit.helpers.DependencyBranchLink">
+ <specializes id="org.eclipse.papyrus.uml.diagram.component.DependencyNode_3203"/>
+ <param name="semanticHint" value="4017"/>
+ </specializationType>
+ </metamodel>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.component.Link_4018"
+ name="%metatype.name.Link_4018"
+ kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4018"/>
+ </specializationType>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.component.Connector_4019"
+ name="%metatype.name.Connector_4019"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Connector"
+ edithelper="org.eclipse.papyrus.uml.diagram.component.edit.helpers.ConnectorEditHelper">
+ <param name="semanticHint" value="4019"/>
+ </metamodelType>
+ </metamodel>
+ </extension>
- <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
- <?gmfgen generated="true"?>
- <clientContext id="org.eclipse.papyrus.uml.diagram.component.TypeContext">
- <enablement>
- <test
- property="org.eclipse.gmf.runtime.emf.core.editingDomain"
- value="org.eclipse.papyrus.uml.diagram.component.EditingDomain"/>
- </enablement>
- </clientContext>
- <binding context="org.eclipse.papyrus.uml.diagram.component.TypeContext">
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Model_1000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.DependencyNode_3203"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Component_2002"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Model_3202"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Package_3200"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Interface_3205"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Comment_3201"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Comment_3199"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.DefaultNamedElement_3204"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Interface_2003"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Port_3069"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Model_3077"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Package_3076"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Interface_3078"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Component_3070"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Component_3071"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Comment_3074"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Constraint_3075"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Property_1"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Operation_5"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Reception_6"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Interface_3072"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Property_3079"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Usage_4001"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.InterfaceRealization_4006"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Generalization_4003"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Substitution_4012"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Manifestation_4014"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.ComponentRealization_4007"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Abstraction_4013"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Link_4016"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.CommentAnnotatedElement_4008"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.ConstraintConstrainedElement_4009"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Dependency_4010"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Dependency_4017"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Link_4018"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.component.Connector_4019"/>
- <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
- </binding>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
+ <?gmfgen generated="true"?>
+ <clientContext id="org.eclipse.papyrus.uml.diagram.component.TypeContext">
+ <enablement>
+ <test
+ property="org.eclipse.gmf.runtime.emf.core.editingDomain"
+ value="org.eclipse.papyrus.uml.diagram.component.EditingDomain"/>
+ </enablement>
+ </clientContext>
+ <binding context="org.eclipse.papyrus.uml.diagram.component.TypeContext">
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Model_1000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.DependencyNode_3203"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Component_2002"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Model_3202"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Package_3200"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Interface_3205"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Comment_3201"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Comment_3199"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.DefaultNamedElement_3204"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Interface_2003"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Port_3069"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Model_3077"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Package_3076"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Interface_3078"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Component_3070"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Component_3071"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Comment_3074"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Constraint_3075"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Property_1"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Operation_5"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Reception_6"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Interface_3072"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Property_3079"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Usage_4001"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.InterfaceRealization_4006"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Generalization_4003"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Substitution_4012"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Manifestation_4014"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.ComponentRealization_4007"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Abstraction_4013"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Link_4016"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.CommentAnnotatedElement_4008"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.ConstraintConstrainedElement_4009"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Dependency_4010"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Dependency_4017"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Link_4018"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.component.Connector_4019"/>
+ <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
+ </binding>
+ </extension>
- <extension point="org.eclipse.ui.menus" id="context-menus">
- <?gmfgen generated="true"?>
- <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
- </menuContribution>
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
- </menuContribution -->
- <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
- <command commandId="org.eclipse.papyrus.uml.diagram.component.LoadResourceAction">
- <visibleWhen>
- <and>
- <with variable="activePartId"><equals value="org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramEditorID"/></with>
- <with variable="selection"><iterate ifEmpty="false">
- <instanceof value="org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentDiagramEditPart"/>
- </iterate></with>
- </and>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
+ <extension point="org.eclipse.ui.menus" id="context-menus">
+ <?gmfgen generated="true"?>
+ <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
+ </menuContribution>
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
+ </menuContribution -->
+ <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
+ <command commandId="org.eclipse.papyrus.uml.diagram.component.LoadResourceAction">
+ <visibleWhen>
+ <and>
+ <with variable="activePartId"><equals value="org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramEditorID"/></with>
+ <with variable="selection"><iterate ifEmpty="false">
+ <instanceof value="org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentDiagramEditPart"/>
+ </iterate></with>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
- <extension point="org.eclipse.ui.commands" id="menu-commands">
- <?gmfgen generated="true"?>
- <category id="org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
- <command id="org.eclipse.papyrus.uml.diagram.component.LoadResourceAction"
- name="Load Resource"
- categoryId="org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramEditorID"
- defaultHandler="org.eclipse.papyrus.uml.diagram.component.part.LoadResourceAction"/>
- </extension>
+ <extension point="org.eclipse.ui.commands" id="menu-commands">
+ <?gmfgen generated="true"?>
+ <category id="org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
+ <command id="org.eclipse.papyrus.uml.diagram.component.LoadResourceAction"
+ name="Load Resource"
+ categoryId="org.eclipse.papyrus.uml.diagram.component.part.UMLDiagramEditorID"
+ defaultHandler="org.eclipse.papyrus.uml.diagram.component.part.LoadResourceAction"/>
+ </extension>
- <extension point="org.eclipse.ui.handlers" id="menu-handlers">
- <?gmfgen generated="true"?>
- </extension>
+ <extension point="org.eclipse.ui.handlers" id="menu-handlers">
+ <?gmfgen generated="true"?>
+ </extension>
@@ -741,395 +741,395 @@
-<extension
- id="Papyrus Component Diagram .palettedefinition"
- name="Papyrus Component Diagram Predefined Entries"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Lowest"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.component.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
-
- <entry
- defineOnly="true"
- description="Create a Constraint"
- id="component.tool.constraint"
- kind="tool"
- label="Constraint"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Comment"
- id="component.tool.comment"
- kind="tool"
- label="Comment"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Component"
- id="component.tool.component"
- kind="tool"
- label="Component"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an Interface"
- id="component.tool.interface"
- kind="tool"
- label="Interface"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a model"
- id="component.tool.model"
- kind="tool"
- label="Model"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Property"
- id="component.tool.property"
- kind="tool"
- label="Property"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an Operation"
- id="component.tool.operation"
- kind="tool"
- label="Operation"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Package"
- id="component.tool.package"
- kind="tool"
- label="Package"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Port"
- id="component.tool.port"
- kind="tool"
- label="Port"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Reception"
- id="component.tool.reception"
- kind="tool"
- label="Reception"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Link (Comment / Constraint)"
- id="component.tool.link"
- kind="tool"
- label="Link"
- large_icon="icons/obj16/Link.gif"
- path=""
- small_icon="icons/obj16/Link.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Connector"
- id="component.tool.connector"
- kind="tool"
- label="Connector"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Dependency"
- id="component.tool.dependency"
- kind="tool"
- label="Dependency"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a dependency branch"
- id="component.tool.dependencybranch"
- kind="tool"
- label="DependencyBranch"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an Abstraction"
- id="component.tool.abstraction"
- kind="tool"
- label="Abstraction"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Manifestation"
- id="component.tool.manifestation"
- kind="tool"
- label="Manifestation"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Manifestation.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Manifestation.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Generalization link"
- id="component.tool.generalization"
- kind="tool"
- label="Generalization"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an Usage"
- id="component.tool.usage"
- kind="tool"
- label="Usage"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Substitution"
- id="component.tool.substitution"
- kind="tool"
- label="Substitution"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Substitution.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Substitution.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create an Interface Realization"
- id="component.tool.interfaceRealization"
- kind="tool"
- label="Interface Realization"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Component Realization"
- id="component.tool.componentRealization"
- kind="tool"
- label="Component Realization"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ComponentRealization.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ComponentRealization.gif">
- </entry>
-
- </contribution>
- </paletteProvider>
-
- </extension>
+<extension
+ id="Papyrus Component Diagram .palettedefinition"
+ name="Papyrus Component Diagram Predefined Entries"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Lowest"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.component.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+
+ <entry
+ defineOnly="true"
+ description="Create a Constraint"
+ id="component.tool.constraint"
+ kind="tool"
+ label="Constraint"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Comment"
+ id="component.tool.comment"
+ kind="tool"
+ label="Comment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Component"
+ id="component.tool.component"
+ kind="tool"
+ label="Component"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an Interface"
+ id="component.tool.interface"
+ kind="tool"
+ label="Interface"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a model"
+ id="component.tool.model"
+ kind="tool"
+ label="Model"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Property"
+ id="component.tool.property"
+ kind="tool"
+ label="Property"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an Operation"
+ id="component.tool.operation"
+ kind="tool"
+ label="Operation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Package"
+ id="component.tool.package"
+ kind="tool"
+ label="Package"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Port"
+ id="component.tool.port"
+ kind="tool"
+ label="Port"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Reception"
+ id="component.tool.reception"
+ kind="tool"
+ label="Reception"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Reception.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Link (Comment / Constraint)"
+ id="component.tool.link"
+ kind="tool"
+ label="Link"
+ large_icon="icons/obj16/Link.gif"
+ path=""
+ small_icon="icons/obj16/Link.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Connector"
+ id="component.tool.connector"
+ kind="tool"
+ label="Connector"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Dependency"
+ id="component.tool.dependency"
+ kind="tool"
+ label="Dependency"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a dependency branch"
+ id="component.tool.dependencybranch"
+ kind="tool"
+ label="DependencyBranch"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an Abstraction"
+ id="component.tool.abstraction"
+ kind="tool"
+ label="Abstraction"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Manifestation"
+ id="component.tool.manifestation"
+ kind="tool"
+ label="Manifestation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Manifestation.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Manifestation.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Generalization link"
+ id="component.tool.generalization"
+ kind="tool"
+ label="Generalization"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an Usage"
+ id="component.tool.usage"
+ kind="tool"
+ label="Usage"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Substitution"
+ id="component.tool.substitution"
+ kind="tool"
+ label="Substitution"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Substitution.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Substitution.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create an Interface Realization"
+ id="component.tool.interfaceRealization"
+ kind="tool"
+ label="Interface Realization"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/InterfaceRealization.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Component Realization"
+ id="component.tool.componentRealization"
+ kind="tool"
+ label="Component Realization"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ComponentRealization.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ComponentRealization.gif">
+ </entry>
+
+ </contribution>
+ </paletteProvider>
+
+ </extension>
-<extension
- id="Papyrus Component Diagram .standard"
- name="Papyrus Component Diagram Standard Palette"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Low"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.component.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
-
- <entry
- description="Diagram Nodes"
- id="component.group.nodes"
- kind="drawer"
- label="Nodes"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
- <predefinedEntry
- id="component.tool.constraint"
- path="/component.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.comment"
- path="/component.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.component"
- path="/component.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.interface"
- path="/component.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.model"
- path="/component.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.property"
- path="/component.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.operation"
- path="/component.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.package"
- path="/component.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.port"
- path="/component.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.reception"
- path="/component.group.nodes">
- </predefinedEntry>
- <entry
- description="Diagram Links"
- id="component.group.links"
- kind="drawer"
- label="Links"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
- <predefinedEntry
- id="component.tool.link"
- path="/component.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.connector"
- path="/component.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.dependency"
- path="/component.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.dependencybranch"
- path="/component.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.abstraction"
- path="/component.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.manifestation"
- path="/component.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.generalization"
- path="/component.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.usage"
- path="/component.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.substitution"
- path="/component.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.interfaceRealization"
- path="/component.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="component.tool.componentRealization"
- path="/component.group.links">
- </predefinedEntry>
- </contribution>
- <editor id="org.eclipse.papyrus.uml.diagram.component"/>
- </paletteProvider>
-
-</extension>
+<extension
+ id="Papyrus Component Diagram .standard"
+ name="Papyrus Component Diagram Standard Palette"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Low"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.component.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+
+ <entry
+ description="Diagram Nodes"
+ id="component.group.nodes"
+ kind="drawer"
+ label="Nodes"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="component.tool.constraint"
+ path="/component.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.comment"
+ path="/component.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.component"
+ path="/component.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.interface"
+ path="/component.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.model"
+ path="/component.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.property"
+ path="/component.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.operation"
+ path="/component.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.package"
+ path="/component.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.port"
+ path="/component.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.reception"
+ path="/component.group.nodes">
+ </predefinedEntry>
+ <entry
+ description="Diagram Links"
+ id="component.group.links"
+ kind="drawer"
+ label="Links"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="component.tool.link"
+ path="/component.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.connector"
+ path="/component.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.dependency"
+ path="/component.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.dependencybranch"
+ path="/component.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.abstraction"
+ path="/component.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.manifestation"
+ path="/component.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.generalization"
+ path="/component.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.usage"
+ path="/component.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.substitution"
+ path="/component.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.interfaceRealization"
+ path="/component.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="component.tool.componentRealization"
+ path="/component.group.links">
+ </predefinedEntry>
+ </contribution>
+ <editor id="org.eclipse.papyrus.uml.diagram.component"/>
+ </paletteProvider>
+
+</extension>
-<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
- <?gmfgen generated="true"?>
- <ParserProvider class="org.eclipse.papyrus.uml.diagram.component.providers.UMLParserProvider">
- <Priority name="Lowest"/>
- </ParserProvider>
- </extension>
+<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
+ <?gmfgen generated="true"?>
+ <ParserProvider class="org.eclipse.papyrus.uml.diagram.component.providers.UMLParserProvider">
+ <Priority name="Lowest"/>
+ </ParserProvider>
+ </extension>
<!-- optionally, specify keybindings -->
-<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
- <?gmfgen generated="true"?>
- <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.component.providers.UMLMarkerNavigationProvider">
- <MarkerType name="org.eclipse.papyrus.uml.diagram.component.diagnostic"/>
- <Priority name="Lowest"/>
- </MarkerNavigationProvider>
- </extension>
+<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
+ <?gmfgen generated="true"?>
+ <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.component.providers.UMLMarkerNavigationProvider">
+ <MarkerType name="org.eclipse.papyrus.uml.diagram.component.diagnostic"/>
+ <Priority name="Lowest"/>
+ </MarkerNavigationProvider>
+ </extension>
-<extension id="diagnostic" name="Papyrus Component Diagram problems" point="org.eclipse.core.resources.markers">
- <?gmfgen generated="true"?>
- <super type="org.eclipse.core.resources.problemmarker"/>
- <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
- <persistent value="true"/>
- </extension><extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
- <?gmfgen generated="true"?>
- <decoratorProvider class="org.eclipse.papyrus.uml.diagram.component.providers.UMLValidationDecoratorProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
- <context decoratorTargets="PRIMARY_VIEW"/>
- </decoratorProvider>
- </extension>
+<extension id="diagnostic" name="Papyrus Component Diagram problems" point="org.eclipse.core.resources.markers">
+ <?gmfgen generated="true"?>
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
+ <persistent value="true"/>
+ </extension><extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
+ <?gmfgen generated="true"?>
+ <decoratorProvider class="org.eclipse.papyrus.uml.diagram.component.providers.UMLValidationDecoratorProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
+ <context decoratorTargets="PRIMARY_VIEW"/>
+ </decoratorProvider>
+ </extension>
<extension
point="org.eclipse.ui.commands">
<command
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/AbstractionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/AbstractionCreateCommand.java
index 714374aa449..c86879d9526 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/AbstractionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/AbstractionCreateCommand.java
@@ -109,7 +109,8 @@ public class AbstractionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Abstraction newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Abstraction newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommand.java
index 5755d69c9da..7540d2498a4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommand.java
@@ -114,7 +114,8 @@ public class ComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Component newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Component newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandCN.java
index b7473c8a810..9a427977230 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandCN.java
@@ -113,7 +113,8 @@ public class ComponentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Component newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Component newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandPCN.java
index 4462603de49..53a2945ea9c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandPCN.java
@@ -114,7 +114,8 @@ public class ComponentCreateCommandPCN extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Component newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Component newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentRealizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentRealizationCreateCommand.java
index c5d070a162e..76cfc87523d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentRealizationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentRealizationCreateCommand.java
@@ -109,7 +109,8 @@ public class ComponentRealizationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(ComponentRealization newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(ComponentRealization newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorCreateCommand.java
index c78ee724519..dab86a45a5a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConnectorCreateCommand.java
@@ -109,7 +109,8 @@ public class ConnectorCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Connector newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Connector newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommand.java
index 9d96a603283..a33dcd6a7de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommand.java
@@ -114,7 +114,8 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Constraint newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Constraint newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommandPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommandPCN.java
index 501d4f05860..9c2ed818a5d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommandPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommandPCN.java
@@ -114,7 +114,8 @@ public class ConstraintCreateCommandPCN extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Constraint newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Constraint newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DefaultNamedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DefaultNamedElementCreateCommand.java
index 731766637c5..e40aad4d05a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DefaultNamedElementCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DefaultNamedElementCreateCommand.java
@@ -85,7 +85,8 @@ public class DefaultNamedElementCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(NamedElement newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(NamedElement newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyBranchCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyBranchCreateCommand.java
index 89628fcaa2d..df581606271 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyBranchCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyBranchCreateCommand.java
@@ -109,7 +109,8 @@ public class DependencyBranchCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Dependency newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Dependency newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyCreateCommand.java
index 25b21e52771..8fb655d6a53 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyCreateCommand.java
@@ -109,7 +109,8 @@ public class DependencyCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Dependency newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Dependency newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyNodeCreateCommand.java
index bf96f1d077a..63bd52b33d5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyNodeCreateCommand.java
@@ -112,7 +112,8 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Dependency newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Dependency newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/GeneralizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/GeneralizationCreateCommand.java
index 3cb2d2877ba..8398ae31adf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/GeneralizationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/GeneralizationCreateCommand.java
@@ -108,7 +108,8 @@ public class GeneralizationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Generalization newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Generalization newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommand.java
index 43eb4ba6b86..e648066c15b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommand.java
@@ -114,7 +114,8 @@ public class InterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Interface newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Interface newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommandPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommandPCN.java
index f15973419f1..4ca0835d18a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommandPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommandPCN.java
@@ -114,7 +114,8 @@ public class InterfaceCreateCommandPCN extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Interface newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Interface newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceRealizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceRealizationCreateCommand.java
index 3eba4211ca5..902664627e8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceRealizationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceRealizationCreateCommand.java
@@ -111,7 +111,8 @@ public class InterfaceRealizationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(InterfaceRealization newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(InterfaceRealization newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ManifestationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ManifestationCreateCommand.java
index 12963037cf6..8d822dc7a76 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ManifestationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ManifestationCreateCommand.java
@@ -109,7 +109,8 @@ public class ManifestationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Manifestation newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Manifestation newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/OperationForInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/OperationForInterfaceCreateCommand.java
index ce860519451..f8597517e23 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/OperationForInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/OperationForInterfaceCreateCommand.java
@@ -114,7 +114,8 @@ public class OperationForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Operation newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Operation newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyCreateCommand.java
index 8a4e3a82a28..404e4a0475b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyCreateCommand.java
@@ -114,7 +114,8 @@ public class PropertyCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Property newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Property newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyForInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyForInterfaceCreateCommand.java
index e7f81f97d2d..3d92257ae90 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyForInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyForInterfaceCreateCommand.java
@@ -114,7 +114,8 @@ public class PropertyForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Property newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Property newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ReceptionInInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ReceptionInInterfaceCreateCommand.java
index 282f0c1fa5a..48d196fbd29 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ReceptionInInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ReceptionInInterfaceCreateCommand.java
@@ -114,7 +114,8 @@ public class ReceptionInInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Reception newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Reception newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/RectangleInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/RectangleInterfaceCreateCommand.java
index 7a032dab577..bc00c31d6a2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/RectangleInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/RectangleInterfaceCreateCommand.java
@@ -114,7 +114,8 @@ public class RectangleInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Interface newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Interface newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/SubstitutionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/SubstitutionCreateCommand.java
index 2e17ef1fed8..fe4f56fa038 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/SubstitutionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/SubstitutionCreateCommand.java
@@ -109,7 +109,8 @@ public class SubstitutionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(Substitution newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ protected void doConfigure(Substitution newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionAppliedStereotypeEditPart.java
index 2402a7b327d..125810fa69b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionAppliedStereotypeEditPart.java
@@ -1,828 +1,831 @@
-/**
- * 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.component.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.component.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.component.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 AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6021;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 30));
- }
-
- /**
- * @generated
- */
- public AbstractionAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.component.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6021;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 30));
+ }
+
+ /**
+ * @generated
+ */
+ public AbstractionAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionNameEditPart.java
index 6d3f27654cd..c6bbe177ae5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/AbstractionNameEditPart.java
@@ -1,828 +1,831 @@
-/**
- * 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.component.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.component.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.component.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 AbstractionNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6007;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionNameEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public AbstractionNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.component.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 AbstractionNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6007;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionNameEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public AbstractionNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentBodyEditPart.java
index f1bd5a509d3..5dc374333f4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentBodyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentBodyEditPart.java
@@ -81,7 +81,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -847,7 +848,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentBodyEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentBodyEditPartPCN.java
index 78d8e021298..d08234236bb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentBodyEditPartPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentBodyEditPartPCN.java
@@ -81,7 +81,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class CommentBodyEditPartPCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class CommentBodyEditPartPCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -847,7 +848,7 @@ public class CommentBodyEditPartPCN extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentEditPart.java
index b96cb18628d..1d38121a3b3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentEditPart.java
@@ -23,11 +23,11 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.editpolicies.PapyrusReflowableShapeEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -197,7 +197,7 @@ public class CommentEditPart extends AbstractCommentEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentEditPartPCN.java
index bd6ac432dc1..8377ebd406c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentEditPartPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/CommentEditPartPCN.java
@@ -23,11 +23,11 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.editpolicies.PapyrusReflowableShapeEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -197,7 +197,7 @@ public class CommentEditPartPCN extends AbstractCommentEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPart.java
index 5ee72975d91..7fffa5e511f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPart.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditP
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.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
@@ -69,11 +70,12 @@ public class ComponentCompositeCompartmentEditPart extends ShapeCompartmentEditP
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCompositeCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCompositeCompartmentCanonicalEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartCN.java
index bec07aec8e2..9254ec9d475 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditP
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.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
@@ -69,11 +70,12 @@ public class ComponentCompositeCompartmentEditPartCN extends ShapeCompartmentEdi
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCompositeCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCompositeCompartmentCanonicalEditPolicyCN());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartPCN.java
index f42f0a0d4c9..14dc0610b71 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartPCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditP
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.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
@@ -69,11 +70,12 @@ public class ComponentCompositeCompartmentEditPartPCN extends ShapeCompartmentEd
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCompositeCompartmentCanonicalEditPolicyPCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCompositeCompartmentCanonicalEditPolicyPCN());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentDiagramEditPart.java
index 2e23250cf7c..740c7bdaca8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentDiagramEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentDiagramEditPart.java
@@ -53,8 +53,8 @@ public class ComponentDiagramEditPart extends PapyrusDiagramEditPart {
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentDiagramItemSemanticEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ModelCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ModelCanonicalEditPolicy());
installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPart.java
index 38ed7c4dfaa..fc0bfb9ec6f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPart.java
@@ -11,28 +11,37 @@
*/
package org.eclipse.papyrus.uml.diagram.component.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -41,11 +50,12 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPo
import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.StructuredClassifierLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.figure.nodes.CompositeFigure;
-import org.eclipse.papyrus.uml.diagram.component.custom.locators.PortPositionLocator;
import org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -53,7 +63,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class ComponentEditPart extends NamedElementEditPart {
+public class ComponentEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -86,8 +96,8 @@ public class ComponentEditPart extends NamedElementEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCanonicalEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -98,6 +108,7 @@ public class ComponentEditPart extends NamedElementEditPart {
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE, new AffixedNodeAlignmentEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -112,6 +123,17 @@ public class ComponentEditPart extends NamedElementEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ComponentFloatingLabelEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
@@ -142,6 +164,19 @@ public class ComponentEditPart extends NamedElementEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -183,7 +218,7 @@ public class ComponentEditPart extends NamedElementEditPart {
- //Papyrus Gencode :Affixed Port locator
+ // Papyrus Gencode :Affixed Port locator
if (childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
@@ -253,8 +288,22 @@ public class ComponentEditPart extends NamedElementEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof ComponentFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 70);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 70);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPartCN.java
index 0090b3bf462..a7ddfc70e7e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPartCN.java
@@ -11,28 +11,37 @@
*/
package org.eclipse.papyrus.uml.diagram.component.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -41,11 +50,12 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPo
import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.StructuredClassifierLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.figure.nodes.CompositeFigure;
-import org.eclipse.papyrus.uml.diagram.component.custom.locators.PortPositionLocator;
import org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -53,7 +63,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class ComponentEditPartCN extends NamedElementEditPart {
+public class ComponentEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
@@ -86,8 +96,8 @@ public class ComponentEditPartCN extends NamedElementEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentItemSemanticEditPolicyCN());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCanonicalEditPolicyCN());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -98,6 +108,7 @@ public class ComponentEditPartCN extends NamedElementEditPart {
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE, new AffixedNodeAlignmentEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -112,6 +123,17 @@ public class ComponentEditPartCN extends NamedElementEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ComponentFloatingLabelEditPartCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
@@ -142,6 +164,19 @@ public class ComponentEditPartCN extends NamedElementEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -183,7 +218,7 @@ public class ComponentEditPartCN extends NamedElementEditPart {
- //Papyrus Gencode :Affixed Port locator
+ // Papyrus Gencode :Affixed Port locator
if (childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
@@ -253,8 +288,22 @@ public class ComponentEditPartCN extends NamedElementEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof ComponentFloatingLabelEditPartCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 70);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 70);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPartPCN.java
index 4d5aa5d7c77..90ec5640ebe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPartPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentEditPartPCN.java
@@ -11,28 +11,37 @@
*/
package org.eclipse.papyrus.uml.diagram.component.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -41,11 +50,12 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPo
import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.StructuredClassifierLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.figure.nodes.CompositeFigure;
-import org.eclipse.papyrus.uml.diagram.component.custom.locators.PortPositionLocator;
import org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentItemSemanticEditPolicyPCN;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -53,7 +63,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class ComponentEditPartPCN extends NamedElementEditPart {
+public class ComponentEditPartPCN extends RoundedCompartmentEditPart {
/**
* @generated
@@ -86,8 +96,8 @@ public class ComponentEditPartPCN extends NamedElementEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentItemSemanticEditPolicyPCN());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCanonicalEditPolicyPCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ComponentCanonicalEditPolicyPCN());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
@@ -98,6 +108,7 @@ public class ComponentEditPartPCN extends NamedElementEditPart {
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE, new AffixedNodeAlignmentEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -112,6 +123,17 @@ public class ComponentEditPartPCN extends NamedElementEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ComponentFloatingLabelEditPartPCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case PortEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
@@ -142,6 +164,19 @@ public class ComponentEditPartPCN extends NamedElementEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -183,7 +218,7 @@ public class ComponentEditPartPCN extends NamedElementEditPart {
- //Papyrus Gencode :Affixed Port locator
+ // Papyrus Gencode :Affixed Port locator
if (childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
@@ -253,8 +288,22 @@ public class ComponentEditPartPCN extends NamedElementEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof ComponentFloatingLabelEditPartPCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 70);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 70);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPart.java
new file mode 100644
index 00000000000..a655aa1263a
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPart.java
@@ -0,0 +1,856 @@
+/**
+ * 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.component.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 ComponentFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart,
+ IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6030;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ComponentFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Component_2002, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPartCN.java
new file mode 100644
index 00000000000..463399258ef
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPartCN.java
@@ -0,0 +1,856 @@
+/**
+ * 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.component.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 ComponentFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart,
+ IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6026;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPartCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ComponentFloatingLabelEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Component_3070, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPartPCN.java
new file mode 100644
index 00000000000..1351f68e034
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentFloatingLabelEditPartPCN.java
@@ -0,0 +1,856 @@
+/**
+ * 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.component.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 ComponentFloatingLabelEditPartPCN extends FloatingLabelEditPart implements ITextAwareEditPart,
+ IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6027;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPartPCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ComponentFloatingLabelEditPartPCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Component_3071, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPartPCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPart.java
index e7b02f4025f..c121d071fbc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPart.java
@@ -85,7 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ComponentNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class ComponentNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -864,7 +865,7 @@ public class ComponentNameEditPart extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPartCN.java
index 7982ce9c084..197404d597d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPartCN.java
@@ -85,7 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ComponentNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class ComponentNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -864,7 +865,7 @@ public class ComponentNameEditPartCN extends PapyrusCompartmentEditPart implemen
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPartPCN.java
index 8a1ce29459c..357109a7a73 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPartPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentNameEditPartPCN.java
@@ -81,7 +81,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ComponentNameEditPartPCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class ComponentNameEditPartPCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -847,7 +848,7 @@ public class ComponentNameEditPartPCN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationAppliedStereotypeEditPart.java
index 0875fb7a26b..4a21601d6e7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationAppliedStereotypeEditPart.java
@@ -1,820 +1,823 @@
-/**
- * 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.component.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.component.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.component.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 ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 30));
- }
-
- /**
- * @generated
- */
- public ComponentRealizationAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.ComponentRealization_4007, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.component.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 4;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 30));
+ }
+
+ /**
+ * @generated
+ */
+ public ComponentRealizationAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.ComponentRealization_4007, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationNameEditPart.java
index 6197911da8c..811e4c9e1bb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentRealizationNameEditPart.java
@@ -1,828 +1,831 @@
-/**
- * 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.component.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.component.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.component.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 ComponentRealizationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationNameEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public ComponentRealizationNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.ComponentRealization_4007, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.component.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 ComponentRealizationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationNameEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public ComponentRealizationNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.ComponentRealization_4007, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentRealizationNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorAppliedStereotypeEditPart.java
index 404fb7a9e2e..ccdc4462ba7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorAppliedStereotypeEditPart.java
@@ -1,828 +1,831 @@
-/**
- * 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.component.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.component.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.component.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 ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6024;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ConnectorAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public ConnectorAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Connector_4019, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ConnectorAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.component.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6024;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ConnectorAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public ConnectorAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Connector_4019, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ConnectorAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorNameEditPart.java
index c1a768651d7..3589e230ac4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConnectorNameEditPart.java
@@ -1,828 +1,831 @@
-/**
- * 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.component.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.component.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.component.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 ConnectorNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6025;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ConnectorNameEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public ConnectorNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Connector_4019, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ConnectorNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.component.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 ConnectorNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6025;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ConnectorNameEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public ConnectorNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Connector_4019, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ConnectorNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintEditPart.java
index 027fc139adf..750252d11a5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintEditPart.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -202,7 +202,7 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintEditPartPCN.java
index adcf37463f5..c57ec138618 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintEditPartPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintEditPartPCN.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -202,7 +202,7 @@ public class ConstraintEditPartPCN extends AbstractConstraintEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintNameEditPart.java
index 69362f54eaf..ad2eecedb26 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintNameEditPart.java
@@ -85,7 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -864,7 +865,7 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintNameEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintNameEditPartPCN.java
index f0f87e9cd78..57df0873596 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintNameEditPartPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintNameEditPartPCN.java
@@ -85,7 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ConstraintNameEditPartPCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class ConstraintNameEditPartPCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -864,7 +865,7 @@ public class ConstraintNameEditPartPCN extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintSpecificationEditPart.java
index d0fa27f18be..d0b4719b6f5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintSpecificationEditPart.java
@@ -85,7 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -864,7 +865,7 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintSpecificationEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintSpecificationEditPartPCN.java
index 3758101316d..bc40e1dd6ba 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintSpecificationEditPartPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ConstraintSpecificationEditPartPCN.java
@@ -85,7 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ConstraintSpecificationEditPartPCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class ConstraintSpecificationEditPartPCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -864,7 +865,7 @@ public class ConstraintSpecificationEditPartPCN extends PapyrusCompartmentEditPa
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DefaultNamedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DefaultNamedElementEditPart.java
index dbf07eaf791..5e62bd4a774 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DefaultNamedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DefaultNamedElementEditPart.java
@@ -22,11 +22,11 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
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;
@@ -188,7 +188,7 @@ public class DefaultNamedElementEditPart extends NodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 50);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DefaultNamedElementNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DefaultNamedElementNameEditPart.java
index 343e0122337..8331d5c01b7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DefaultNamedElementNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DefaultNamedElementNameEditPart.java
@@ -81,7 +81,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class DefaultNamedElementNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class DefaultNamedElementNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -847,7 +848,7 @@ public class DefaultNamedElementNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyAppliedStereotypeEditPart.java
index f5949039246..29ec9758b21 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyAppliedStereotypeEditPart.java
@@ -1,820 +1,823 @@
-/**
- * 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.component.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.component.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.component.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 DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6023;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public DependencyAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.component.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6023;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public DependencyAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyFloatingLabelEditPart.java
new file mode 100644
index 00000000000..c477f883396
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.component.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 DependencyFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6029;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public DependencyFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_3203, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNameEditPart.java
index 72cdf5c336c..04eeedd1065 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNameEditPart.java
@@ -1,828 +1,831 @@
-/**
- * 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.component.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.component.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.component.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 DependencyNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6009;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNameEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public DependencyNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.component.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 DependencyNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6009;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNameEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public DependencyNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNodeEditPart.java
index 2d146cf628d..06f68a62602 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNodeEditPart.java
@@ -28,15 +28,17 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-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.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.DependencyNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.edit.policies.DependencyNodeItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
@@ -79,6 +81,7 @@ public class DependencyNodeEditPart extends NodeEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -94,6 +97,7 @@ public class DependencyNodeEditPart extends NodeEditPart {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
case MultiDependencyLabelEditPart.VISUAL_ID:
+ case DependencyNodeFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
@@ -130,7 +134,7 @@ public class DependencyNodeEditPart extends NodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new DependencyNodeFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -139,8 +143,8 @@ public class DependencyNodeEditPart extends NodeEditPart {
* @generated
*/
@Override
- public DependencyNodeFigure getPrimaryShape() {
- return (DependencyNodeFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -151,6 +155,9 @@ public class DependencyNodeEditPart extends NodeEditPart {
if (borderItemEditPart instanceof MultiDependencyLabelEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else if (borderItemEditPart instanceof DependencyNodeFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else
{
super.addBorderItem(borderItemContainer, borderItemEditPart);
@@ -162,7 +169,7 @@ public class DependencyNodeEditPart extends NodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(10, 10);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(10, 10);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNodeFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNodeFloatingLabelEditPart.java
new file mode 100644
index 00000000000..3875c35474d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/DependencyNodeFloatingLabelEditPart.java
@@ -0,0 +1,856 @@
+/**
+ * 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.component.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 DependencyNodeFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart,
+ IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6029;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNodeFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public DependencyNodeFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_3203, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNodeFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/GeneralizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/GeneralizationAppliedStereotypeEditPart.java
index e63ef9a2606..e92b533f6e1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/GeneralizationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/GeneralizationAppliedStereotypeEditPart.java
@@ -1,820 +1,823 @@
-/**
- * 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.component.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.component.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.component.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 GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public GeneralizationAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Generalization_4003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.component.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public GeneralizationAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Generalization_4003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceAttributeCompartmentEditPart.java
index be6807690db..883ccc6b551 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceAttributeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceAttributeCompartmentEditPart.java
@@ -26,6 +26,7 @@ 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.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
@@ -76,10 +77,11 @@ public class InterfaceAttributeCompartmentEditPart extends ResizeableListCompart
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceAttributeCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceAttributeCompartmentCanonicalEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceAttributeCompartmentEditPartCN.java
index 1abaa510634..29d2bc4e217 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceAttributeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceAttributeCompartmentEditPartCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditP
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.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
@@ -76,10 +77,11 @@ public class InterfaceAttributeCompartmentEditPartCN extends ListCompartmentEdit
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceAttributeCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceAttributeCompartmentCanonicalEditPolicyCN());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceEditPart.java
index 019d287dc7a..47f3e7b2502 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceEditPart.java
@@ -15,6 +15,7 @@ import java.util.Collections;
import java.util.List;
import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.GraphicalEditPart;
@@ -28,13 +29,17 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.figure.nodes.LollipopInterfaceFigure;
@@ -45,7 +50,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class InterfaceEditPart extends NodeEditPart {
+public class InterfaceEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -79,6 +84,7 @@ public class InterfaceEditPart extends NodeEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -94,6 +100,7 @@ public class InterfaceEditPart extends NodeEditPart {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
case InterfaceNameEditPart.VISUAL_ID:
+ case InterfaceFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
@@ -126,6 +133,30 @@ public class InterfaceEditPart extends NodeEditPart {
}
/**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
* @generated
*/
@Override
@@ -151,6 +182,9 @@ public class InterfaceEditPart extends NodeEditPart {
if (borderItemEditPart instanceof InterfaceNameEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else if (borderItemEditPart instanceof InterfaceFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else
{
super.addBorderItem(borderItemContainer, borderItemEditPart);
@@ -162,7 +196,7 @@ public class InterfaceEditPart extends NodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceEditPartPCN.java
index afe3e1f9514..1f195f8246e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceEditPartPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceEditPartPCN.java
@@ -15,6 +15,7 @@ import java.util.Collections;
import java.util.List;
import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.GraphicalEditPart;
@@ -28,13 +29,17 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.RemoveOrphanViewPolicy;
@@ -46,7 +51,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class InterfaceEditPartPCN extends NodeEditPart {
+public class InterfaceEditPartPCN extends RoundedCompartmentEditPart {
/**
* @generated
@@ -81,6 +86,7 @@ public class InterfaceEditPartPCN extends NodeEditPart {
installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -96,6 +102,7 @@ public class InterfaceEditPartPCN extends NodeEditPart {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
case InterfaceNameEditPartPCN.VISUAL_ID:
+ case InterfaceFloatingLabelEditPartPCN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
@@ -128,6 +135,30 @@ public class InterfaceEditPartPCN extends NodeEditPart {
}
/**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
* @generated
*/
@Override
@@ -153,6 +184,9 @@ public class InterfaceEditPartPCN extends NodeEditPart {
if (borderItemEditPart instanceof InterfaceNameEditPartPCN) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else if (borderItemEditPart instanceof InterfaceFloatingLabelEditPartPCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else
{
super.addBorderItem(borderItemContainer, borderItemEditPart);
@@ -164,7 +198,7 @@ public class InterfaceEditPartPCN extends NodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceFloatingLabelEditPart.java
new file mode 100644
index 00000000000..723192c53fb
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceFloatingLabelEditPart.java
@@ -0,0 +1,856 @@
+/**
+ * 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.component.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 InterfaceFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart,
+ IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6032;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public InterfaceFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Interface_2003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceFloatingLabelEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceFloatingLabelEditPartPCN.java
new file mode 100644
index 00000000000..248bac7a5e3
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceFloatingLabelEditPartPCN.java
@@ -0,0 +1,856 @@
+/**
+ * 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.component.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 InterfaceFloatingLabelEditPartPCN extends FloatingLabelEditPart implements ITextAwareEditPart,
+ IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6028;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceFloatingLabelEditPartPCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public InterfaceFloatingLabelEditPartPCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Interface_3072, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceFloatingLabelEditPartPCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceNameEditPart.java
index 3a66901ec4d..6b1e69b1cb5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceNameEditPart.java
@@ -60,6 +60,7 @@ 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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -84,7 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class InterfaceNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart, ILabelRoleProvider {
+public class InterfaceNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart,
+ ILabelRoleProvider {
/**
* @generated
@@ -146,6 +148,7 @@ public class InterfaceNameEditPart extends PapyrusLabelEditPart implements IText
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceNameEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceNameEditPartPCN.java
index 21f8856b7ec..a1e283d9a90 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceNameEditPartPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceNameEditPartPCN.java
@@ -60,6 +60,7 @@ 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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -84,7 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class InterfaceNameEditPartPCN extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart, ILabelRoleProvider {
+public class InterfaceNameEditPartPCN extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart,
+ ILabelRoleProvider {
/**
* @generated
@@ -146,6 +148,7 @@ public class InterfaceNameEditPartPCN extends PapyrusLabelEditPart implements IT
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceOperationCompartmentEditPart.java
index 2cd876ac541..b8b9a0e0fae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceOperationCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceOperationCompartmentEditPart.java
@@ -26,6 +26,7 @@ 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.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
@@ -76,10 +77,11 @@ public class InterfaceOperationCompartmentEditPart extends ResizeableListCompart
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceOperationCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceOperationCompartmentCanonicalEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceOperationCompartmentEditPartCN.java
index e92efd9f315..698fb358da7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceOperationCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/InterfaceOperationCompartmentEditPartCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditP
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.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
@@ -76,10 +77,11 @@ public class InterfaceOperationCompartmentEditPartCN extends ListCompartmentEdit
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceOperationCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceOperationCompartmentCanonicalEditPolicyCN());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationAppliedStereotypeEditPart.java
index 1bb463c2d2e..d846b5d264a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationAppliedStereotypeEditPart.java
@@ -1,828 +1,831 @@
-/**
- * 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.component.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.component.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.component.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 ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6022;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 30));
- }
-
- /**
- * @generated
- */
- public ManifestationAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Manifestation_4014, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.component.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 ManifestationAppliedStereotypeEditPart extends AbstractLabelEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6022;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 30));
+ }
+
+ /**
+ * @generated
+ */
+ public ManifestationAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Manifestation_4014, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationNameEditPart.java
index 54c953ad1e2..b108340a6ad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ManifestationNameEditPart.java
@@ -1,828 +1,831 @@
-/**
- * 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.component.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.component.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.component.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 ManifestationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6008;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationNameEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public ManifestationNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Manifestation_4014, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.component.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 ManifestationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6008;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationNameEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public ManifestationNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Manifestation_4014, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelEditPart.java
index b4cc8dbdb38..2e7cef0ed9a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelEditPart.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -214,7 +214,7 @@ public class ModelEditPart extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 150);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 150);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelEditPartCN.java
index ebd21589d83..bee32a49749 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelEditPartCN.java
@@ -22,11 +22,11 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
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;
@@ -202,7 +202,7 @@ public class ModelEditPartCN extends NodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 150);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 150);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelNameEditPart.java
index 3a3d4ddd8fa..dd392fb892e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelNameEditPart.java
@@ -85,7 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -864,7 +865,7 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelNameEditPartCN.java
index b87788e4a38..8a75ac32c08 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelNameEditPartCN.java
@@ -85,7 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -864,7 +865,7 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPart.java
index 8a3ca74e357..71c2f22fa64 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPart.java
@@ -67,8 +67,8 @@ public class ModelPackageableElementCompartmentEditPart extends ShapeCompartment
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ModelPackageableElementCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ModelPackageableElementCompartmentCanonicalEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
index 4170fc590c0..af28ab5fc32 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
@@ -67,8 +67,8 @@ public class ModelPackageableElementCompartmentEditPartCN extends ShapeCompartme
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ModelPackageableElementCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.ModelPackageableElementCompartmentCanonicalEditPolicyCN());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/MultiDependencyLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/MultiDependencyLabelEditPart.java
index 6eaa745ca45..9abdb3928e1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/MultiDependencyLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/MultiDependencyLabelEditPart.java
@@ -60,6 +60,7 @@ 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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -82,7 +83,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class MultiDependencyLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+public class MultiDependencyLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IBorderItemEditPart {
/**
* @generated
@@ -144,6 +146,7 @@ public class MultiDependencyLabelEditPart extends PapyrusLabelEditPart implement
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/OperationForInterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/OperationForInterfaceEditPart.java
index 78b1762b169..15755265b64 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/OperationForInterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/OperationForInterfaceEditPart.java
@@ -92,7 +92,8 @@ import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
*/
-public class OperationForInterfaceEditPart extends UMLCompartmentEditPart implements ITextAwareEditPart, IPrimaryEditPart, IControlParserForDirectEdit {
+public class OperationForInterfaceEditPart extends UMLCompartmentEditPart implements ITextAwareEditPart,
+ IPrimaryEditPart, IControlParserForDirectEdit {
/**
* @generated
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageEditPart.java
index deb03b6d437..fab699af061 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageEditPart.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -214,7 +214,7 @@ public class PackageEditPart extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 150);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 150);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageEditPartCN.java
index 720ce0546ff..dd54a7d4b7d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageEditPartCN.java
@@ -22,11 +22,11 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
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;
@@ -202,7 +202,7 @@ public class PackageEditPartCN extends NodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 150);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 150);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageNameEditPart.java
index c966b26b5bf..f5eccbef0e8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageNameEditPart.java
@@ -85,7 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class PackageNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class PackageNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -864,7 +865,7 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageNameEditPartCN.java
index 3e66afbc23c..1a8cebb1f9c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackageNameEditPartCN.java
@@ -85,7 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -864,7 +865,7 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPart.java
index f30b35a54b8..086cc3a45b5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPart.java
@@ -67,8 +67,8 @@ public class PackagePackageableElementCompartmentEditPart extends ShapeCompartme
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
index 47c6725337c..fb588149f44 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
@@ -67,8 +67,8 @@ public class PackagePackageableElementCompartmentEditPartCN extends ShapeCompart
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicyCN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicyCN());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortAppliedStereotypeEditPart.java
index 43ba4f16f28..56af9754018 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortAppliedStereotypeEditPart.java
@@ -60,6 +60,7 @@ 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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -86,7 +87,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class PortAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart, ILabelRoleProvider {
+public class PortAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IBorderItemEditPart, ILabelRoleProvider {
/**
* @generated
@@ -149,6 +151,7 @@ public class PortAppliedStereotypeEditPart extends PapyrusLabelEditPart implemen
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortEditPart.java
index c450aca0d35..43eca73eb1b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortEditPart.java
@@ -30,14 +30,14 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractBorderEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.MaskManagedNodeEditPolicy;
@@ -55,7 +55,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class PortEditPart extends AbstractBorderEditPart {
+public class PortEditPart extends RoundedBorderNamedElementEditPart {
/**
* @generated
@@ -188,10 +188,10 @@ public class PortEditPart extends AbstractBorderEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof PortAppliedStereotypeEditPart) {
+ if (borderItemEditPart instanceof PortNameEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof PortNameEditPart) {
+ } else if (borderItemEditPart instanceof PortAppliedStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else
@@ -204,7 +204,7 @@ public class PortEditPart extends AbstractBorderEditPart {
* @generated
*/
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(20, 20);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortFloatingNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortFloatingNameEditPart.java
new file mode 100644
index 00000000000..d16cc7481fa
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortFloatingNameEditPart.java
@@ -0,0 +1,813 @@
+/**
+ * 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.component.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 PortFloatingNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6026;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.PortFloatingNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public PortFloatingNameEditPart(org.eclipse.gmf.runtime.notation.View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Port_3069, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.PortFloatingNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()), 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private org.eclipse.gmf.runtime.notation.View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new WrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortNameEditPart.java
index 07b92cd1bfe..4f810f94fa6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PortNameEditPart.java
@@ -60,6 +60,7 @@ 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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.LabelAlignmentEditPolicy;
@@ -86,7 +87,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class PortNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart, ILabelRoleProvider {
+public class PortNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart,
+ ILabelRoleProvider {
/**
* @generated
@@ -150,6 +152,7 @@ public class PortNameEditPart extends PapyrusLabelEditPart implements ITextAware
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL, new IndirectPortLabelEditPolicy());
installEditPolicy(LabelAlignmentEditPolicy.LABEL_ALIGNMENT_KEY, new LabelAlignmentEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyForInterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyForInterfaceEditPart.java
index f04dd93ffc4..4c97a8305ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyForInterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyForInterfaceEditPart.java
@@ -92,7 +92,8 @@ import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
*/
-public class PropertyForInterfaceEditPart extends UMLCompartmentEditPart implements ITextAwareEditPart, IPrimaryEditPart, IControlParserForDirectEdit {
+public class PropertyForInterfaceEditPart extends UMLCompartmentEditPart implements ITextAwareEditPart,
+ IPrimaryEditPart, IControlParserForDirectEdit {
/**
* @generated
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyPartEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyPartEditPartCN.java
index 2cd3ffc9579..f5433ef6b2f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyPartEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyPartEditPartCN.java
@@ -27,11 +27,11 @@ 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.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-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.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
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;
@@ -40,13 +40,13 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.MaskManagedNodeEditPo
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.locator.PortPositionLocator;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.part.CustomPropertyPartEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.PropertyLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.policies.itemsemantic.PropertyPartItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.component.custom.figure.nodes.PropertyPartFigure;
-import org.eclipse.papyrus.uml.diagram.component.custom.locators.PortPositionLocator;
import org.eclipse.papyrus.uml.diagram.component.edit.policies.PropertyItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -87,8 +87,8 @@ public class PropertyPartEditPartCN extends CustomPropertyPartEditPartCN {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PropertyItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.PropertyCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.component.edit.policies.PropertyCanonicalEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PropertyPartItemSemanticEditPolicyCN());
@@ -177,7 +177,7 @@ public class PropertyPartEditPartCN extends CustomPropertyPartEditPartCN {
- //Papyrus Gencode :Affixed Port locator
+ // Papyrus Gencode :Affixed Port locator
if (childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart) childEditPart).getFigure(), locator);
@@ -240,7 +240,7 @@ public class PropertyPartEditPartCN extends CustomPropertyPartEditPartCN {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 70);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 70);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyPartNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyPartNameEditPartCN.java
index abe999ff9e4..9256660950f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyPartNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/PropertyPartNameEditPartCN.java
@@ -86,7 +86,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -866,7 +867,7 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ReceptionInInterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ReceptionInInterfaceEditPart.java
index d9b26e869e9..7fd5b5f77a3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ReceptionInInterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/ReceptionInInterfaceEditPart.java
@@ -89,7 +89,8 @@ import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
*/
-public class ReceptionInInterfaceEditPart extends CompartmentEditPart implements ITextAwareEditPart, IPrimaryEditPart, IControlParserForDirectEdit {
+public class ReceptionInInterfaceEditPart extends CompartmentEditPart implements ITextAwareEditPart, IPrimaryEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceEditPart.java
index 313ba4c5163..baea545dbe5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceEditPart.java
@@ -11,30 +11,43 @@
*/
package org.eclipse.papyrus.uml.diagram.component.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
+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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.InterfaceFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.component.edit.policies.RectangleInterfaceItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
@@ -43,7 +56,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class RectangleInterfaceEditPart extends NodeEditPart {
+public class RectangleInterfaceEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -78,6 +91,7 @@ public class RectangleInterfaceEditPart extends NodeEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -90,6 +104,20 @@ public class RectangleInterfaceEditPart extends NodeEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case RectangleInterfaceFloatingLabelEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -111,6 +139,30 @@ public class RectangleInterfaceEditPart extends NodeEditPart {
}
/**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
* @generated
*/
@Override
@@ -208,6 +260,9 @@ public class RectangleInterfaceEditPart extends NodeEditPart {
if (editPart instanceof InterfaceOperationCompartmentEditPart) {
return getPrimaryShape().getOperationCompartmentFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -215,8 +270,22 @@ public class RectangleInterfaceEditPart extends NodeEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof RectangleInterfaceFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
@@ -229,7 +298,7 @@ public class RectangleInterfaceEditPart extends NodeEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceEditPartCN.java
index 64d3e648895..f5ab38b75af 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceEditPartCN.java
@@ -11,30 +11,43 @@
*/
package org.eclipse.papyrus.uml.diagram.component.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
+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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.InterfaceFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.component.edit.policies.InterfaceItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
@@ -43,7 +56,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class RectangleInterfaceEditPartCN extends NodeEditPart {
+public class RectangleInterfaceEditPartCN extends RoundedCompartmentEditPart {
/**
* @generated
@@ -78,6 +91,7 @@ public class RectangleInterfaceEditPartCN extends NodeEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -90,6 +104,20 @@ public class RectangleInterfaceEditPartCN extends NodeEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case RectangleInterfaceFloatingLabelEditPartCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -111,6 +139,30 @@ public class RectangleInterfaceEditPartCN extends NodeEditPart {
}
/**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
* @generated
*/
@Override
@@ -208,6 +260,9 @@ public class RectangleInterfaceEditPartCN extends NodeEditPart {
if (editPart instanceof InterfaceOperationCompartmentEditPartCN) {
return getPrimaryShape().getOperationCompartmentFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -215,8 +270,22 @@ public class RectangleInterfaceEditPartCN extends NodeEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof RectangleInterfaceFloatingLabelEditPartCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 100);
return result;
}
@@ -229,7 +298,7 @@ public class RectangleInterfaceEditPartCN extends NodeEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceFloatingLabelEditPart.java
new file mode 100644
index 00000000000..41590553c72
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceFloatingLabelEditPart.java
@@ -0,0 +1,856 @@
+/**
+ * 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.component.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 RectangleInterfaceFloatingLabelEditPart extends FloatingLabelEditPart implements ITextAwareEditPart,
+ IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6031;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public RectangleInterfaceFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Interface_3205, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceFloatingLabelEditPartCN.java
new file mode 100644
index 00000000000..55d0f698521
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceFloatingLabelEditPartCN.java
@@ -0,0 +1,856 @@
+/**
+ * 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.component.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 RectangleInterfaceFloatingLabelEditPartCN extends FloatingLabelEditPart implements ITextAwareEditPart,
+ IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6033;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceFloatingLabelEditPartCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public RectangleInterfaceFloatingLabelEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Interface_3078, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceFloatingLabelEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceNameEditPart.java
index 075747e0daf..f2828ff8ba4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceNameEditPart.java
@@ -85,7 +85,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class RectangleInterfaceNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class RectangleInterfaceNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -864,7 +865,7 @@ public class RectangleInterfaceNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceNameEditPartCN.java
index d19ad8198dd..9d3279f9ed4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/RectangleInterfaceNameEditPartCN.java
@@ -81,7 +81,8 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class RectangleInterfaceNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+public class RectangleInterfaceNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
/**
* @generated
@@ -847,7 +848,7 @@ public class RectangleInterfaceNameEditPartCN extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionAppliedStereotypeEditPart.java
index 53fd06c52fc..a3509b09d7f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionAppliedStereotypeEditPart.java
@@ -1,828 +1,831 @@
-/**
- * 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.component.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.component.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.component.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 SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6020;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 30));
- }
-
- /**
- * @generated
- */
- public SubstitutionAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Substitution_4012, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.component.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6020;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 30));
+ }
+
+ /**
+ * @generated
+ */
+ public SubstitutionAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Substitution_4012, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionNameEditPart.java
index a0c1d7acd1d..f1fc3f7e918 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/SubstitutionNameEditPart.java
@@ -1,828 +1,831 @@
-/**
- * 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.component.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.component.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.component.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 SubstitutionNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6006;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionNameEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public SubstitutionNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Substitution_4012, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.component.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.component.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.component.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.component.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 SubstitutionNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart,
+ IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6006;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionNameEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public SubstitutionNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Substitution_4012, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/UMLEditPartFactory.java
index 02d5380ec7a..d7a8708529f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/UMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/parts/UMLEditPartFactory.java
@@ -48,12 +48,18 @@ public class UMLEditPartFactory implements EditPartFactory {
case MultiDependencyLabelEditPart.VISUAL_ID:
return new MultiDependencyLabelEditPart(view);
+ case DependencyNodeFloatingLabelEditPart.VISUAL_ID:
+ return new DependencyNodeFloatingLabelEditPart(view);
+
case ComponentEditPart.VISUAL_ID:
return new ComponentEditPart(view);
case ComponentNameEditPart.VISUAL_ID:
return new ComponentNameEditPart(view);
+ case ComponentFloatingLabelEditPart.VISUAL_ID:
+ return new ComponentFloatingLabelEditPart(view);
+
case ModelEditPart.VISUAL_ID:
return new ModelEditPart(view);
@@ -72,6 +78,9 @@ public class UMLEditPartFactory implements EditPartFactory {
case RectangleInterfaceNameEditPart.VISUAL_ID:
return new RectangleInterfaceNameEditPart(view);
+ case RectangleInterfaceFloatingLabelEditPart.VISUAL_ID:
+ return new RectangleInterfaceFloatingLabelEditPart(view);
+
case CommentEditPart.VISUAL_ID:
return new CommentEditPart(view);
@@ -99,6 +108,9 @@ public class UMLEditPartFactory implements EditPartFactory {
case InterfaceNameEditPart.VISUAL_ID:
return new InterfaceNameEditPart(view);
+ case InterfaceFloatingLabelEditPart.VISUAL_ID:
+ return new InterfaceFloatingLabelEditPart(view);
+
case PortEditPart.VISUAL_ID:
return new PortEditPart(view);
@@ -126,18 +138,27 @@ public class UMLEditPartFactory implements EditPartFactory {
case RectangleInterfaceNameEditPartCN.VISUAL_ID:
return new RectangleInterfaceNameEditPartCN(view);
+ case RectangleInterfaceFloatingLabelEditPartCN.VISUAL_ID:
+ return new RectangleInterfaceFloatingLabelEditPartCN(view);
+
case ComponentEditPartCN.VISUAL_ID:
return new ComponentEditPartCN(view);
case ComponentNameEditPartCN.VISUAL_ID:
return new ComponentNameEditPartCN(view);
+ case ComponentFloatingLabelEditPartCN.VISUAL_ID:
+ return new ComponentFloatingLabelEditPartCN(view);
+
case ComponentEditPartPCN.VISUAL_ID:
return new ComponentEditPartPCN(view);
case ComponentNameEditPartPCN.VISUAL_ID:
return new ComponentNameEditPartPCN(view);
+ case ComponentFloatingLabelEditPartPCN.VISUAL_ID:
+ return new ComponentFloatingLabelEditPartPCN(view);
+
case CommentEditPartPCN.VISUAL_ID:
return new CommentEditPartPCN(view);
@@ -168,6 +189,9 @@ public class UMLEditPartFactory implements EditPartFactory {
case InterfaceNameEditPartPCN.VISUAL_ID:
return new InterfaceNameEditPartPCN(view);
+ case InterfaceFloatingLabelEditPartPCN.VISUAL_ID:
+ return new InterfaceFloatingLabelEditPartPCN(view);
+
case PropertyPartEditPartCN.VISUAL_ID:
return new PropertyPartEditPartCN(view);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java
index c2acbace1a1..b272326c535 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java
@@ -83,7 +83,7 @@ public class DefaultNamedElementItemSemanticEditPolicy extends UMLBaseItemSemant
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicy.java
index a0693493699..67686941d94 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicy.java
@@ -97,7 +97,7 @@ public class InterfaceItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelCanonicalEditPolicy.java
index 5e59200e537..b7b5a6c3a0a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelCanonicalEditPolicy.java
@@ -587,7 +587,8 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
/**
* @generated
*/
- private Collection<IAdaptable> createConnections(Collection<UMLLinkDescriptor> linkDescriptors, Domain2Notation domain2NotationMap) {
+ private Collection<IAdaptable> createConnections(Collection<UMLLinkDescriptor> linkDescriptors,
+ Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for (UMLLinkDescriptor nextLinkDescriptor : linkDescriptors) {
EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
@@ -650,7 +651,8 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
/**
* @generated
*/
- protected final EditPart getHintedEditPart(EObject domainModelElement, Domain2Notation domain2NotationMap, int hintVisualId) {
+ protected final EditPart getHintedEditPart(EObject domainModelElement, Domain2Notation domain2NotationMap,
+ int hintVisualId) {
View view = domain2NotationMap.getHinted(domainModelElement, UMLVisualIDRegistry.getType(hintVisualId));
if (view != null) {
return (EditPart) getHost().getViewer().getEditPartRegistry().get(view);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicy.java
index f8fada22301..8d41cd8dd5b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicy.java
@@ -101,7 +101,7 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicyCN.java
index f644d0de4a9..b033b172a80 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelItemSemanticEditPolicyCN.java
@@ -101,7 +101,7 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/OperationForInterfaceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/OperationForInterfaceItemSemanticEditPolicy.java
index 0139db74db1..ec124f84e05 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/OperationForInterfaceItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/OperationForInterfaceItemSemanticEditPolicy.java
@@ -51,7 +51,7 @@ public class OperationForInterfaceItemSemanticEditPolicy extends UMLBaseItemSema
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyItemSemanticEditPolicy.java
index 712672bf0a9..a4c41b4fb96 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyItemSemanticEditPolicy.java
@@ -115,7 +115,7 @@ public class PropertyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ReceptionInInterfaceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ReceptionInInterfaceItemSemanticEditPolicy.java
index dae25291fdd..9646828861b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ReceptionInInterfaceItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ReceptionInInterfaceItemSemanticEditPolicy.java
@@ -51,7 +51,7 @@ public class ReceptionInInterfaceItemSemanticEditPolicy extends UMLBaseItemSeman
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/RectangleInterfaceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/RectangleInterfaceItemSemanticEditPolicy.java
index e4cb6b834cf..10f2829cb4d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/RectangleInterfaceItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/RectangleInterfaceItemSemanticEditPolicy.java
@@ -97,7 +97,7 @@ public class RectangleInterfaceItemSemanticEditPolicy extends UMLBaseItemSemanti
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/SubstitutionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/SubstitutionItemSemanticEditPolicy.java
index eca8dae5216..541f7f3905d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/SubstitutionItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/SubstitutionItemSemanticEditPolicy.java
@@ -75,10 +75,10 @@ public class SubstitutionItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
cmd.setTransactionNestingEnabled(true);
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 org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
return getGEFWrapper(cmd.reduce());
- //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ // return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UMLBaseItemSemanticEditPolicy.java
index 8c7398ad4a8..ccd620704ad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -260,7 +260,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getExtendedTypeCreationCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ protected Command getExtendedTypeCreationCommand(CreateElementRequest request,
+ IExtendedHintedElementType requestElementType) {
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(request.getContainer());
if (provider == null) {
return UnexecutableCommand.INSTANCE;
@@ -273,7 +274,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getExtendedStartCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ protected Command getExtendedStartCreateRelationshipCommand(CreateElementRequest request,
+ IExtendedHintedElementType requestElementType) {
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
if (provider == null) {
return UnexecutableCommand.INSTANCE;
@@ -286,7 +288,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getExtendedCompleteCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ protected Command getExtendedCompleteCreateRelationshipCommand(CreateElementRequest request,
+ IExtendedHintedElementType requestElementType) {
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
if (provider == null) {
return UnexecutableCommand.INSTANCE;
@@ -547,7 +550,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canExistUsage_4001(Package container, Usage linkInstance, NamedElement source, NamedElement target) {
+ public boolean canExistUsage_4001(Package container, Usage linkInstance, NamedElement source,
+ NamedElement target) {
try {
if (source == null) {
return true;
@@ -577,7 +581,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canExistInterfaceRealization_4006(Package container, InterfaceRealization linkInstance, NamedElement source, Interface target) {
+ public boolean canExistInterfaceRealization_4006(Package container, InterfaceRealization linkInstance,
+ NamedElement source, Interface target) {
try {
if (source == null) {
return true;
@@ -607,35 +612,40 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canExistGeneralization_4003(Classifier container, Generalization linkInstance, Classifier source, Classifier target) {
+ public boolean canExistGeneralization_4003(Classifier container, Generalization linkInstance,
+ Classifier source, Classifier target) {
return true;
}
/**
* @generated
*/
- public boolean canExistSubstitution_4012(Package container, Substitution linkInstance, NamedElement source, NamedElement target) {
+ public boolean canExistSubstitution_4012(Package container, Substitution linkInstance, NamedElement source,
+ NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistManifestation_4014(Package container, Manifestation linkInstance, NamedElement source, NamedElement target) {
+ public boolean canExistManifestation_4014(Package container, Manifestation linkInstance, NamedElement source,
+ NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistComponentRealization_4007(Package container, ComponentRealization linkInstance, NamedElement source, NamedElement target) {
+ public boolean canExistComponentRealization_4007(Package container, ComponentRealization linkInstance,
+ NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistAbstraction_4013(Package container, Abstraction linkInstance, NamedElement source, NamedElement target) {
+ public boolean canExistAbstraction_4013(Package container, Abstraction linkInstance, NamedElement source,
+ NamedElement target) {
return true;
}
@@ -663,14 +673,16 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canExistDependency_4010(Package container, Dependency linkInstance, NamedElement source, NamedElement target) {
+ public boolean canExistDependency_4010(Package container, Dependency linkInstance, NamedElement source,
+ NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistDependency_4017(Package container, Dependency linkInstance, NamedElement source, NamedElement target) {
+ public boolean canExistDependency_4017(Package container, Dependency linkInstance, NamedElement source,
+ NamedElement target) {
return true;
}
@@ -684,7 +696,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canExistConnector_4019(StructuredClassifier container, Connector linkInstance, ConnectorEnd source, ConnectorEnd target) {
+ public boolean canExistConnector_4019(StructuredClassifier container, Connector linkInstance,
+ ConnectorEnd source, ConnectorEnd target) {
return true;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/expressions/UMLOCLFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/expressions/UMLOCLFactory.java
index 5af8f4f18ff..8d9925eea4b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/expressions/UMLOCLFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/expressions/UMLOCLFactory.java
@@ -82,7 +82,8 @@ public class UMLOCLFactory {
/**
* @generated
*/
- public static UMLAbstractExpression getExpression(int index, EClassifier context, Map<String, EClassifier> environment) {
+ public static UMLAbstractExpression getExpression(int index, EClassifier context,
+ Map<String, EClassifier> environment) {
UMLOCLFactory cached = getInstance();
if (index < 0 || index >= cached.expressions.length) {
throw new IllegalArgumentException();
@@ -98,7 +99,8 @@ public class UMLOCLFactory {
*
* @generated
*/
- public static UMLAbstractExpression getExpression(String body, EClassifier context, Map<String, EClassifier> environment) {
+ public static UMLAbstractExpression getExpression(String body, EClassifier context,
+ Map<String, EClassifier> environment) {
return new Expression(body, context, environment);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDiagramEditorUtil.java
index 6c720da3872..0ba000a1ec6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDiagramEditorUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDiagramEditorUtil.java
@@ -182,6 +182,7 @@ public class UMLDiagramEditorUtil {
* Create a new instance of domain element associated with canvas.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static Package createInitialModel() {
@@ -192,6 +193,7 @@ public class UMLDiagramEditorUtil {
* Store model element in the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static void attachModelToResource(Package model, Resource resource) {
@@ -220,7 +222,8 @@ public class UMLDiagramEditorUtil {
/**
* @generated
*/
- private static int findElementsInDiagramByID(DiagramEditPart diagramPart, EObject element, List<EditPart> editPartCollector) {
+ private static int findElementsInDiagramByID(DiagramEditPart diagramPart, EObject element,
+ List<EditPart> editPartCollector) {
IDiagramGraphicalViewer viewer = (IDiagramGraphicalViewer) diagramPart.getViewer();
final int intialNumOfEditParts = editPartCollector.size();
@@ -261,7 +264,8 @@ public class UMLDiagramEditorUtil {
/**
* @generated
*/
- public static View findView(DiagramEditPart diagramEditPart, EObject targetElement, LazyElement2ViewMap lazyElement2ViewMap) {
+ public static View findView(DiagramEditPart diagramEditPart, EObject targetElement,
+ LazyElement2ViewMap lazyElement2ViewMap) {
boolean hasStructuralURI = false;
if (targetElement.eResource() instanceof XMLResource) {
hasStructuralURI = ((XMLResource) targetElement.eResource()).getID(targetElement) == null;
@@ -333,7 +337,8 @@ public class UMLDiagramEditorUtil {
/**
* @generated
*/
- private static boolean buildElement2ViewMap(View parentView, Map<EObject, View> element2ViewMap, Set<? extends EObject> elements) {
+ private static boolean buildElement2ViewMap(View parentView, Map<EObject, View> element2ViewMap,
+ Set<? extends EObject> elements) {
if (elements.size() == element2ViewMap.size()) {
return true;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDiagramUpdater.java
index f626ac617c3..cc039f6ba41 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDiagramUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDiagramUpdater.java
@@ -113,7 +113,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
protected UMLDiagramUpdater() {
- //to prevent instantiation allowing the override
+ // to prevent instantiation allowing the override
}
/**
@@ -3155,7 +3155,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Connector_4019(StructuredClassifier container) {
+ protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Connector_4019(
+ StructuredClassifier container) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
for (Iterator<?> links = container.getOwnedConnectors()
.iterator(); links.hasNext();) {
@@ -3187,7 +3188,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Usage_4001(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Usage_4001(NamedElement target,
+ CrossReferenceAdapter crossReferencer) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
@@ -3212,7 +3214,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_InterfaceRealization_4006(Interface target, CrossReferenceAdapter crossReferencer) {
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_InterfaceRealization_4006(Interface target,
+ CrossReferenceAdapter crossReferencer) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
@@ -3237,7 +3240,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Generalization_4003(Classifier target, CrossReferenceAdapter crossReferencer) {
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Generalization_4003(Classifier target,
+ CrossReferenceAdapter crossReferencer) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
@@ -3257,7 +3261,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Substitution_4012(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Substitution_4012(NamedElement target,
+ CrossReferenceAdapter crossReferencer) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
@@ -3282,7 +3287,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Manifestation_4014(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Manifestation_4014(NamedElement target,
+ CrossReferenceAdapter crossReferencer) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
@@ -3307,7 +3313,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_ComponentRealization_4007(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_ComponentRealization_4007(
+ NamedElement target, CrossReferenceAdapter crossReferencer) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
@@ -3332,7 +3339,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Abstraction_4013(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Abstraction_4013(NamedElement target,
+ CrossReferenceAdapter crossReferencer) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
@@ -3357,7 +3365,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4015(Element target, CrossReferenceAdapter crossReferencer) {
+ protected Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4015(
+ Element target, CrossReferenceAdapter crossReferencer) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
@@ -3371,7 +3380,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009(Element target, CrossReferenceAdapter crossReferencer) {
+ protected Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009(
+ Element target, CrossReferenceAdapter crossReferencer) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
@@ -3385,7 +3395,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Dependency_4010(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Dependency_4010(NamedElement target,
+ CrossReferenceAdapter crossReferencer) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
@@ -3410,7 +3421,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Dependency_4017(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Dependency_4017(NamedElement target,
+ CrossReferenceAdapter crossReferencer) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
for (EStructuralFeature.Setting setting : settings) {
@@ -3749,7 +3761,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4015(Comment source) {
+ protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4015(
+ Comment source) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
for (Iterator<?> destinations = source.getAnnotatedElements()
.iterator(); destinations.hasNext();) {
@@ -3762,7 +3775,8 @@ public class UMLDiagramUpdater implements DiagramUpdater {
/**
* @generated
*/
- protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009(Constraint source) {
+ protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009(
+ Constraint source) {
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
for (Iterator<?> destinations = source.getConstrainedElements()
.iterator(); destinations.hasNext();) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDocumentProvider.java
index c6bae969739..64ca72a2a3d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDocumentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLDocumentProvider.java
@@ -506,7 +506,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
if (toCreateOrModify.exists()) {
return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(toCreateOrModify);
}
-
IResource parent = toCreateOrModify;
do {
/*
@@ -542,7 +541,8 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
* @generated
*/
@Override
- protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException {
+ protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite)
+ throws CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
if (!overwrite && !info.isSynchronized()) {
@@ -554,7 +554,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
info.stopResourceListening();
fireElementStateChanging(element);
try {
- monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); //"Saving diagram"
+ monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); // "Saving diagram"
for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
monitor.setTaskName(NLS.bind(
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLLinkDescriptor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLLinkDescriptor.java
index e1c82523ded..63068c2f68c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLLinkDescriptor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLLinkDescriptor.java
@@ -30,7 +30,8 @@ public class UMLLinkDescriptor extends UpdaterLinkDescriptor {
/**
* @generated
*/
- public UMLLinkDescriptor(EObject source, EObject destination, EObject linkElement, IElementType elementType, int linkVID) {
+ 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.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLVisualIDRegistry.java
index fa49b0d7298..b9b6e3814e0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLVisualIDRegistry.java
@@ -31,6 +31,9 @@ import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentDiagramEdit
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentEditPartPCN;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPartPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentNameEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentNameEditPartPCN;
@@ -53,12 +56,15 @@ import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEdit
import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNodeFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceAttributeCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceAttributeCompartmentEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceEditPartPCN;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceFloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceFloatingLabelEditPartPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceNameEditPartPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceOperationCompartmentEditPart;
@@ -90,6 +96,8 @@ import org.eclipse.papyrus.uml.diagram.component.edit.parts.PropertyPartNameEdit
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ReceptionInInterfaceEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceFloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceFloatingLabelEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceNameEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionAppliedStereotypeEditPart;
@@ -442,11 +450,17 @@ public class UMLVisualIDRegistry {
if (MultiDependencyLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (DependencyNodeFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case ComponentEditPart.VISUAL_ID:
if (ComponentNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (ComponentFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (ComponentCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -474,6 +488,9 @@ public class UMLVisualIDRegistry {
if (RectangleInterfaceNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (RectangleInterfaceFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (InterfaceAttributeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -503,6 +520,9 @@ public class UMLVisualIDRegistry {
if (InterfaceNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (InterfaceFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case PortEditPart.VISUAL_ID:
if (PortNameEditPart.VISUAL_ID == nodeVisualID) {
@@ -532,6 +552,9 @@ public class UMLVisualIDRegistry {
if (RectangleInterfaceNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (RectangleInterfaceFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (InterfaceAttributeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -543,6 +566,9 @@ public class UMLVisualIDRegistry {
if (ComponentNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (ComponentFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (ComponentCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -554,6 +580,9 @@ public class UMLVisualIDRegistry {
if (ComponentNameEditPartPCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (ComponentFloatingLabelEditPartPCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (ComponentCompositeCompartmentEditPartPCN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -578,6 +607,9 @@ public class UMLVisualIDRegistry {
if (InterfaceNameEditPartPCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (InterfaceFloatingLabelEditPartPCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case PropertyPartEditPartCN.VISUAL_ID:
if (PropertyPartNameEditPartCN.VISUAL_ID == nodeVisualID) {
@@ -841,7 +873,7 @@ public class UMLVisualIDRegistry {
*/
public static boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
if (candidate == -1) {
- //unrecognized id is always bad
+ // unrecognized id is always bad
return false;
}
int basic = getNodeVisualID(containerView, domainElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/ValidateAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/ValidateAction.java
index 2a55fbf3cda..b42a750f831 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/ValidateAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/ValidateAction.java
@@ -266,7 +266,8 @@ public class ValidateAction extends Action {
/**
* @generated
*/
- private static Set<EObject> collectTargetElements(IStatus status, Set<EObject> targetElementCollector, List<IConstraintStatus> 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((IConstraintStatus) status);
@@ -283,7 +284,8 @@ public class ValidateAction extends Action {
/**
* @generated
*/
- private static Set<EObject> collectTargetElements(Diagnostic diagnostic, Set<EObject> targetElementCollector, List<Diagnostic> allDiagnostics) {
+ 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) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLParserProvider.java
index 286a9b95552..15a82c647e1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLParserProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLParserProvider.java
@@ -30,6 +30,9 @@ import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionAppliedSt
import org.eclipse.papyrus.uml.diagram.component.edit.parts.AbstractionNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentBodyEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.CommentBodyEditPartPCN;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPartPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentNameEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentNameEditPartPCN;
@@ -44,7 +47,10 @@ import org.eclipse.papyrus.uml.diagram.component.edit.parts.ConstraintSpecificat
import org.eclipse.papyrus.uml.diagram.component.edit.parts.DefaultNamedElementNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNameEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNodeFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceFloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceFloatingLabelEditPartPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceNameEditPartPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ManifestationAppliedStereotypeEditPart;
@@ -60,6 +66,8 @@ import org.eclipse.papyrus.uml.diagram.component.edit.parts.PortNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.PropertyForInterfaceEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.PropertyPartNameEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ReceptionInInterfaceEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceFloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceFloatingLabelEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceNameEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionAppliedStereotypeEditPart;
@@ -95,6 +103,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser dependencyName_6029Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDependencyName_6029Parser() {
+ if (dependencyName_6029Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ dependencyName_6029Parser = parser;
+ }
+ return dependencyName_6029Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser componentName_5004Parser;
/**
@@ -114,6 +141,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser componentName_6030Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getComponentName_6030Parser() {
+ if (componentName_6030Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ componentName_6030Parser = parser;
+ }
+ return componentName_6030Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser modelName_5262Parser;
/**
@@ -171,6 +217,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser interfaceName_6031Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInterfaceName_6031Parser() {
+ if (interfaceName_6031Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ interfaceName_6031Parser = parser;
+ }
+ return interfaceName_6031Parser;
+ }
+
+ /**
+ * @generated
+ */
private CommentParser commentBody_5255Parser;
/**
@@ -258,6 +323,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser interfaceName_6032Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInterfaceName_6032Parser() {
+ if (interfaceName_6032Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ interfaceName_6032Parser = parser;
+ }
+ return interfaceName_6032Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser portName_5006Parser;
/**
@@ -349,6 +433,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser interfaceName_6033Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInterfaceName_6033Parser() {
+ if (interfaceName_6033Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ interfaceName_6033Parser = parser;
+ }
+ return interfaceName_6033Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser componentName_5256Parser;
/**
@@ -371,6 +474,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser componentName_6026Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getComponentName_6026Parser() {
+ if (componentName_6026Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ componentName_6026Parser = parser;
+ }
+ return componentName_6026Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser componentName_5257Parser;
/**
@@ -393,6 +515,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser componentName_6027Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getComponentName_6027Parser() {
+ if (componentName_6027Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ componentName_6027Parser = parser;
+ }
+ return componentName_6027Parser;
+ }
+
+ /**
+ * @generated
+ */
private CommentParser commentBody_5258Parser;
/**
@@ -521,6 +662,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser interfaceName_6028Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getInterfaceName_6028Parser() {
+ if (interfaceName_6028Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ interfaceName_6028Parser = parser;
+ }
+ return interfaceName_6028Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser propertyName_5268Parser;
/**
@@ -766,9 +926,13 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
switch (visualID) {
case MultiDependencyLabelEditPart.VISUAL_ID:
return getDependencyName_5008Parser();
+ case DependencyNodeFloatingLabelEditPart.VISUAL_ID:
+ return getDependencyName_6029Parser();
case ComponentNameEditPart.VISUAL_ID:
return getComponentName_5004Parser();
+ case ComponentFloatingLabelEditPart.VISUAL_ID:
+ return getComponentName_6030Parser();
case ModelNameEditPart.VISUAL_ID:
return getModelName_5262Parser();
@@ -778,6 +942,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
case RectangleInterfaceNameEditPart.VISUAL_ID:
return getInterfaceName_5266Parser();
+ case RectangleInterfaceFloatingLabelEditPart.VISUAL_ID:
+ return getInterfaceName_6031Parser();
case CommentBodyEditPart.VISUAL_ID:
return getCommentBody_5255Parser();
@@ -792,6 +958,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
case InterfaceNameEditPart.VISUAL_ID:
return getInterfaceName_5005Parser();
+ case InterfaceFloatingLabelEditPart.VISUAL_ID:
+ return getInterfaceName_6032Parser();
case PortNameEditPart.VISUAL_ID:
return getPortName_5006Parser();
@@ -806,12 +974,18 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
case RectangleInterfaceNameEditPartCN.VISUAL_ID:
return getInterfaceName_5267Parser();
+ case RectangleInterfaceFloatingLabelEditPartCN.VISUAL_ID:
+ return getInterfaceName_6033Parser();
case ComponentNameEditPartCN.VISUAL_ID:
return getComponentName_5256Parser();
+ case ComponentFloatingLabelEditPartCN.VISUAL_ID:
+ return getComponentName_6026Parser();
case ComponentNameEditPartPCN.VISUAL_ID:
return getComponentName_5257Parser();
+ case ComponentFloatingLabelEditPartPCN.VISUAL_ID:
+ return getComponentName_6027Parser();
case CommentBodyEditPartPCN.VISUAL_ID:
return getCommentBody_5258Parser();
@@ -829,6 +1003,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
return getReception_6Parser();
case InterfaceNameEditPartPCN.VISUAL_ID:
return getInterfaceName_0Parser();
+ case InterfaceFloatingLabelEditPartPCN.VISUAL_ID:
+ return getInterfaceName_6028Parser();
case PropertyPartNameEditPartCN.VISUAL_ID:
return getPropertyName_5268Parser();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLViewProvider.java
index 36339792feb..fc7a6e9cc63 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/providers/UMLViewProvider.java
@@ -72,6 +72,9 @@ import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentDiagramEdit
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentEditPartPCN;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentFloatingLabelEditPartPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentNameEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ComponentNameEditPartPCN;
@@ -95,12 +98,15 @@ import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyBranchEdit
import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.DependencyNodeFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.GeneralizationEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceAttributeCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceAttributeCompartmentEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceEditPartPCN;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceFloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceFloatingLabelEditPartPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceNameEditPartPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.InterfaceOperationCompartmentEditPart;
@@ -134,6 +140,8 @@ import org.eclipse.papyrus.uml.diagram.component.edit.parts.PropertyPartNameEdit
import org.eclipse.papyrus.uml.diagram.component.edit.parts.ReceptionInInterfaceEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceFloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceFloatingLabelEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceNameEditPart;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.RectangleInterfaceNameEditPartCN;
import org.eclipse.papyrus.uml.diagram.component.edit.parts.SubstitutionAppliedStereotypeEditPart;
@@ -173,10 +181,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
*/
protected boolean provides(CreateViewForKindOperation op) {
/*
- if (op.getViewKind() == Node.class)
- return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
- if (op.getViewKind() == Edge.class)
- return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ * if (op.getViewKind() == Node.class)
+ * return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ * if (op.getViewKind() == Edge.class)
+ * return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
*/
// check Diagram Type should be the class diagram
@@ -202,7 +210,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* <p>
* This method can be overloaded when diagram editor inherits from another one, but should never be <code>null</code>
* </p>
- *
+ *
* @return the unique identifier of the diagram for which views are provided.
*/
return ComponentDiagramEditPart.MODEL_ID;
@@ -304,7 +312,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
*/
protected boolean provides(CreateEdgeViewOperation op) {
IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- //RS: add code for extended types creation
+ // RS: add code for extended types creation
if (elementType instanceof IExtendedHintedElementType) {
IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType);
if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) {
@@ -315,9 +323,9 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
return false; // foreign element type
}
}
- //if (!org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
- // return false; // foreign element type
- //}
+ // if (!org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
+ // return false; // foreign element type
+ // }
// END R.S.
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) {
@@ -350,7 +358,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* @generated
*/
@Override
- public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index,
+ boolean persisted, PreferencesHint preferencesHint) {
final EObject domainElement = getSemanticElement(semanticAdapter);
final int visualID;
if (semanticHint == null) {
@@ -412,7 +421,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* @generated
*/
@Override
- public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index,
+ boolean persisted, PreferencesHint preferencesHint) {
IElementType elementType = getSemanticElementType(semanticAdapter);
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
switch (UMLVisualIDRegistry.getVisualID(elementTypeHint)) {
@@ -452,7 +462,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createDependency_3203(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createDependency_3203(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(DependencyNodeEditPart.VISUAL_ID));
@@ -468,13 +479,19 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Location location5008 = (Location) label5008.getLayoutConstraint();
location5008.setX(0);
location5008.setY(5);
+ Node label6029 = createLabel(node, UMLVisualIDRegistry.getType(DependencyNodeFloatingLabelEditPart.VISUAL_ID));
+ label6029.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6029 = (Location) label6029.getLayoutConstraint();
+ location6029.setX(0);
+ location6029.setY(5);
return node;
}
/**
* @generated
*/
- public Node createComponent_2002(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createComponent_2002(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(ComponentEditPart.VISUAL_ID));
@@ -486,6 +503,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Component");
Node label5004 = createLabel(node, UMLVisualIDRegistry.getType(ComponentNameEditPart.VISUAL_ID));
+ Node label6030 = createLabel(node, UMLVisualIDRegistry.getType(ComponentFloatingLabelEditPart.VISUAL_ID));
+ label6030.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6030 = (Location) label6030.getLayoutConstraint();
+ location6030.setX(0);
+ location6030.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ComponentCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Component");
return node;
@@ -494,7 +516,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createModel_3202(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createModel_3202(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(ModelEditPart.VISUAL_ID));
@@ -514,7 +537,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createPackage_3200(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createPackage_3200(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(PackageEditPart.VISUAL_ID));
@@ -534,7 +558,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createInterface_3205(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createInterface_3205(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(RectangleInterfaceEditPart.VISUAL_ID));
@@ -546,6 +571,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interface");
Node label5266 = createLabel(node, UMLVisualIDRegistry.getType(RectangleInterfaceNameEditPart.VISUAL_ID));
+ Node label6031 = createLabel(node, UMLVisualIDRegistry.getType(RectangleInterfaceFloatingLabelEditPart.VISUAL_ID));
+ label6031.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6031 = (Location) label6031.getLayoutConstraint();
+ location6031.setX(0);
+ location6031.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(InterfaceAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(InterfaceOperationCompartmentEditPart.VISUAL_ID), true, true, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Interface");
@@ -555,7 +585,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createComment_3201(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createComment_3201(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(CommentEditPart.VISUAL_ID));
@@ -573,7 +604,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createConstraint_3199(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createConstraint_3199(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(ConstraintEditPart.VISUAL_ID));
@@ -592,7 +624,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createNamedElement_3204(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createNamedElement_3204(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(DefaultNamedElementEditPart.VISUAL_ID));
@@ -610,7 +643,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createInterface_2003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createInterface_2003(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(InterfaceEditPart.VISUAL_ID));
@@ -626,13 +660,19 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Location location5005 = (Location) label5005.getLayoutConstraint();
location5005.setX(0);
location5005.setY(5);
+ Node label6032 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceFloatingLabelEditPart.VISUAL_ID));
+ label6032.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6032 = (Location) label6032.getLayoutConstraint();
+ location6032.setX(0);
+ location6032.setY(5);
return node;
}
/**
* @generated
*/
- public Node createPort_3069(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createPort_3069(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(PortEditPart.VISUAL_ID));
@@ -658,7 +698,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createModel_3077(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createModel_3077(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(ModelEditPartCN.VISUAL_ID));
@@ -677,7 +718,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createPackage_3076(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createPackage_3076(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(PackageEditPartCN.VISUAL_ID));
@@ -696,7 +738,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createInterface_3078(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createInterface_3078(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(RectangleInterfaceEditPartCN.VISUAL_ID));
@@ -707,6 +750,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interface");
Node label5267 = createLabel(node, UMLVisualIDRegistry.getType(RectangleInterfaceNameEditPartCN.VISUAL_ID));
+ Node label6033 = createLabel(node, UMLVisualIDRegistry.getType(RectangleInterfaceFloatingLabelEditPartCN.VISUAL_ID));
+ label6033.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6033 = (Location) label6033.getLayoutConstraint();
+ location6033.setX(0);
+ location6033.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(InterfaceAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
createCompartment(node, UMLVisualIDRegistry.getType(InterfaceOperationCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Interface");
@@ -716,7 +764,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createComponent_3070(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createComponent_3070(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(ComponentEditPartCN.VISUAL_ID));
@@ -727,6 +776,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Component");
Node label5256 = createLabel(node, UMLVisualIDRegistry.getType(ComponentNameEditPartCN.VISUAL_ID));
+ Node label6026 = createLabel(node, UMLVisualIDRegistry.getType(ComponentFloatingLabelEditPartCN.VISUAL_ID));
+ label6026.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6026 = (Location) label6026.getLayoutConstraint();
+ location6026.setX(0);
+ location6026.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ComponentCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Component");
return node;
@@ -735,7 +789,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createComponent_3071(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createComponent_3071(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(ComponentEditPartPCN.VISUAL_ID));
@@ -746,6 +801,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Component");
Node label5257 = createLabel(node, UMLVisualIDRegistry.getType(ComponentNameEditPartPCN.VISUAL_ID));
+ Node label6027 = createLabel(node, UMLVisualIDRegistry.getType(ComponentFloatingLabelEditPartPCN.VISUAL_ID));
+ label6027.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6027 = (Location) label6027.getLayoutConstraint();
+ location6027.setX(0);
+ location6027.setY(5);
createCompartment(node, UMLVisualIDRegistry.getType(ComponentCompositeCompartmentEditPartPCN.VISUAL_ID), true, true, false, false);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Component");
return node;
@@ -754,7 +814,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createComment_3074(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createComment_3074(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(CommentEditPartPCN.VISUAL_ID));
@@ -771,7 +832,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createConstraint_3075(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createConstraint_3075(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(ConstraintEditPartPCN.VISUAL_ID));
@@ -789,7 +851,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createProperty_1(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createProperty_1(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Node node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
node.setType(UMLVisualIDRegistry.getType(PropertyForInterfaceEditPart.VISUAL_ID));
@@ -804,7 +867,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createOperation_5(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createOperation_5(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Node node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
node.setType(UMLVisualIDRegistry.getType(OperationForInterfaceEditPart.VISUAL_ID));
@@ -819,7 +883,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createReception_6(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createReception_6(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Node node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
node.setType(UMLVisualIDRegistry.getType(ReceptionInInterfaceEditPart.VISUAL_ID));
@@ -834,7 +899,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Node createInterface_3072(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createInterface_3072(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(InterfaceEditPartPCN.VISUAL_ID));
@@ -849,13 +915,19 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Location location0 = (Location) label0.getLayoutConstraint();
location0.setX(0);
location0.setY(5);
+ Node label6028 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceFloatingLabelEditPartPCN.VISUAL_ID));
+ label6028.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6028 = (Location) label6028.getLayoutConstraint();
+ location6028.setX(0);
+ location6028.setY(5);
return node;
}
/**
* @generated
*/
- public Node createProperty_3079(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Node createProperty_3079(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(PropertyPartEditPartCN.VISUAL_ID));
@@ -872,7 +944,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Edge createUsage_4001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Edge createUsage_4001(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
@@ -888,10 +961,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Usage");
- //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);
- //}
+ // 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;
}
@@ -899,7 +972,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Edge createInterfaceRealization_4006(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Edge createInterfaceRealization_4006(EObject domainElement, View containerView, int index,
+ boolean persisted, PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
@@ -915,10 +989,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "InterfaceRealization");
- //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);
- //}
+ // 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;
}
@@ -926,7 +1000,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Edge createGeneralization_4003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Edge createGeneralization_4003(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
@@ -942,10 +1017,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
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) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
+ // 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);
+ // }
Node label2 = createLabel(edge, UMLVisualIDRegistry.getType(GeneralizationAppliedStereotypeEditPart.VISUAL_ID));
label2.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location2 = (Location) label2.getLayoutConstraint();
@@ -959,7 +1034,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Edge createSubstitution_4012(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Edge createSubstitution_4012(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
@@ -975,10 +1051,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Substitution");
- //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);
- //}
+ // 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);
+ // }
Node label6006 = createLabel(edge, UMLVisualIDRegistry.getType(SubstitutionNameEditPart.VISUAL_ID));
label6006.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6006 = (Location) label6006.getLayoutConstraint();
@@ -997,7 +1073,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Edge createManifestation_4014(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Edge createManifestation_4014(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
@@ -1013,10 +1090,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Manifestation");
- //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);
- //}
+ // 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);
+ // }
Node label6008 = createLabel(edge, UMLVisualIDRegistry.getType(ManifestationNameEditPart.VISUAL_ID));
label6008.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6008 = (Location) label6008.getLayoutConstraint();
@@ -1035,7 +1112,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Edge createComponentRealization_4007(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Edge createComponentRealization_4007(EObject domainElement, View containerView, int index,
+ boolean persisted, PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
@@ -1051,10 +1129,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ComponentRealization");
- //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);
- //}
+ // 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);
+ // }
Node label3 = createLabel(edge, UMLVisualIDRegistry.getType(ComponentRealizationNameEditPart.VISUAL_ID));
label3.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location3 = (Location) label3.getLayoutConstraint();
@@ -1073,7 +1151,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Edge createAbstraction_4013(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Edge createAbstraction_4013(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
@@ -1089,10 +1168,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Abstraction");
- //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);
- //}
+ // 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);
+ // }
Node label6007 = createLabel(edge, UMLVisualIDRegistry.getType(AbstractionNameEditPart.VISUAL_ID));
label6007.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6007 = (Location) label6007.getLayoutConstraint();
@@ -1126,10 +1205,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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;
}
@@ -1137,7 +1216,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Edge createCommentAnnotatedElement_4015(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Edge createCommentAnnotatedElement_4015(View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
@@ -1153,10 +1233,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "CommentAnnotatedElement");
- //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);
- //}
+ // 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;
}
@@ -1164,7 +1244,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Edge createConstraintConstrainedElement_4009(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Edge createConstraintConstrainedElement_4009(View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
@@ -1180,10 +1261,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ConstraintConstrainedElement");
- //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);
- //}
+ // 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;
}
@@ -1191,7 +1272,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Edge createDependency_4010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Edge createDependency_4010(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
@@ -1207,10 +1289,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "DependencyLink");
- //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);
- //}
+ // 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);
+ // }
Node label6009 = createLabel(edge, UMLVisualIDRegistry.getType(DependencyNameEditPart.VISUAL_ID));
label6009.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6009 = (Location) label6009.getLayoutConstraint();
@@ -1229,7 +1311,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Edge createDependency_4017(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Edge createDependency_4017(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
@@ -1245,10 +1328,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
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);
- //}
+ // 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;
}
@@ -1272,10 +1355,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "InterfacePortLink");
- //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);
- //}
+ // 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;
}
@@ -1283,7 +1366,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- public Edge createConnector_4019(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ public Edge createConnector_4019(EObject domainElement, View containerView, int index, boolean persisted,
+ PreferencesHint preferencesHint) {
Connector edge = NotationFactory.eINSTANCE.createConnector();
edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
@@ -1299,10 +1383,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Connector");
- //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);
- //}
+ // 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);
+ // }
Node label6024 = createLabel(edge, UMLVisualIDRegistry.getType(ConnectorAppliedStereotypeEditPart.VISUAL_ID));
label6024.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6024 = (Location) label6024.getLayoutConstraint();
@@ -1343,10 +1427,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
/**
* @generated
*/
- protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) {
- //SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
- //rv.setShowTitle(showTitle);
- //rv.setCollapsed(isCollapsed);
+ protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort,
+ boolean canFilter) {
+ // SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
+ // rv.setShowTitle(showTitle);
+ // rv.setCollapsed(isCollapsed);
Node rv;
if (canCollapse) {
rv = NotationFactory.eINSTANCE.createBasicCompartment();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/sheet/UMLPropertySection.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/sheet/UMLPropertySection.java
index ab2b653fc6f..744fc7af57b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/sheet/UMLPropertySection.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/sheet/UMLPropertySection.java
@@ -26,7 +26,7 @@ public class UMLPropertySection extends DefaultPropertySection implements IPrope
*/
@Override
protected Object transformSelection(Object selected) {
- selected = /*super.*/transformSelectionToDomain(selected);
+ selected = /* super. */transformSelectionToDomain(selected);
return selected;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/META-INF/MANIFEST.MF
index f7b45fc2d7b..26ffb7fd86a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/META-INF/MANIFEST.MF
@@ -1,77 +1,78 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.diagram.deployment,
- org.eclipse.papyrus.uml.diagram.deployment.custom.actions,
- org.eclipse.papyrus.uml.diagram.deployment.custom.edit.command,
- org.eclipse.papyrus.uml.diagram.deployment.custom.edit.helpers,
- org.eclipse.papyrus.uml.diagram.deployment.custom.edit.part,
- org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies,
- org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.itemsemantic,
- org.eclipse.papyrus.uml.diagram.deployment.custom.factory,
- org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes,
- org.eclipse.papyrus.uml.diagram.deployment.custom.messages,
- org.eclipse.papyrus.uml.diagram.deployment.custom.providers,
- org.eclipse.papyrus.uml.diagram.deployment.edit.commands,
- org.eclipse.papyrus.uml.diagram.deployment.edit.helpers,
- org.eclipse.papyrus.uml.diagram.deployment.edit.parts,
- org.eclipse.papyrus.uml.diagram.deployment.edit.policies,
- org.eclipse.papyrus.uml.diagram.deployment.expressions,
- org.eclipse.papyrus.uml.diagram.deployment.parsers,
- org.eclipse.papyrus.uml.diagram.deployment.part,
- org.eclipse.papyrus.uml.diagram.deployment.preferences,
- org.eclipse.papyrus.uml.diagram.deployment.providers,
- org.eclipse.papyrus.uml.diagram.deployment.sheet
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.properties,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,
- org.eclipse.ocl.ecore,
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.1.0",
- org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0",
- org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
- org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.7.0",
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.jface,
- org.eclipse.ui.views,
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.xmi,
- org.eclipse.emf.edit.ui,
- org.eclipse.gmf.runtime.emf.core,
- org.eclipse.gmf.runtime.emf.commands.core,
- org.eclipse.gmf.runtime.emf.ui.properties,
- org.eclipse.gmf.runtime.diagram.ui,
- org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.diagram.ui.providers.ide,
- org.eclipse.gmf.runtime.diagram.ui.render,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.draw2d,
- org.eclipse.gmf.runtime.draw2d.ui,
- org.eclipse.uml2.uml,
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.edit,
- org.eclipse.emf.validation,
- org.eclipse.gef,
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0"
-Bundle-Vendor: %providerName
-Eclipse-LazyStart: true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.deployment; singleton:=true
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.uml.diagram.deployment,
+ org.eclipse.papyrus.uml.diagram.deployment.custom.actions,
+ org.eclipse.papyrus.uml.diagram.deployment.custom.edit.command,
+ org.eclipse.papyrus.uml.diagram.deployment.custom.edit.helpers,
+ org.eclipse.papyrus.uml.diagram.deployment.custom.edit.part,
+ org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies,
+ org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.itemsemantic,
+ org.eclipse.papyrus.uml.diagram.deployment.custom.factory,
+ org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes,
+ org.eclipse.papyrus.uml.diagram.deployment.custom.messages,
+ org.eclipse.papyrus.uml.diagram.deployment.custom.providers,
+ org.eclipse.papyrus.uml.diagram.deployment.edit.commands,
+ org.eclipse.papyrus.uml.diagram.deployment.edit.helpers,
+ org.eclipse.papyrus.uml.diagram.deployment.edit.parts,
+ org.eclipse.papyrus.uml.diagram.deployment.edit.policies,
+ org.eclipse.papyrus.uml.diagram.deployment.expressions,
+ org.eclipse.papyrus.uml.diagram.deployment.parsers,
+ org.eclipse.papyrus.uml.diagram.deployment.part,
+ org.eclipse.papyrus.uml.diagram.deployment.preferences,
+ org.eclipse.papyrus.uml.diagram.deployment.providers,
+ org.eclipse.papyrus.uml.diagram.deployment.sheet
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.properties,
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,
+ org.eclipse.ocl.ecore,
+ org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.1.0",
+ org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0",
+ org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
+ org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.7.0",
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.jface,
+ org.eclipse.ui.views,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.emf.edit.ui,
+ org.eclipse.gmf.runtime.emf.core,
+ org.eclipse.gmf.runtime.emf.commands.core,
+ org.eclipse.gmf.runtime.emf.ui.properties,
+ org.eclipse.gmf.runtime.diagram.ui,
+ org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui.providers.ide,
+ org.eclipse.gmf.runtime.diagram.ui.render,
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor,
+ org.eclipse.draw2d,
+ org.eclipse.gmf.runtime.draw2d.ui,
+ org.eclipse.uml2.uml,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.ecore.edit,
+ org.eclipse.emf.validation,
+ org.eclipse.gef,
+ org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.core.databinding.observable
+Bundle-Vendor: %providerName
+Eclipse-LazyStart: true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.deployment; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/figure/nodes/ArtifactFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/figure/nodes/ArtifactFigure.java
index 42af604dbb4..5b8deb8cbea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/figure/nodes/ArtifactFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/custom/figure/nodes/ArtifactFigure.java
@@ -18,7 +18,7 @@ import java.util.List;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.papyrus.uml.diagram.common.Activator;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.CompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin;
import org.eclipse.swt.graphics.Image;
@@ -26,7 +26,7 @@ import org.eclipse.swt.graphics.Image;
/**
* The Class ArtifactFigure.
*/
-public class ArtifactFigure extends CompartmentFigure {
+public class ArtifactFigure extends RoundedCompartmentFigure {
/** The Internal Structure Compartment. */
private final static String COMPOSITE_COMPARTMENT = "compositeCompartment";
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/model/DeploymentDiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/model/DeploymentDiagram.gmfgen
index 0db6e3f97dc..4b33f0be7b0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/model/DeploymentDiagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/model/DeploymentDiagram.gmfgen
@@ -1,3024 +1,3137 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
- xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
- <gmfgen:GenEditorGenerator
- packageNamePrefix="org.eclipse.papyrus.uml.diagram.deployment"
- modelID="PapyrusUMLDeploymentDiagram"
- diagramFileExtension="PapyrusUMLDeployment_diagram"
- domainFileExtension="umlDeployment"
- dynamicTemplates="true"
- templateDirectory="/org.eclipse.papyrus.def/xtend/"
- copyrightText="Copyright (c) 2014 CEA LIST.&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation"
- pluginDirectory="/org.eclipse.papyrus.uml.diagram.deployment/src">
- <diagram
- visualID="1000"
- editPartClassName="DeploymentDiagramEditPart"
- itemSemanticEditPolicyClassName="DeploymentDiagramItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ModelCanonicalEditPolicy"
- iconProviderPriority="Low"
- creationWizardIconPath="icons/obj16/DeploymentDiagram.gif"
- validationProviderPriority="Low"
- validationEnabled="true"
- validationDecorators="true"
- liveValidationUIFeedback="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Package_1000"
- displayName="DeploymentDiagram"
- editHelperClassName="ModelEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <domainDiagramElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <childNodes
- visualID="49"
- editPartClassName="ModelEditPartCN"
- itemSemanticEditPolicyClassName="ModelItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ModelCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.6"
- graphicalNodeEditPolicyClassName="ModelGraphicalNodeEditPolicyCN"
- createCommandClassName="ModelCreateCommandCN"
- containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.6 /0/@diagram/@compartments.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Model_49"
- displayName="Model"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="150"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Model"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="50"
- editPartClassName="ModelNameEditPartCN"
- itemSemanticEditPolicyClassName="ModelNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="36"
- editPartClassName="PackageEditPartCN"
- itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="PackageCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.7"
- graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicyCN"
- createCommandClassName="PackageCreateCommandCN"
- containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.7 /0/@diagram/@compartments.0 /0/@diagram/@compartments.6">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="150"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="37"
- editPartClassName="PackageNameEditPartCN"
- itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="16"
- editPartClassName="DeviceEditPartCN"
- itemSemanticEditPolicyClassName="DeviceItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="DeviceCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="DeviceGraphicalNodeEditPolicyCN"
- createCommandClassName="DeviceCreateCommandCN"
- containers="/0/@diagram/@compartments.4 /0/@diagram/@compartments.10 /0/@diagram/@compartments.2 /0/@diagram/@compartments.8">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Device_16"
- displayName="Device"
- metamodelType="/0/@diagram/@topLevelNodes.6/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Device"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node/nestedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node/nestedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="20"
- editPartClassName="DeviceNameEditPartCN"
- itemSemanticEditPolicyClassName="DeviceNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="44"
- editPartClassName="NestedDeviceEditPartCN"
- itemSemanticEditPolicyClassName="NestedDeviceItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="NestedDeviceCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.8"
- graphicalNodeEditPolicyClassName="NestedDeviceGraphicalNodeEditPolicyCN"
- createCommandClassName="NestedDeviceCreateCommandCN"
- containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.7 /0/@diagram/@compartments.0 /0/@diagram/@compartments.6">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Device_44"
- displayName="Device"
- metamodelType="/0/@diagram/@topLevelNodes.6/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Device"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="45"
- editPartClassName="NestedDeviceNameEditPartCN"
- itemSemanticEditPolicyClassName="NestedDeviceNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="21"
- editPartClassName="ExecutionEnvironmentEditPartCN"
- itemSemanticEditPolicyClassName="ExecutionEnvironmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ExecutionEnvironmentCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="ExecutionEnvironmentGraphicalNodeEditPolicyCN"
- createCommandClassName="ExecutionEnvironmentCreateCommandCN"
- containers="/0/@diagram/@compartments.4 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_21"
- displayName="ExecutionEnvironment"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExecutionEnvironment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node/nestedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node/nestedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="22"
- editPartClassName="ExecutionEnvironmentNameEditPartCN"
- itemSemanticEditPolicyClassName="ExecutionEnvironmentNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="46"
- editPartClassName="NestedExecutionEnvironmentEditPartCN"
- itemSemanticEditPolicyClassName="NestedExecutionEnvironmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="NestedExecutionEnvironmentCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.9"
- graphicalNodeEditPolicyClassName="NestedExecutionEnvironmentGraphicalNodeEditPolicyCN"
- createCommandClassName="NestedExecutionEnvironmentCreateCommandCN"
- containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.7 /0/@diagram/@compartments.0 /0/@diagram/@compartments.6">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_46"
- displayName="ExecutionEnvironment"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExecutionEnvironment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="47"
- editPartClassName="NestedExecutionEnvironmentNameEditPartCN"
- itemSemanticEditPolicyClassName="NestedExecutionEnvironmentNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="23"
- editPartClassName="NodeEditPartCN"
- itemSemanticEditPolicyClassName="NodeItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="NodeCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="NodeGraphicalNodeEditPolicyCN"
- createCommandClassName="NodeCreateCommandCN"
- containers="/0/@diagram/@compartments.4 /0/@diagram/@compartments.10 /0/@diagram/@compartments.2 /0/@diagram/@compartments.8">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="150"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node/nestedNode"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node/nestedNode"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="24"
- editPartClassName="NodeNameEditPartCN"
- itemSemanticEditPolicyClassName="NodeNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="42"
- editPartClassName="NestedNodeEditPartCN"
- itemSemanticEditPolicyClassName="NestedNodeItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="NestedNodeCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.10"
- graphicalNodeEditPolicyClassName="NestedNodeGraphicalNodeEditPolicyCN"
- createCommandClassName="NestedNodeCreateCommandCN"
- containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.7 /0/@diagram/@compartments.0 /0/@diagram/@compartments.6">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="150"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="43"
- editPartClassName="NestedNodeNameEditPart"
- itemSemanticEditPolicyClassName="NestedNodeNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="25"
- editPartClassName="ArtifactEditPartCN"
- itemSemanticEditPolicyClassName="ArtifactItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ArtifactCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="ArtifactGraphicalNodeEditPolicyCN"
- createCommandClassName="ArtifactCreateCommandCN"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Artifact_25"
- displayName="Artifact"
- metamodelType="/0/@diagram/@topLevelNodes.7/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="70"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/fileName"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="27"
- editPartClassName="ArtifactNameEditPartCN"
- itemSemanticEditPolicyClassName="ArtifactNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="28"
- editPartClassName="ArtifactEditPartACN"
- itemSemanticEditPolicyClassName="ArtifactItemSemanticEditPolicyACN"
- canonicalEditPolicyClassName="ArtifactCanonicalEditPolicyACN"
- compartments="/0/@diagram/@compartments.12"
- graphicalNodeEditPolicyClassName="ArtifactGraphicalNodeEditPolicyACN"
- createCommandClassName="ArtifactCreateCommandACN"
- containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="Artifact"
- metamodelType="/0/@diagram/@topLevelNodes.7/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="70"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/nestedArtifact"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/fileName"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="29"
- editPartClassName="ArtifactNameEditPartACN"
- itemSemanticEditPolicyClassName="ArtifactNameItemSemanticEditPolicyACN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="40"
- editPartClassName="NestedArtifactNodeEditPartCN"
- itemSemanticEditPolicyClassName="NestedArtifactNodeItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="NestedArtifactCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.11"
- graphicalNodeEditPolicyClassName="NestedArtifactNodeGraphicalNodeEditPolicyCN"
- createCommandClassName="NestedArtifactNodeCreateCommandCN"
- containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.7 /0/@diagram/@compartments.0 /0/@diagram/@compartments.6">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="Artifact"
- metamodelType="/0/@diagram/@topLevelNodes.7/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="70"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/fileName"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="41"
- editPartClassName="NestedArtifactNameEditPart"
- itemSemanticEditPolicyClassName="NestedArtifactNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="54"
- editPartClassName="CommentEditPartCN"
- itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="CommentCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyCN"
- createCommandClassName="CommentCreateCommandCN"
- containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="CommentEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.2">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="55"
- editPartClassName="CommentBodyEditPartCN"
- itemSemanticEditPolicyClassName="CommentBodyEditPartCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCornerBentFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="56"
- editPartClassName="ConstraintEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyCN"
- createCommandClassName="ConstraintCreateCommandCN"
- containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ConstraintEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="57"
- editPartClassName="ConstraintNameEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="58"
- editPartClassName="ConstraintSpecificationEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintSpecificationItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <editableMetaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </childNodes>
- <topLevelNodes
- visualID="2011"
- editPartClassName="DependencyNodeEditPart"
- itemSemanticEditPolicyClassName="DependencyNodeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DependencyNodeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DependencyNodeGraphicalNodeEditPolicy"
- createCommandClassName="DependencyNodeCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Dependency_2011"
- displayName="DependencyNode"
- editHelperClassName="DependencyEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DependencyNodeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="10"
- height="10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="7"
- editPartClassName="MultiDependencyLabelEditPart"
- itemSemanticEditPolicyClassName="MultiDependencyLabelItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2010"
- compartments="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Model_2010"
- displayName="Model"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="150"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Model"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="48"
- editPartClassName="ModelNameEditPart"
- itemSemanticEditPolicyClassName="ModelNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2009"
- editPartClassName="PackageEditPart"
- itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PackageCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.1"
- graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicy"
- createCommandClassName="PackageCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="150"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="35"
- editPartClassName="PackageNameEditPart"
- itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2005"
- editPartClassName="ConstraintEditPart"
- itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ConstraintCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicy"
- createCommandClassName="ConstraintCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ConstraintEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="2"
- editPartClassName="ConstraintNameEditPart"
- itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="3"
- editPartClassName="ConstraintSpecificationEditPart"
- itemSemanticEditPolicyClassName="ConstraintSpecificationItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- <editableMetaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2001"
- editPartClassName="CommentEditPart"
- itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="CommentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicy"
- createCommandClassName="CommentCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="CommentEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.2">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="1"
- editPartClassName="CommentBodyEditPart"
- itemSemanticEditPolicyClassName="CommentBodyEditPart">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCornerBentFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2002"
- editPartClassName="ExecutionEnvironmentEditPart"
- itemSemanticEditPolicyClassName="ExecutionEnvironmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ExecutionEnvironmentCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.3"
- graphicalNodeEditPolicyClassName="ExecutionEnvironmentGraphicalNodeEditPolicy"
- createCommandClassName="ExecutionEnvironmentCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ExecutionEnvironmentEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExecutionEnvironment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5"
- editPartClassName="ExecutionEnvironmentNameEditPart"
- itemSemanticEditPolicyClassName="ExecutionEnvironmentNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2003"
- editPartClassName="DeviceEditPart"
- itemSemanticEditPolicyClassName="DeviceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DeviceCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.2"
- graphicalNodeEditPolicyClassName="DeviceGraphicalNodeEditPolicy"
- createCommandClassName="DeviceCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="DeviceEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Device"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="6"
- editPartClassName="DeviceNameEditPart"
- itemSemanticEditPolicyClassName="DeviceNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2006"
- editPartClassName="ArtifactEditPart"
- itemSemanticEditPolicyClassName="ArtifactItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ArtifactCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.5"
- graphicalNodeEditPolicyClassName="ArtifactGraphicalNodeEditPolicy"
- createCommandClassName="ArtifactCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ArtifactEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="70"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/fileName"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="8"
- editPartClassName="ArtifactNameEditPart"
- itemSemanticEditPolicyClassName="ArtifactNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2008"
- compartments="/0/@diagram/@compartments.4">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="NodeEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="150"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;REMOVE_ORPHAN_VIEW&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RESIZE_BORDER_ITEMS&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="9"
- editPartClassName="NodeNameEditPart"
- itemSemanticEditPolicyClassName="NodeNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2012"
- editPartClassName="DefaultNamedElementEditPart"
- itemSemanticEditPolicyClassName="DefaultNamedElementItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DefaultNamedElementCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DefaultNamedElementGraphicalNodeEditPolicy"
- createCommandClassName="DefaultNamedElementCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.NamedElement_2012"
- displayName="DefaultNamedElement"
- editHelperClassName="DefaultNamedElementEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="50"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.DeploymentDiagramChangeStereotypedShapeEditpolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.itemsemantic.CustomDefaultNamedElementItemSemanticEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- </modelFacet>
- <labels
- visualID="53"
- editPartClassName="DefaultNamedElementNameEditPart"
- itemSemanticEditPolicyClassName="DefaultNamedElementNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <links
- visualID="4005"
- editPartClassName="LinkDescriptorEditPart"
- itemSemanticEditPolicyClassName="LinkDescriptorItemSemanticEditPolicy"
- createCommandClassName="LinkDescriptorCreateCommand"
- reorientCommandClassName="LinkDescriptorReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:NotationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- </links>
- <links
- visualID="4008"
- editPartClassName="CommentAnnotatedElementEditPart"
- itemSemanticEditPolicyClassName="CommentAnnotatedElementItemSemanticEditPolicy"
- createCommandClassName="CommentAnnotatedElementCreateCommand"
- reorientCommandClassName="CommentAnnotatedElementReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.CommentAnnotatedElement_4006"
- displayName="CommentAnnotatedElement"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
- </modelFacet>
- </links>
- <links
- visualID="4009"
- editPartClassName="ConstraintConstrainedElementEditPart"
- itemSemanticEditPolicyClassName="ConstraintConstrainedElementItemSemanticEditPolicy"
- createCommandClassName="ConstraintConstrainedElementCreateCommand"
- reorientCommandClassName="ConstraintConstrainedElementReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.ConstraintConstrainedElement_4007"
- displayName="ConstraintConstrainedElement"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
- </modelFacet>
- </links>
- <links
- visualID="4001"
- editPartClassName="DeploymentEditPart"
- itemSemanticEditPolicyClassName="DeploymentItemSemanticEditPolicy"
- createCommandClassName="DeploymentCreateCommand"
- reorientCommandClassName="DeploymentReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="DeploymentEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeDeploymentLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Deployment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DeploymentTarget/deployment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DeploymentTarget/deployment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
- </modelFacet>
- <labels
- visualID="13"
- editPartClassName="DeploymentNameEditPart"
- itemSemanticEditPolicyClassName="DeploymentNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="14"
- editPartClassName="DeploymentAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="DeploymentAppliedStereotypeItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4002"
- editPartClassName="ManifestationEditPart"
- itemSemanticEditPolicyClassName="ManifestationItemSemanticEditPolicy"
- createCommandClassName="ManifestationCreateCommand"
- reorientCommandClassName="ManifestationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ManifestationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeManifestationLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Manifestation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/manifestation"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/manifestation"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
- </modelFacet>
- <labels
- visualID="10"
- editPartClassName="ManifestationNameEditPart"
- itemSemanticEditPolicyClassName="ManifestationNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="11"
- editPartClassName="ManifestationAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ManifestationAppliedStereotypeItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="30"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4003"
- editPartClassName="GeneralizationEditPart"
- itemSemanticEditPolicyClassName="GeneralizationItemSemanticEditPolicy"
- createCommandClassName="GeneralizationCreateCommand"
- reorientCommandClassName="GeneralizationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="GeneralizationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.GeneralizationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/specific"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/general"/>
- </modelFacet>
- <labels
- visualID="4"
- editPartClassName="GeneralizationAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="GeneralizationAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/isSubstitutable"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4004"
- editPartClassName="DependencyEditPart"
- itemSemanticEditPolicyClassName="DependencyItemSemanticEditPolicy"
- createCommandClassName="DependencyCreateCommand"
- reorientCommandClassName="DependencyReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="DependencyLink"
- metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
- </modelFacet>
- <labels
- visualID="12"
- editPartClassName="DependencyNameEditPart"
- itemSemanticEditPolicyClassName="DependencyNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editorPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="15"
- editPartClassName="DependencyAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="DependencyAppliedStereotypeItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="4010"
- editPartClassName="DependencyBranchEditPart"
- itemSemanticEditPolicyClassName="DependencyBranchItemSemanticEditPolicy"
- createCommandClassName="DependencyBranchCreateCommand"
- reorientCommandClassName="DependencyBranchReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Dependency_4010"
- displayName="DependencyBranchLink"
- metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
- </modelFacet>
- </links>
- <compartments
- visualID="51"
- editPartClassName="ModelPackageableElementCompartmentEditPart"
- itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"
- title="ModelCompartment"
- canCollapse="false"
- node="/0/@diagram/@topLevelNodes.1"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="38"
- editPartClassName="PackagePackageableElementCompartmentEditPart"
- itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"
- title="PackageableElementCompartment"
- canCollapse="false"
- node="/0/@diagram/@topLevelNodes.2"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="17"
- editPartClassName="DeviceCompositeCompartmentEditPart"
- itemSemanticEditPolicyClassName="DeviceCompositeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DeviceCompositeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.6"
- title="DeviceCompositeCompartment"
- canCollapse="false"
- node="/0/@diagram/@topLevelNodes.6"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCompositeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="18"
- editPartClassName="ExecutionEnvironmentCompositeCompartmentEditPart"
- itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.8"
- title="ExecutionEnvironmentCompositeCompartment"
- canCollapse="false"
- node="/0/@diagram/@topLevelNodes.5"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCompositeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="19"
- editPartClassName="NodeCompositeCompartmentEditPart"
- itemSemanticEditPolicyClassName="NodeCompositeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="NodeCompositeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.6"
- title="CompositeCompartment"
- canCollapse="false"
- node="/0/@diagram/@topLevelNodes.8"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCompositeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="26"
- editPartClassName="ArtifactCompositeCompartmentEditPart"
- itemSemanticEditPolicyClassName="ArtifactCompositeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ArtifactCompositeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.9"
- title="ArtifactCompositeCompartment"
- node="/0/@diagram/@topLevelNodes.7"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCompositeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="52"
- editPartClassName="ModelPackageableElementCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"
- title="ModelCompartment"
- canCollapse="false"
- node="/0/@diagram/@childNodes.0"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="39"
- editPartClassName="PackagePackageableElementCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"
- title="PackageableElementCompartment"
- canCollapse="false"
- node="/0/@diagram/@childNodes.1"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="30"
- editPartClassName="DeviceCompositeCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="DeviceCompositeCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="DeviceCompositeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.6"
- title="DeviceCompositeCompartment"
- node="/0/@diagram/@childNodes.3"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCompositeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="31"
- editPartClassName="ExecutionEnvironmentCompositeCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.4"
- title="ExecutionEnvironmentCompositeCompartment"
- node="/0/@diagram/@childNodes.5"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCompositeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="32"
- editPartClassName="NodeCompositeCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="NodeCompositeCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="NodeCompositeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.8"
- title="CompositeCompartment"
- node="/0/@diagram/@childNodes.7"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCompositeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="33"
- editPartClassName="ArtifactCompositeCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="ArtifactCompositeCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ArtifactCompositeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.9"
- title="ArtifactCompositeCompartment"
- node="/0/@diagram/@childNodes.10"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCompositeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="34"
- editPartClassName="ArtifactCompositeCompartmentEditPartACN"
- itemSemanticEditPolicyClassName="ArtifactCompositeCompartmentItemSemanticEditPolicyACN"
- canonicalEditPolicyClassName="ArtifactCompositeCompartmentCanonicalEditPolicyACN"
- childNodes="/0/@diagram/@childNodes.9"
- title="ArtifactCompositeCompartment"
- node="/0/@diagram/@childNodes.9"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCompositeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <palette>
- <groups
- title="Nodes"
- description="Nodes"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createNodesGroup"
- id="&quot;deployment.group.nodes&quot;">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Model"
- description="Create a model"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
- createMethodName="createModelCreationTool"
- genNodes="/0/@diagram/@childNodes.0 /0/@diagram/@topLevelNodes.1"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Package"
- description="Create a Package"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
- createMethodName="createPackageCreationTool"
- id="&quot;deployment.tool.package&quot;"
- genNodes="/0/@diagram/@topLevelNodes.2 /0/@diagram/@childNodes.1"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Node"
- description="Create new Node"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Node.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Node.gif"
- createMethodName="createNodeCreationTool"
- id="&quot;deployment.tool.node&quot;"
- genNodes="/0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Device"
- description="Create new Device"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Device.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Device.gif"
- createMethodName="createDeviceCreationTool"
- id="&quot;deployment.tool.device&quot;"
- genNodes="/0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Execution Environment"
- description="Create new ExecutionEnvironment"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExecutionEnvironment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExecutionEnvironment.gif"
- createMethodName="createExecutionEnvironmentCreationTool"
- id="&quot;deployment.tool.executionEnvironment&quot;"
- genNodes="/0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Artifact"
- description="Create new Artifact"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Artifact.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Artifact.gif"
- createMethodName="createArtifactCreationTool"
- id="&quot;deployment.tool.artifact&quot;"
- genNodes="/0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Comment"
- description="Create new Comment"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- createMethodName="createCommentCreationTool"
- id="&quot;deployment.tool.comment&quot;"
- genNodes="/0/@diagram/@topLevelNodes.4 /0/@diagram/@childNodes.11"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Constraint"
- description="Create new Constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- createMethodName="createConstraintCreationTool"
- id="&quot;deployment.tool.constraint&quot;"
- genNodes="/0/@diagram/@topLevelNodes.3 /0/@diagram/@childNodes.12"/>
- </groups>
- <groups
- title="Links"
- description="Links"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createLinksGroup"
- id="&quot;deployment.group.links&quot;"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Link"
- description="Create new Link (Comment / Constraint)"
- largeIconPath="icons/obj16/Link.gif"
- smallIconPath="icons/obj16/Link.gif"
- createMethodName="createLinkCreationTool"
- id="&quot;deployment.tool.link&quot;"
- genLinks="/0/@diagram/@links.1 /0/@diagram/@links.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Dependency"
- description="Create new Dependency"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- createMethodName="createDependencyCreationTool"
- id="&quot;deployment.tool.dependency&quot;"
- genLinks="/0/@diagram/@links.6"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="DependencyBranch"
- description="Create a dependency branch"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- createMethodName="createDependencyBranchCreationTool"
- id="&quot;deployment.tool.dependencybranch&quot;"
- genLinks="/0/@diagram/@links.7"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Generalization"
- description="Create new Generalization"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
- createMethodName="createGeneralizationCreationTool"
- id="&quot;deployment.tool.generalization&quot;"
- genLinks="/0/@diagram/@links.5"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Deployment"
- description="Create new Deployment"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Deployment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Deployment.gif"
- createMethodName="createDeploymentCreationTool"
- id="&quot;deployment.tool.deployment&quot;"
- genLinks="/0/@diagram/@links.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Manifestation"
- description="Create new Manifestation"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Manifestation.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Manifestation.gif"
- createMethodName="createManifestationCreationTool"
- id="&quot;deployment.tool.manifestation&quot;"
- genLinks="/0/@diagram/@links.4"/>
- </groups>
- </palette>
- <preferencePages
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.general"
- name="UML Diagram">
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.appearance"
- name="Appearance"
- kind="Appearance"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.connections"
- name="Connections"
- kind="Connections"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.printing"
- name="Printing"
- kind="Printing"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
- name="Rulers And Grid"
- kind="RulersAndGrid"/>
- </preferencePages>
- </diagram>
- <plugin
- iD="org.eclipse.papyrus.uml.diagram.deployment"
- name="Papyrus Deployment Diagram "
- provider="Eclipse Modeling Project"
- version="1.0.1.qualifier">
- <requiredPlugins>org.eclipse.draw2d</requiredPlugins>
- <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
- </plugin>
- <editor
- iconPath="icons/obj16/DeploymentDiagram.gif"/>
- <diagramUpdater/>
- <propertySheet>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="appearance"/>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="diagram"/>
- <tabs
- xsi:type="gmfgen:GenCustomPropertyTab"
- iD="domain"
- label="Core">
- <filter
- xsi:type="gmfgen:TypeTabFilter">
- <types>org.eclipse.gmf.runtime.notation.View</types>
- <types>org.eclipse.gef.EditPart</types>
- <generatedTypes>abstractNavigatorItem</generatedTypes>
- </filter>
- </tabs>
- </propertySheet>
- <domainGenModel
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
- <expressionProviders>
- <providers
- xsi:type="gmfgen:GenExpressionInterpreter">
- <expressions
- body="self.name.concat('.file') "/>
- </providers>
- <providers
- xsi:type="gmfgen:GenJavaExpressionProvider"
- injectExpressionBody="true">
- <expressions
- body="return org.eclipse.papyrus.uml.tools.utils.NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());"/>
- <expressions
- body="// Constraint specification init&#xD;&#xA;org.eclipse.uml2.uml.LiteralString value = org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();&#xD;&#xA;value.setValue(&quot;&quot;);&#xD;&#xA;return value;"/>
- <expressions
- body="// Comment body init&#xD;&#xA;return &quot;&quot;;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="// Creation constraint for TopLevelNodes&#xD;&#xA;&#x9;if(! (getElementToEdit() instanceof org.eclipse.uml2.uml.Package)) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;return true;"/>
- </providers>
- </expressionProviders>
- <labelParsers
- extensibleViaService="true">
- <implementations
- xsi:type="gmfgen:PredefinedParser"
- uses="/0/@diagram/@topLevelNodes.3/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.7/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.8/@labels.0/@modelFacet /0/@diagram/@links.4/@labels.0/@modelFacet /0/@diagram/@links.6/@labels.0/@modelFacet /0/@diagram/@links.3/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.6/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.9/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.2/@labels.0/@modelFacet /0/@diagram/@childNodes.1/@labels.0/@modelFacet /0/@diagram/@childNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.3/@labels.0/@modelFacet /0/@diagram/@childNodes.5/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.1/@labels.0/@modelFacet /0/@diagram/@childNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@topLevelNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.11/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.5/@labels.0/@modelFacet /0/@diagram/@links.4/@labels.1/@modelFacet /0/@diagram/@links.6/@labels.1/@modelFacet /0/@diagram/@links.3/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@topLevelNodes.3/@labels.1/@modelFacet /0/@diagram/@childNodes.12/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
- </labelParsers>
- <contextMenus
- context="/0/@diagram">
- <items
- xsi:type="gmfgen:LoadResourceAction"/>
- </contextMenus>
- </gmfgen:GenEditorGenerator>
- <papyrusgmfgenextension:PapyrusExtensionRootNode
- comment="Papyrus specific extension for GMFGen">
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Manages stereotype shown with External Label"
- genView="/0/@diagram/@links.5/@labels.0 /0/@diagram/@links.3/@labels.1 /0/@diagram/@links.4/@labels.1 /0/@diagram/@links.6/@labels.1"
- name="EP_Stereotypes_EXT_NODE"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Add super class to a Comment edit parts"
- genView="/0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.4"
- name="EP_Comment_NODE"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Add super class to a Constraint edit parts"
- genView="/0/@diagram/@childNodes.12 /0/@diagram/@topLevelNodes.3"
- name="EP_Constraint_NODE"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Label in charge to display applied stereotypes on links"
- genView="/0/@diagram/@links.3 /0/@diagram/@links.4 /0/@diagram/@links.6 /0/@diagram/@links.5 /0/@diagram/@links.7"
- name="ExtendedUMLLinks"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="adding to manange NamedElement"
- genView="/0/@diagram /0/@diagram/@childNodes.1 /0/@diagram/@topLevelNodes.2 /0/@diagram/@childNodes.0 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.9 /0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.6 /0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.2 /0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.4"
- name="NamedElementEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:GenNodeConstraint"
- comment="Creation constraint for TopLevelNode in virtual canvas"
- genNode="/0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.6 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.8"
- genConstraint="/0/@expressionProviders/@providers.1/@expressions.3"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:AdditionalEditPartCandies"
- comment="Indicate specific BaseEditHelper in place of generated EditHelper"
- baseEditHelperPackage="org.eclipse.papyrus.uml.diagram.common.helper"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:EditPartUsingDeleteService"
- comment="The delete service is used on every TopNode Childnode and Link"
- name="Every TopNode ChildNode Link"
- genView="/0/@diagram/@topLevelNodes.0 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.6 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.1 /0/@diagram/@links.3 /0/@diagram/@links.4 /0/@diagram/@links.5 /0/@diagram/@links.6 /0/@diagram/@links.7 /0/@diagram/@links.1 /0/@diagram/@links.2"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:EditPartUsingReorientService"
- comment="Use the edit service for reorient command (All DirectedRelationship)"
- name="DirectedRelationship"
- genView="/0/@diagram/@links.3 /0/@diagram/@links.4 /0/@diagram/@links.5 /0/@diagram/@links.6 /0/@diagram/@links.7"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Name"
- role="Name"
- linkLabels="/0/@diagram/@links.3/@labels.0 /0/@diagram/@links.4/@labels.0 /0/@diagram/@links.6/@labels.0"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Stereotype"
- role="Stereotype"
- linkLabels="/0/@diagram/@links.5/@labels.0 /0/@diagram/@links.3/@labels.1 /0/@diagram/@links.4/@labels.1 /0/@diagram/@links.6/@labels.1"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:CompartmentTitleVisibilityPreference"
- comment="Hidden Compartments Titles"
- visibleByDefault="false"
- compartments="/0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.1 /0/@diagram/@compartments.7 /0/@diagram/@compartments.0 /0/@diagram/@compartments.6"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:CompartmentVisibilityPreference"
- comment="Hidden Compartments"
- visibleByDefault="false"
- compartments="/0/@diagram/@compartments.5 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12"/>
- </papyrusgmfgenextension:PapyrusExtensionRootNode>
-</xmi:XMI>
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
+ xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
+ <gmfgen:GenEditorGenerator
+ packageNamePrefix="org.eclipse.papyrus.uml.diagram.deployment"
+ modelID="PapyrusUMLDeploymentDiagram"
+ diagramFileExtension="PapyrusUMLDeployment_diagram"
+ domainFileExtension="umlDeployment"
+ dynamicTemplates="true"
+ templateDirectory="/org.eclipse.papyrus.def/xtend/"
+ copyrightText="Copyright (c) 2014 CEA LIST.&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation"
+ pluginDirectory="/org.eclipse.papyrus.uml.diagram.deployment/src">
+ <diagram
+ visualID="1000"
+ editPartClassName="DeploymentDiagramEditPart"
+ itemSemanticEditPolicyClassName="DeploymentDiagramItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ModelCanonicalEditPolicy"
+ iconProviderPriority="Low"
+ creationWizardIconPath="icons/obj16/DeploymentDiagram.gif"
+ validationProviderPriority="Low"
+ validationEnabled="true"
+ validationDecorators="true"
+ liveValidationUIFeedback="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Package_1000"
+ displayName="DeploymentDiagram"
+ editHelperClassName="ModelEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <domainDiagramElement
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <childNodes
+ visualID="49"
+ editPartClassName="ModelEditPartCN"
+ itemSemanticEditPolicyClassName="ModelItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ModelCanonicalEditPolicyCN"
+ compartments="/0/@diagram/@compartments.6"
+ graphicalNodeEditPolicyClassName="ModelGraphicalNodeEditPolicyCN"
+ createCommandClassName="ModelCreateCommandCN"
+ containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.6 /0/@diagram/@compartments.1">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Model_49"
+ displayName="Model"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="150"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Model"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="50"
+ editPartClassName="ModelNameEditPartCN"
+ itemSemanticEditPolicyClassName="ModelNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="36"
+ editPartClassName="PackageEditPartCN"
+ itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="PackageCanonicalEditPolicyCN"
+ compartments="/0/@diagram/@compartments.7"
+ graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicyCN"
+ createCommandClassName="PackageCreateCommandCN"
+ containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.7 /0/@diagram/@compartments.0 /0/@diagram/@compartments.6">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="150"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="37"
+ editPartClassName="PackageNameEditPartCN"
+ itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicyCN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="16"
+ editPartClassName="DeviceEditPartCN"
+ itemSemanticEditPolicyClassName="DeviceItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="DeviceCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="DeviceGraphicalNodeEditPolicyCN"
+ createCommandClassName="DeviceCreateCommandCN"
+ containers="/0/@diagram/@compartments.4 /0/@diagram/@compartments.10 /0/@diagram/@compartments.2 /0/@diagram/@compartments.8">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Device_16"
+ displayName="Device"
+ metamodelType="/0/@diagram/@topLevelNodes.6/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Device"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node/nestedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node/nestedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="20"
+ editPartClassName="DeviceNameEditPartCN"
+ itemSemanticEditPolicyClassName="DeviceNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="44"
+ editPartClassName="NestedDeviceEditPartCN"
+ itemSemanticEditPolicyClassName="NestedDeviceItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="NestedDeviceCanonicalEditPolicyCN"
+ compartments="/0/@diagram/@compartments.8"
+ graphicalNodeEditPolicyClassName="NestedDeviceGraphicalNodeEditPolicyCN"
+ createCommandClassName="NestedDeviceCreateCommandCN"
+ containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.7 /0/@diagram/@compartments.0 /0/@diagram/@compartments.6">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Device_44"
+ displayName="Device"
+ metamodelType="/0/@diagram/@topLevelNodes.6/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Device"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="45"
+ editPartClassName="NestedDeviceNameEditPartCN"
+ itemSemanticEditPolicyClassName="NestedDeviceNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="21"
+ editPartClassName="ExecutionEnvironmentEditPartCN"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ExecutionEnvironmentCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="ExecutionEnvironmentGraphicalNodeEditPolicyCN"
+ createCommandClassName="ExecutionEnvironmentCreateCommandCN"
+ containers="/0/@diagram/@compartments.4 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_21"
+ displayName="ExecutionEnvironment"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExecutionEnvironment"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node/nestedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node/nestedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="22"
+ editPartClassName="ExecutionEnvironmentNameEditPartCN"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="46"
+ editPartClassName="NestedExecutionEnvironmentEditPartCN"
+ itemSemanticEditPolicyClassName="NestedExecutionEnvironmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="NestedExecutionEnvironmentCanonicalEditPolicyCN"
+ compartments="/0/@diagram/@compartments.9"
+ graphicalNodeEditPolicyClassName="NestedExecutionEnvironmentGraphicalNodeEditPolicyCN"
+ createCommandClassName="NestedExecutionEnvironmentCreateCommandCN"
+ containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.7 /0/@diagram/@compartments.0 /0/@diagram/@compartments.6">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_46"
+ displayName="ExecutionEnvironment"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExecutionEnvironment"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="47"
+ editPartClassName="NestedExecutionEnvironmentNameEditPartCN"
+ itemSemanticEditPolicyClassName="NestedExecutionEnvironmentNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="23"
+ editPartClassName="NodeEditPartCN"
+ itemSemanticEditPolicyClassName="NodeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="NodeCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="NodeGraphicalNodeEditPolicyCN"
+ createCommandClassName="NodeCreateCommandCN"
+ containers="/0/@diagram/@compartments.4 /0/@diagram/@compartments.10 /0/@diagram/@compartments.2 /0/@diagram/@compartments.8">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ displayName="Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="150"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node/nestedNode"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node/nestedNode"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="24"
+ editPartClassName="NodeNameEditPartCN"
+ itemSemanticEditPolicyClassName="NodeNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="42"
+ editPartClassName="NestedNodeEditPartCN"
+ itemSemanticEditPolicyClassName="NestedNodeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="NestedNodeCanonicalEditPolicyCN"
+ compartments="/0/@diagram/@compartments.10"
+ graphicalNodeEditPolicyClassName="NestedNodeGraphicalNodeEditPolicyCN"
+ createCommandClassName="NestedNodeCreateCommandCN"
+ containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.7 /0/@diagram/@compartments.0 /0/@diagram/@compartments.6">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ displayName="Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="150"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="43"
+ editPartClassName="NestedNodeNameEditPart"
+ itemSemanticEditPolicyClassName="NestedNodeNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="25"
+ editPartClassName="ArtifactEditPartCN"
+ itemSemanticEditPolicyClassName="ArtifactItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ArtifactCanonicalEditPolicyCN"
+ compartments="/0/@diagram/@compartments.11"
+ graphicalNodeEditPolicyClassName="ArtifactGraphicalNodeEditPolicyCN"
+ createCommandClassName="ArtifactCreateCommandCN"
+ containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Artifact_25"
+ displayName="Artifact"
+ metamodelType="/0/@diagram/@topLevelNodes.7/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="70"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/fileName"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="27"
+ editPartClassName="ArtifactNameEditPartCN"
+ itemSemanticEditPolicyClassName="ArtifactNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="59"
+ editPartClassName="ArtifactFloatingLabelEditPartCN"
+ itemSemanticEditPolicyClassName="ArtifactFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="28"
+ editPartClassName="ArtifactEditPartACN"
+ itemSemanticEditPolicyClassName="ArtifactItemSemanticEditPolicyACN"
+ canonicalEditPolicyClassName="ArtifactCanonicalEditPolicyACN"
+ compartments="/0/@diagram/@compartments.12"
+ graphicalNodeEditPolicyClassName="ArtifactGraphicalNodeEditPolicyACN"
+ createCommandClassName="ArtifactCreateCommandACN"
+ containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ displayName="Artifact"
+ metamodelType="/0/@diagram/@topLevelNodes.7/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="70"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/nestedArtifact"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/fileName"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="29"
+ editPartClassName="ArtifactNameEditPartACN"
+ itemSemanticEditPolicyClassName="ArtifactNameItemSemanticEditPolicyACN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="60"
+ editPartClassName="ArtifactFloatingLabelEditPartACN"
+ itemSemanticEditPolicyClassName="ArtifactFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="40"
+ editPartClassName="NestedArtifactNodeEditPartCN"
+ itemSemanticEditPolicyClassName="NestedArtifactNodeItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="NestedArtifactCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="NestedArtifactNodeGraphicalNodeEditPolicyCN"
+ createCommandClassName="NestedArtifactNodeCreateCommandCN"
+ containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.7 /0/@diagram/@compartments.0 /0/@diagram/@compartments.6">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ displayName="Artifact"
+ metamodelType="/0/@diagram/@topLevelNodes.7/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="70"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/fileName"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="41"
+ editPartClassName="NestedArtifactNameEditPart"
+ itemSemanticEditPolicyClassName="NestedArtifactNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="54"
+ editPartClassName="CommentEditPartCN"
+ itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="CommentCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyCN"
+ createCommandClassName="CommentCreateCommandCN"
+ containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="CommentEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.2">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="55"
+ editPartClassName="CommentBodyEditPartCN"
+ itemSemanticEditPolicyClassName="CommentBodyEditPartCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCornerBentFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="56"
+ editPartClassName="ConstraintEditPartCN"
+ itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyCN"
+ createCommandClassName="ConstraintCreateCommandCN"
+ containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ConstraintEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.1">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="57"
+ editPartClassName="ConstraintNameEditPartCN"
+ itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="58"
+ editPartClassName="ConstraintSpecificationEditPartCN"
+ itemSemanticEditPolicyClassName="ConstraintSpecificationItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <editableMetaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <topLevelNodes
+ visualID="2011"
+ editPartClassName="DependencyNodeEditPart"
+ itemSemanticEditPolicyClassName="DependencyNodeItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DependencyNodeCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DependencyNodeGraphicalNodeEditPolicy"
+ createCommandClassName="DependencyNodeCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Dependency_2011"
+ displayName="DependencyNode"
+ editHelperClassName="DependencyEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DependencyNodeFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="10"
+ height="10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="7"
+ editPartClassName="MultiDependencyLabelEditPart"
+ itemSemanticEditPolicyClassName="MultiDependencyLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2010"
+ compartments="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Model_2010"
+ displayName="Model"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="150"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Model"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="48"
+ editPartClassName="ModelNameEditPart"
+ itemSemanticEditPolicyClassName="ModelNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2009"
+ editPartClassName="PackageEditPart"
+ itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PackageCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.1"
+ graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicy"
+ createCommandClassName="PackageCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="150"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="35"
+ editPartClassName="PackageNameEditPart"
+ itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2005"
+ editPartClassName="ConstraintEditPart"
+ itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ConstraintCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicy"
+ createCommandClassName="ConstraintCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ConstraintEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.1">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="2"
+ editPartClassName="ConstraintNameEditPart"
+ itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="3"
+ editPartClassName="ConstraintSpecificationEditPart"
+ itemSemanticEditPolicyClassName="ConstraintSpecificationItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <editableMetaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2001"
+ editPartClassName="CommentEditPart"
+ itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="CommentCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicy"
+ createCommandClassName="CommentCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="CommentEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.2">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="1"
+ editPartClassName="CommentBodyEditPart"
+ itemSemanticEditPolicyClassName="CommentBodyEditPart">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCornerBentFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2002"
+ editPartClassName="ExecutionEnvironmentEditPart"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ExecutionEnvironmentCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.3"
+ graphicalNodeEditPolicyClassName="ExecutionEnvironmentGraphicalNodeEditPolicy"
+ createCommandClassName="ExecutionEnvironmentCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ExecutionEnvironmentEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExecutionEnvironment"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5"
+ editPartClassName="ExecutionEnvironmentNameEditPart"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2003"
+ editPartClassName="DeviceEditPart"
+ itemSemanticEditPolicyClassName="DeviceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DeviceCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.2"
+ graphicalNodeEditPolicyClassName="DeviceGraphicalNodeEditPolicy"
+ createCommandClassName="DeviceCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="DeviceEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Device"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="6"
+ editPartClassName="DeviceNameEditPart"
+ itemSemanticEditPolicyClassName="DeviceNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2006"
+ editPartClassName="ArtifactEditPart"
+ itemSemanticEditPolicyClassName="ArtifactItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ArtifactCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.5"
+ graphicalNodeEditPolicyClassName="ArtifactGraphicalNodeEditPolicy"
+ createCommandClassName="ArtifactCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ArtifactEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="70"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/fileName"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="8"
+ editPartClassName="ArtifactNameEditPart"
+ itemSemanticEditPolicyClassName="ArtifactNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="61"
+ editPartClassName="ArtifactFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="ArtifactFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2008"
+ compartments="/0/@diagram/@compartments.4">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="NodeEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="150"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;REMOVE_ORPHAN_VIEW&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RESIZE_BORDER_ITEMS&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Node"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="9"
+ editPartClassName="NodeNameEditPart"
+ itemSemanticEditPolicyClassName="NodeNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2012"
+ editPartClassName="DefaultNamedElementEditPart"
+ itemSemanticEditPolicyClassName="DefaultNamedElementItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DefaultNamedElementCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DefaultNamedElementGraphicalNodeEditPolicy"
+ createCommandClassName="DefaultNamedElementCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.NamedElement_2012"
+ displayName="DefaultNamedElement"
+ editHelperClassName="DefaultNamedElementEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="50"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.DeploymentDiagramChangeStereotypedShapeEditpolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.itemsemantic.CustomDefaultNamedElementItemSemanticEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ </modelFacet>
+ <labels
+ visualID="53"
+ editPartClassName="DefaultNamedElementNameEditPart"
+ itemSemanticEditPolicyClassName="DefaultNamedElementNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <links
+ visualID="4005"
+ editPartClassName="LinkDescriptorEditPart"
+ itemSemanticEditPolicyClassName="LinkDescriptorItemSemanticEditPolicy"
+ createCommandClassName="LinkDescriptorCreateCommand"
+ reorientCommandClassName="LinkDescriptorReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:NotationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ </links>
+ <links
+ visualID="4008"
+ editPartClassName="CommentAnnotatedElementEditPart"
+ itemSemanticEditPolicyClassName="CommentAnnotatedElementItemSemanticEditPolicy"
+ createCommandClassName="CommentAnnotatedElementCreateCommand"
+ reorientCommandClassName="CommentAnnotatedElementReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.CommentAnnotatedElement_4006"
+ displayName="CommentAnnotatedElement"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4009"
+ editPartClassName="ConstraintConstrainedElementEditPart"
+ itemSemanticEditPolicyClassName="ConstraintConstrainedElementItemSemanticEditPolicy"
+ createCommandClassName="ConstraintConstrainedElementCreateCommand"
+ reorientCommandClassName="ConstraintConstrainedElementReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.ConstraintConstrainedElement_4007"
+ displayName="ConstraintConstrainedElement"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4001"
+ editPartClassName="DeploymentEditPart"
+ itemSemanticEditPolicyClassName="DeploymentItemSemanticEditPolicy"
+ createCommandClassName="DeploymentCreateCommand"
+ reorientCommandClassName="DeploymentReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="DeploymentEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeDeploymentLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Deployment"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DeploymentTarget/deployment"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DeploymentTarget/deployment"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ </modelFacet>
+ <labels
+ visualID="13"
+ editPartClassName="DeploymentNameEditPart"
+ itemSemanticEditPolicyClassName="DeploymentNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="14"
+ editPartClassName="DeploymentAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="DeploymentAppliedStereotypeItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.2"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4002"
+ editPartClassName="ManifestationEditPart"
+ itemSemanticEditPolicyClassName="ManifestationItemSemanticEditPolicy"
+ createCommandClassName="ManifestationCreateCommand"
+ reorientCommandClassName="ManifestationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ManifestationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeManifestationLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Manifestation"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/manifestation"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Artifact/manifestation"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ </modelFacet>
+ <labels
+ visualID="10"
+ editPartClassName="ManifestationNameEditPart"
+ itemSemanticEditPolicyClassName="ManifestationNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="11"
+ editPartClassName="ManifestationAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ManifestationAppliedStereotypeItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="30"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.2"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4003"
+ editPartClassName="GeneralizationEditPart"
+ itemSemanticEditPolicyClassName="GeneralizationItemSemanticEditPolicy"
+ createCommandClassName="GeneralizationCreateCommand"
+ reorientCommandClassName="GeneralizationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="GeneralizationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.GeneralizationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/specific"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/general"/>
+ </modelFacet>
+ <labels
+ visualID="4"
+ editPartClassName="GeneralizationAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="GeneralizationAppliedStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.2"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/isSubstitutable"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4004"
+ editPartClassName="DependencyEditPart"
+ itemSemanticEditPolicyClassName="DependencyItemSemanticEditPolicy"
+ createCommandClassName="DependencyCreateCommand"
+ reorientCommandClassName="DependencyReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ displayName="DependencyLink"
+ metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ </modelFacet>
+ <labels
+ visualID="12"
+ editPartClassName="DependencyNameEditPart"
+ itemSemanticEditPolicyClassName="DependencyNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editorPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="15"
+ editPartClassName="DependencyAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="DependencyAppliedStereotypeItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.2"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="4010"
+ editPartClassName="DependencyBranchEditPart"
+ itemSemanticEditPolicyClassName="DependencyBranchItemSemanticEditPolicy"
+ createCommandClassName="DependencyBranchCreateCommand"
+ reorientCommandClassName="DependencyBranchReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.deployment.Dependency_4010"
+ displayName="DependencyBranchLink"
+ metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ </modelFacet>
+ </links>
+ <compartments
+ visualID="51"
+ editPartClassName="ModelPackageableElementCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"
+ title="ModelCompartment"
+ canCollapse="false"
+ node="/0/@diagram/@topLevelNodes.1"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPackageableElementFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="38"
+ editPartClassName="PackagePackageableElementCompartmentEditPart"
+ itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"
+ title="PackageableElementCompartment"
+ canCollapse="false"
+ node="/0/@diagram/@topLevelNodes.2"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPackageableElementFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="17"
+ editPartClassName="DeviceCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="DeviceCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DeviceCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.6"
+ title="DeviceCompositeCompartment"
+ canCollapse="false"
+ node="/0/@diagram/@topLevelNodes.6"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="18"
+ editPartClassName="ExecutionEnvironmentCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.8"
+ title="ExecutionEnvironmentCompositeCompartment"
+ canCollapse="false"
+ node="/0/@diagram/@topLevelNodes.5"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="19"
+ editPartClassName="NodeCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="NodeCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="NodeCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.6"
+ title="CompositeCompartment"
+ canCollapse="false"
+ node="/0/@diagram/@topLevelNodes.8"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="26"
+ editPartClassName="ArtifactCompositeCompartmentEditPart"
+ itemSemanticEditPolicyClassName="ArtifactCompositeCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ArtifactCompositeCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.9"
+ title="ArtifactCompositeCompartment"
+ node="/0/@diagram/@topLevelNodes.7"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="52"
+ editPartClassName="ModelPackageableElementCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"
+ title="ModelCompartment"
+ canCollapse="false"
+ node="/0/@diagram/@childNodes.0"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPackageableElementFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="39"
+ editPartClassName="PackagePackageableElementCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"
+ title="PackageableElementCompartment"
+ canCollapse="false"
+ node="/0/@diagram/@childNodes.1"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPackageableElementFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="30"
+ editPartClassName="DeviceCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="DeviceCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="DeviceCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.6"
+ title="DeviceCompositeCompartment"
+ node="/0/@diagram/@childNodes.3"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="31"
+ editPartClassName="ExecutionEnvironmentCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.4"
+ title="ExecutionEnvironmentCompositeCompartment"
+ node="/0/@diagram/@childNodes.5"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="32"
+ editPartClassName="NodeCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="NodeCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="NodeCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.8"
+ title="CompositeCompartment"
+ node="/0/@diagram/@childNodes.7"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="33"
+ editPartClassName="ArtifactCompositeCompartmentEditPartCN"
+ itemSemanticEditPolicyClassName="ArtifactCompositeCompartmentItemSemanticEditPolicyCN"
+ canonicalEditPolicyClassName="ArtifactCompositeCompartmentCanonicalEditPolicyCN"
+ childNodes="/0/@diagram/@childNodes.9"
+ title="ArtifactCompositeCompartment"
+ node="/0/@diagram/@childNodes.8"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="34"
+ editPartClassName="ArtifactCompositeCompartmentEditPartACN"
+ itemSemanticEditPolicyClassName="ArtifactCompositeCompartmentItemSemanticEditPolicyACN"
+ canonicalEditPolicyClassName="ArtifactCompositeCompartmentCanonicalEditPolicyACN"
+ childNodes="/0/@diagram/@childNodes.9"
+ title="ArtifactCompositeCompartment"
+ node="/0/@diagram/@childNodes.9"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCompositeCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
+ </compartments>
+ <palette>
+ <groups
+ title="Nodes"
+ description="Nodes"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createNodesGroup"
+ id="&quot;deployment.group.nodes&quot;">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Model"
+ description="Create a model"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
+ createMethodName="createModelCreationTool"
+ genNodes="/0/@diagram/@childNodes.0 /0/@diagram/@topLevelNodes.1"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Package"
+ description="Create a Package"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
+ createMethodName="createPackageCreationTool"
+ id="&quot;deployment.tool.package&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.2 /0/@diagram/@childNodes.1"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Node"
+ description="Create new Node"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Node.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Node.gif"
+ createMethodName="createNodeCreationTool"
+ id="&quot;deployment.tool.node&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Device"
+ description="Create new Device"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Device.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Device.gif"
+ createMethodName="createDeviceCreationTool"
+ id="&quot;deployment.tool.device&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Execution Environment"
+ description="Create new ExecutionEnvironment"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExecutionEnvironment.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExecutionEnvironment.gif"
+ createMethodName="createExecutionEnvironmentCreationTool"
+ id="&quot;deployment.tool.executionEnvironment&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Artifact"
+ description="Create new Artifact"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Artifact.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Artifact.gif"
+ createMethodName="createArtifactCreationTool"
+ id="&quot;deployment.tool.artifact&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Comment"
+ description="Create new Comment"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ createMethodName="createCommentCreationTool"
+ id="&quot;deployment.tool.comment&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.4 /0/@diagram/@childNodes.11"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Constraint"
+ description="Create new Constraint"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ createMethodName="createConstraintCreationTool"
+ id="&quot;deployment.tool.constraint&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.3 /0/@diagram/@childNodes.12"/>
+ </groups>
+ <groups
+ title="Links"
+ description="Links"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createLinksGroup"
+ id="&quot;deployment.group.links&quot;"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Link"
+ description="Create new Link (Comment / Constraint)"
+ largeIconPath="icons/obj16/Link.gif"
+ smallIconPath="icons/obj16/Link.gif"
+ createMethodName="createLinkCreationTool"
+ id="&quot;deployment.tool.link&quot;"
+ genLinks="/0/@diagram/@links.1 /0/@diagram/@links.2"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Dependency"
+ description="Create new Dependency"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ createMethodName="createDependencyCreationTool"
+ id="&quot;deployment.tool.dependency&quot;"
+ genLinks="/0/@diagram/@links.6"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="DependencyBranch"
+ description="Create a dependency branch"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ createMethodName="createDependencyBranchCreationTool"
+ id="&quot;deployment.tool.dependencybranch&quot;"
+ genLinks="/0/@diagram/@links.7"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Generalization"
+ description="Create new Generalization"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
+ createMethodName="createGeneralizationCreationTool"
+ id="&quot;deployment.tool.generalization&quot;"
+ genLinks="/0/@diagram/@links.5"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Deployment"
+ description="Create new Deployment"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Deployment.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Deployment.gif"
+ createMethodName="createDeploymentCreationTool"
+ id="&quot;deployment.tool.deployment&quot;"
+ genLinks="/0/@diagram/@links.3"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Manifestation"
+ description="Create new Manifestation"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Manifestation.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Manifestation.gif"
+ createMethodName="createManifestationCreationTool"
+ id="&quot;deployment.tool.manifestation&quot;"
+ genLinks="/0/@diagram/@links.4"/>
+ </groups>
+ </palette>
+ <preferencePages
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.general"
+ name="UML Diagram">
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.appearance"
+ name="Appearance"
+ kind="Appearance"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.connections"
+ name="Connections"
+ kind="Connections"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.printing"
+ name="Printing"
+ kind="Printing"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
+ name="Rulers And Grid"
+ kind="RulersAndGrid"/>
+ </preferencePages>
+ </diagram>
+ <plugin
+ iD="org.eclipse.papyrus.uml.diagram.deployment"
+ name="Papyrus Deployment Diagram "
+ provider="Eclipse Modeling Project"
+ version="1.1.0.qualifier">
+ <requiredPlugins>org.eclipse.draw2d</requiredPlugins>
+ <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
+ </plugin>
+ <editor
+ iconPath="icons/obj16/DeploymentDiagram.gif"/>
+ <diagramUpdater/>
+ <propertySheet>
+ <tabs
+ xsi:type="gmfgen:GenStandardPropertyTab"
+ iD="appearance"/>
+ <tabs
+ xsi:type="gmfgen:GenStandardPropertyTab"
+ iD="diagram"/>
+ <tabs
+ xsi:type="gmfgen:GenCustomPropertyTab"
+ iD="domain"
+ label="Core">
+ <filter
+ xsi:type="gmfgen:TypeTabFilter">
+ <types>org.eclipse.gmf.runtime.notation.View</types>
+ <types>org.eclipse.gef.EditPart</types>
+ <generatedTypes>abstractNavigatorItem</generatedTypes>
+ </filter>
+ </tabs>
+ </propertySheet>
+ <domainGenModel
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
+ <expressionProviders>
+ <providers
+ xsi:type="gmfgen:GenExpressionInterpreter">
+ <expressions
+ body="self.name.concat('.file') "/>
+ </providers>
+ <providers
+ xsi:type="gmfgen:GenJavaExpressionProvider"
+ injectExpressionBody="true">
+ <expressions
+ body="return org.eclipse.papyrus.uml.tools.utils.NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());"/>
+ <expressions
+ body="// Constraint specification init&#xD;&#xA;org.eclipse.uml2.uml.LiteralString value = org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();&#xD;&#xA;value.setValue(&quot;&quot;);&#xD;&#xA;return value;"/>
+ <expressions
+ body="// Comment body init&#xD;&#xA;return &quot;&quot;;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="// Creation constraint for TopLevelNodes&#xD;&#xA;&#x9;if(! (getElementToEdit() instanceof org.eclipse.uml2.uml.Package)) {&#xD;&#xA;&#x9;&#x9;return false;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;return true;"/>
+ </providers>
+ </expressionProviders>
+ <labelParsers
+ extensibleViaService="true">
+ <implementations
+ xsi:type="gmfgen:PredefinedParser"
+ uses="/0/@diagram/@topLevelNodes.3/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.7/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.8/@labels.0/@modelFacet /0/@diagram/@links.4/@labels.0/@modelFacet /0/@diagram/@links.6/@labels.0/@modelFacet /0/@diagram/@links.3/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.6/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.9/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.2/@labels.0/@modelFacet /0/@diagram/@childNodes.1/@labels.0/@modelFacet /0/@diagram/@childNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.3/@labels.0/@modelFacet /0/@diagram/@childNodes.5/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.1/@labels.0/@modelFacet /0/@diagram/@childNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labels.1/@modelFacet /0/@diagram/@childNodes.9/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.7/@labels.1/@modelFacet"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@topLevelNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.11/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.5/@labels.0/@modelFacet /0/@diagram/@links.4/@labels.1/@modelFacet /0/@diagram/@links.6/@labels.1/@modelFacet /0/@diagram/@links.3/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@topLevelNodes.3/@labels.1/@modelFacet /0/@diagram/@childNodes.12/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
+ </labelParsers>
+ <contextMenus
+ context="/0/@diagram">
+ <items
+ xsi:type="gmfgen:LoadResourceAction"/>
+ </contextMenus>
+ </gmfgen:GenEditorGenerator>
+ <papyrusgmfgenextension:PapyrusExtensionRootNode
+ comment="Papyrus specific extension for GMFGen">
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Manages stereotype shown with External Label"
+ genView="/0/@diagram/@links.5/@labels.0 /0/@diagram/@links.3/@labels.1 /0/@diagram/@links.4/@labels.1 /0/@diagram/@links.6/@labels.1"
+ name="EP_Stereotypes_EXT_NODE"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Add super class to a Comment edit parts"
+ genView="/0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.4"
+ name="EP_Comment_NODE"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Add super class to a Constraint edit parts"
+ genView="/0/@diagram/@childNodes.12 /0/@diagram/@topLevelNodes.3"
+ name="EP_Constraint_NODE"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Label in charge to display applied stereotypes on links"
+ genView="/0/@diagram/@links.3 /0/@diagram/@links.4 /0/@diagram/@links.6 /0/@diagram/@links.5 /0/@diagram/@links.7"
+ name="ExtendedUMLLinks"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="adding to manange NamedElement"
+ genView="/0/@diagram /0/@diagram/@childNodes.1 /0/@diagram/@topLevelNodes.2 /0/@diagram/@childNodes.0 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.9 /0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.6 /0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.2 /0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.4"
+ name="NamedElementEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:GenNodeConstraint"
+ comment="Creation constraint for TopLevelNode in virtual canvas"
+ genNode="/0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.6 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.8"
+ genConstraint="/0/@expressionProviders/@providers.1/@expressions.3"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:AdditionalEditPartCandies"
+ comment="Indicate specific BaseEditHelper in place of generated EditHelper"
+ baseEditHelperPackage="org.eclipse.papyrus.uml.diagram.common.helper"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:EditPartUsingDeleteService"
+ comment="The delete service is used on every TopNode Childnode and Link"
+ name="Every TopNode ChildNode Link"
+ genView="/0/@diagram/@topLevelNodes.0 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.6 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.1 /0/@diagram/@links.3 /0/@diagram/@links.4 /0/@diagram/@links.5 /0/@diagram/@links.6 /0/@diagram/@links.7 /0/@diagram/@links.1 /0/@diagram/@links.2"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:EditPartUsingReorientService"
+ comment="Use the edit service for reorient command (All DirectedRelationship)"
+ name="DirectedRelationship"
+ genView="/0/@diagram/@links.3 /0/@diagram/@links.4 /0/@diagram/@links.5 /0/@diagram/@links.6 /0/@diagram/@links.7"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="Name"
+ role="Name"
+ linkLabels="/0/@diagram/@links.3/@labels.0 /0/@diagram/@links.4/@labels.0 /0/@diagram/@links.6/@labels.0"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="Stereotype"
+ role="Stereotype"
+ linkLabels="/0/@diagram/@links.5/@labels.0 /0/@diagram/@links.3/@labels.1 /0/@diagram/@links.4/@labels.1 /0/@diagram/@links.6/@labels.1"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:CompartmentTitleVisibilityPreference"
+ comment="Hidden Compartments Titles"
+ visibleByDefault="false"
+ compartments="/0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.1 /0/@diagram/@compartments.7 /0/@diagram/@compartments.0 /0/@diagram/@compartments.6"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:CompartmentVisibilityPreference"
+ comment="Hidden Compartments"
+ visibleByDefault="false"
+ compartments="/0/@diagram/@compartments.5 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add superclass for floating Label"
+ genView="/0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@topLevelNodes.7/@labels.1 /0/@diagram/@childNodes.8/@labels.1"
+ name="FloatingLabelEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment=""
+ genView="/0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.8"
+ name="RoundedCompartmentEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
+ comment="Locator for external Floating label of RoundedCompartment EP"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator"
+ genExternalNodeLabel="/0/@diagram/@topLevelNodes.7/@labels.1 /0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@childNodes.8/@labels.1"/>
+ </papyrusgmfgenextension:PapyrusExtensionRootNode>
+</xmi:XMI>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/plugin.xml
index a3d89521010..9998099d715 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/plugin.xml
@@ -91,803 +91,803 @@
</creationCommand>
</extension>
- <extension point="org.eclipse.ui.contexts" id="ui-context">
- <?gmfgen generated="true"?>
- <context
- description="%context.description"
- id="org.eclipse.papyrus.uml.diagram.deployment.ui.diagramContext"
- name="%context.name"
- parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
- </context>
- </extension>
+ <extension point="org.eclipse.ui.contexts" id="ui-context">
+ <?gmfgen generated="true"?>
+ <context
+ description="%context.description"
+ id="org.eclipse.papyrus.uml.diagram.deployment.ui.diagramContext"
+ name="%context.name"
+ parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
+ </context>
+ </extension>
- <extension point="org.eclipse.ui.menus" id="context-menus">
- <?gmfgen generated="true"?>
- <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
- </menuContribution>
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
- </menuContribution -->
- <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
- <command commandId="org.eclipse.papyrus.uml.diagram.deployment.LoadResourceAction">
- <visibleWhen>
- <and>
- <with variable="activePartId"><equals value="org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorID"/></with>
- <with variable="selection"><iterate ifEmpty="false">
- <instanceof value="org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart"/>
- </iterate></with>
- </and>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
-
- <extension point="org.eclipse.ui.commands" id="menu-commands">
- <?gmfgen generated="true"?>
- <category id="org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
- <command id="org.eclipse.papyrus.uml.diagram.deployment.LoadResourceAction"
- name="Load Resource"
- categoryId="org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorID"
- defaultHandler="org.eclipse.papyrus.uml.diagram.deployment.part.LoadResourceAction"/>
- </extension>
-
-<extension
- id="Papyrus Deployment Diagram .palettedefinition"
- name="Papyrus Deployment Diagram Predefined Entries"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Lowest"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.deployment.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
-
- <entry
- defineOnly="true"
- description="Create a model"
- id="createModelCreationTool"
- kind="tool"
- label="Model"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a Package"
- id="deployment.tool.package"
- kind="tool"
- label="Package"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Node"
- id="deployment.tool.node"
- kind="tool"
- label="Node"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Node.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Node.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Device"
- id="deployment.tool.device"
- kind="tool"
- label="Device"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Device.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Device.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new ExecutionEnvironment"
- id="deployment.tool.executionEnvironment"
- kind="tool"
- label="Execution Environment"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExecutionEnvironment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExecutionEnvironment.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Artifact"
- id="deployment.tool.artifact"
- kind="tool"
- label="Artifact"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Artifact.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Artifact.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Comment"
- id="deployment.tool.comment"
- kind="tool"
- label="Comment"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Constraint"
- id="deployment.tool.constraint"
- kind="tool"
- label="Constraint"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Link (Comment / Constraint)"
- id="deployment.tool.link"
- kind="tool"
- label="Link"
- large_icon="icons/obj16/Link.gif"
- path=""
- small_icon="icons/obj16/Link.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Dependency"
- id="deployment.tool.dependency"
- kind="tool"
- label="Dependency"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create a dependency branch"
- id="deployment.tool.dependencybranch"
- kind="tool"
- label="DependencyBranch"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Generalization"
- id="deployment.tool.generalization"
- kind="tool"
- label="Generalization"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Deployment"
- id="deployment.tool.deployment"
- kind="tool"
- label="Deployment"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Deployment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Deployment.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create new Manifestation"
- id="deployment.tool.manifestation"
- kind="tool"
- label="Manifestation"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Manifestation.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Manifestation.gif">
- </entry>
-
- </contribution>
- </paletteProvider>
-
- </extension>
-
-<extension
- id="Papyrus Deployment Diagram .standard"
- name="Papyrus Deployment Diagram Standard Palette"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Low"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.deployment.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
-
- <entry
- description="Nodes"
- id="deployment.group.nodes"
- kind="drawer"
- label="Nodes"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
- <predefinedEntry
- id="createModelCreationTool"
- path="/deployment.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="deployment.tool.package"
- path="/deployment.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="deployment.tool.node"
- path="/deployment.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="deployment.tool.device"
- path="/deployment.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="deployment.tool.executionEnvironment"
- path="/deployment.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="deployment.tool.artifact"
- path="/deployment.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="deployment.tool.comment"
- path="/deployment.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="deployment.tool.constraint"
- path="/deployment.group.nodes">
- </predefinedEntry>
- <entry
- description="Links"
- id="deployment.group.links"
- kind="drawer"
- label="Links"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
- <predefinedEntry
- id="deployment.tool.link"
- path="/deployment.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="deployment.tool.dependency"
- path="/deployment.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="deployment.tool.dependencybranch"
- path="/deployment.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="deployment.tool.generalization"
- path="/deployment.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="deployment.tool.deployment"
- path="/deployment.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="deployment.tool.manifestation"
- path="/deployment.group.links">
- </predefinedEntry>
- </contribution>
- <editor id="org.eclipse.papyrus.uml.diagram.deployment"/>
- </paletteProvider>
-
-</extension>
-
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
- <?gmfgen generated="true"?>
-<page
- id="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLDeploymentDiagram"
- name="PapyrusUMLDeploymentDiagram Diagram"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
- class="org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramGeneralPreferencePage">
-</page>
-<page
- id="org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramPrintingPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.printing"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLDeploymentDiagram"
- class="org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramPrintingPreferencePage">
-</page>
-<page
- id="org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramRulersAndGridPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLDeploymentDiagram"
- class="org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramRulersAndGridPreferencePage">
-</page>
- </extension>
-<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
- <?gmfgen generated="true"?>
- <ParserProvider class="org.eclipse.papyrus.uml.diagram.deployment.providers.UMLParserProvider">
- <Priority name="Lowest"/>
- </ParserProvider>
- </extension>
-
-
-<extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
- <?gmfgen generated="true"?>
- <propertyContributor
- contributorId="org.eclipse.papyrus.uml.diagram.deployment"
- labelProvider="org.eclipse.papyrus.uml.diagram.deployment.sheet.UMLSheetLabelProvider">
- <propertyCategory category="domain"/>
- <propertyCategory category="visual"/>
- <propertyCategory category="extra"/>
- </propertyContributor>
- </extension>
-
-<extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
- <?gmfgen generated="true"?>
- <propertyTabs contributorId="org.eclipse.papyrus.uml.diagram.deployment">
- <propertyTab
- category="visual"
- id="property.tab.AppearancePropertySection"
- label="%tab.appearance"/>
- <propertyTab
- category="visual"
- id="property.tab.DiagramPropertySection"
- label="%tab.diagram"/>
- <propertyTab
- category="domain"
- id="property.tab.domain"
- label="%tab.domain"/>
- </propertyTabs>
- </extension>
-
-<extension point="org.eclipse.ui.views.properties.tabbed.propertySections" id="propsections">
- <?gmfgen generated="true"?>
- <propertySections contributorId="org.eclipse.papyrus.uml.diagram.deployment">
- <propertySection id="property.section.ConnectorAppearancePropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.ShapeColorAndFontPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.DiagramColorsAndFontsPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.RulerGridPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection"
- tab="property.tab.DiagramPropertySection">
- </propertySection>
- <propertySection
- id="property.section.domain"
- tab="property.tab.domain"
- class="org.eclipse.papyrus.uml.diagram.deployment.sheet.UMLPropertySection">
- <input type="org.eclipse.gmf.runtime.notation.View"/>
- <input type="org.eclipse.gef.EditPart"/>
- </propertySection>
- </propertySections>
- </extension>
-
-<extension point="org.eclipse.core.runtime.preferences" id="prefs">
- <?gmfgen generated="true"?>
- <initializer class="org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramPreferenceInitializer"/>
- </extension>
-
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
- <?gmfgen generated="true"?>
- <viewProvider class="org.eclipse.papyrus.uml.diagram.deployment.providers.UMLViewProvider">
- <Priority name="Lowest"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLDeploymentDiagram"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2011,2010,2009,2005,2001,2002,2003,2006,2008,2012,49,36,16,44,21,46,23,42,25,28,40,54,56"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4005,4008,4009,4001,4002,4003,4004,4010"/>
- </viewProvider>
- </extension>
-
-<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
- <?gmfgen generated="true"?>
- <editpartProvider class="org.eclipse.papyrus.uml.diagram.deployment.providers.UMLEditPartProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
- <method name="getType()" value="PapyrusUMLDeploymentDiagram"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
- <method name="getType()" value="2011,2010,2009,2005,2001,2002,2003,2006,2008,2012,49,36,16,44,21,46,23,42,25,28,40,54,56"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
- <method name="getType()" value="4005,4008,4009,4001,4002,4003,4004,4010"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
- <method name="getType()" value="7,48,35,2,3,1,5,6,8,9,53,50,37,20,45,22,47,24,43,27,29,41,55,57,58"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
- <method name="getType()" value="51,38,17,18,19,26,52,39,30,31,32,33,34"/>
- </object>
- <context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
- </editpartProvider>
- </extension>
+ <extension point="org.eclipse.ui.menus" id="context-menus">
+ <?gmfgen generated="true"?>
+ <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
+ </menuContribution>
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
+ </menuContribution -->
+ <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
+ <command commandId="org.eclipse.papyrus.uml.diagram.deployment.LoadResourceAction">
+ <visibleWhen>
+ <and>
+ <with variable="activePartId"><equals value="org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorID"/></with>
+ <with variable="selection"><iterate ifEmpty="false">
+ <instanceof value="org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart"/>
+ </iterate></with>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+
+ <extension point="org.eclipse.ui.commands" id="menu-commands">
+ <?gmfgen generated="true"?>
+ <category id="org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
+ <command id="org.eclipse.papyrus.uml.diagram.deployment.LoadResourceAction"
+ name="Load Resource"
+ categoryId="org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorID"
+ defaultHandler="org.eclipse.papyrus.uml.diagram.deployment.part.LoadResourceAction"/>
+ </extension>
+
+<extension
+ id="Papyrus Deployment Diagram .palettedefinition"
+ name="Papyrus Deployment Diagram Predefined Entries"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Lowest"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.deployment.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+
+ <entry
+ defineOnly="true"
+ description="Create a model"
+ id="createModelCreationTool"
+ kind="tool"
+ label="Model"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Model.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a Package"
+ id="deployment.tool.package"
+ kind="tool"
+ label="Package"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Node"
+ id="deployment.tool.node"
+ kind="tool"
+ label="Node"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Node.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Node.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Device"
+ id="deployment.tool.device"
+ kind="tool"
+ label="Device"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Device.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Device.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new ExecutionEnvironment"
+ id="deployment.tool.executionEnvironment"
+ kind="tool"
+ label="Execution Environment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExecutionEnvironment.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExecutionEnvironment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Artifact"
+ id="deployment.tool.artifact"
+ kind="tool"
+ label="Artifact"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Artifact.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Artifact.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Comment"
+ id="deployment.tool.comment"
+ kind="tool"
+ label="Comment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Constraint"
+ id="deployment.tool.constraint"
+ kind="tool"
+ label="Constraint"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Link (Comment / Constraint)"
+ id="deployment.tool.link"
+ kind="tool"
+ label="Link"
+ large_icon="icons/obj16/Link.gif"
+ path=""
+ small_icon="icons/obj16/Link.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Dependency"
+ id="deployment.tool.dependency"
+ kind="tool"
+ label="Dependency"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create a dependency branch"
+ id="deployment.tool.dependencybranch"
+ kind="tool"
+ label="DependencyBranch"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Generalization"
+ id="deployment.tool.generalization"
+ kind="tool"
+ label="Generalization"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Deployment"
+ id="deployment.tool.deployment"
+ kind="tool"
+ label="Deployment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Deployment.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Deployment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create new Manifestation"
+ id="deployment.tool.manifestation"
+ kind="tool"
+ label="Manifestation"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Manifestation.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Manifestation.gif">
+ </entry>
+
+ </contribution>
+ </paletteProvider>
+
+ </extension>
+
+<extension
+ id="Papyrus Deployment Diagram .standard"
+ name="Papyrus Deployment Diagram Standard Palette"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Low"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.deployment.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+
+ <entry
+ description="Nodes"
+ id="deployment.group.nodes"
+ kind="drawer"
+ label="Nodes"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="createModelCreationTool"
+ path="/deployment.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="deployment.tool.package"
+ path="/deployment.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="deployment.tool.node"
+ path="/deployment.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="deployment.tool.device"
+ path="/deployment.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="deployment.tool.executionEnvironment"
+ path="/deployment.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="deployment.tool.artifact"
+ path="/deployment.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="deployment.tool.comment"
+ path="/deployment.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="deployment.tool.constraint"
+ path="/deployment.group.nodes">
+ </predefinedEntry>
+ <entry
+ description="Links"
+ id="deployment.group.links"
+ kind="drawer"
+ label="Links"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="deployment.tool.link"
+ path="/deployment.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="deployment.tool.dependency"
+ path="/deployment.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="deployment.tool.dependencybranch"
+ path="/deployment.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="deployment.tool.generalization"
+ path="/deployment.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="deployment.tool.deployment"
+ path="/deployment.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="deployment.tool.manifestation"
+ path="/deployment.group.links">
+ </predefinedEntry>
+ </contribution>
+ <editor id="org.eclipse.papyrus.uml.diagram.deployment"/>
+ </paletteProvider>
+
+</extension>
+
+<extension point="org.eclipse.ui.preferencePages" id="prefpages">
+ <?gmfgen generated="true"?>
+<page
+ id="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLDeploymentDiagram"
+ name="PapyrusUMLDeploymentDiagram Diagram"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
+ class="org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramGeneralPreferencePage">
+</page>
+<page
+ id="org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramPrintingPreferencePage"
+ name="%prefpage.org.eclipse.uml2.uml.diagram.printing"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLDeploymentDiagram"
+ class="org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramPrintingPreferencePage">
+</page>
+<page
+ id="org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramRulersAndGridPreferencePage"
+ name="%prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLDeploymentDiagram"
+ class="org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramRulersAndGridPreferencePage">
+</page>
+ </extension>
+<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
+ <?gmfgen generated="true"?>
+ <ParserProvider class="org.eclipse.papyrus.uml.diagram.deployment.providers.UMLParserProvider">
+ <Priority name="Lowest"/>
+ </ParserProvider>
+ </extension>
+
+
+<extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
+ <?gmfgen generated="true"?>
+ <propertyContributor
+ contributorId="org.eclipse.papyrus.uml.diagram.deployment"
+ labelProvider="org.eclipse.papyrus.uml.diagram.deployment.sheet.UMLSheetLabelProvider">
+ <propertyCategory category="domain"/>
+ <propertyCategory category="visual"/>
+ <propertyCategory category="extra"/>
+ </propertyContributor>
+ </extension>
+
+<extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
+ <?gmfgen generated="true"?>
+ <propertyTabs contributorId="org.eclipse.papyrus.uml.diagram.deployment">
+ <propertyTab
+ category="visual"
+ id="property.tab.AppearancePropertySection"
+ label="%tab.appearance"/>
+ <propertyTab
+ category="visual"
+ id="property.tab.DiagramPropertySection"
+ label="%tab.diagram"/>
+ <propertyTab
+ category="domain"
+ id="property.tab.domain"
+ label="%tab.domain"/>
+ </propertyTabs>
+ </extension>
+
+<extension point="org.eclipse.ui.views.properties.tabbed.propertySections" id="propsections">
+ <?gmfgen generated="true"?>
+ <propertySections contributorId="org.eclipse.papyrus.uml.diagram.deployment">
+ <propertySection id="property.section.ConnectorAppearancePropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.ShapeColorAndFontPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.DiagramColorsAndFontsPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.RulerGridPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection"
+ tab="property.tab.DiagramPropertySection">
+ </propertySection>
+ <propertySection
+ id="property.section.domain"
+ tab="property.tab.domain"
+ class="org.eclipse.papyrus.uml.diagram.deployment.sheet.UMLPropertySection">
+ <input type="org.eclipse.gmf.runtime.notation.View"/>
+ <input type="org.eclipse.gef.EditPart"/>
+ </propertySection>
+ </propertySections>
+ </extension>
+
+<extension point="org.eclipse.core.runtime.preferences" id="prefs">
+ <?gmfgen generated="true"?>
+ <initializer class="org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramPreferenceInitializer"/>
+ </extension>
+
+<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
+ <?gmfgen generated="true"?>
+ <viewProvider class="org.eclipse.papyrus.uml.diagram.deployment.providers.UMLViewProvider">
+ <Priority name="Lowest"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLDeploymentDiagram"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2011,2010,2009,2005,2001,2002,2003,2006,2008,2012,49,36,16,44,21,46,23,42,25,28,40,54,56"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4005,4008,4009,4001,4002,4003,4004,4010"/>
+ </viewProvider>
+ </extension>
+
+<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
+ <?gmfgen generated="true"?>
+ <editpartProvider class="org.eclipse.papyrus.uml.diagram.deployment.providers.UMLEditPartProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
+ <method name="getType()" value="PapyrusUMLDeploymentDiagram"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
+ <method name="getType()" value="2011,2010,2009,2005,2001,2002,2003,2006,2008,2012,49,36,16,44,21,46,23,42,25,28,40,54,56"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
+ <method name="getType()" value="4005,4008,4009,4001,4002,4003,4004,4010"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
+ <method name="getType()" value="7,48,35,2,3,1,5,6,8,61,9,53,50,37,20,45,22,47,24,43,27,59,29,60,41,55,57,58"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
+ <method name="getType()" value="51,38,17,18,19,26,52,39,30,31,32,33,34"/>
+ </object>
+ <context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
+ </editpartProvider>
+ </extension>
-<extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
- <?gmfgen generated="true"?>
- <IconProvider class="org.eclipse.papyrus.uml.diagram.deployment.providers.UMLIconProvider">
- <Priority name="Low"/>
- </IconProvider>
- </extension>
-
-<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
- <?gmfgen generated="true"?>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.Package_1000"
- name="%metatype.name.Package_1000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Package"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.ModelEditHelper">
- <param name="semanticHint" value="1000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.Dependency_2011"
- name="%metatype.name.Dependency_2011"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Dependency"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.DependencyEditHelper">
- <param name="semanticHint" value="2011"/>
- </metamodelType>
- </metamodel>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Model_2010"
- name="%metatype.name.Model_2010"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="2010"/>
- </specializationType>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Package_2009"
- name="%metatype.name.Package_2009"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="2009"/>
- </specializationType>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.Constraint_2005"
- name="%metatype.name.Constraint_2005"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Constraint"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.ConstraintEditHelper">
- <param name="semanticHint" value="2005"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.Comment_2001"
- name="%metatype.name.Comment_2001"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Comment"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.CommentEditHelper">
- <param name="semanticHint" value="2001"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_2002"
- name="%metatype.name.ExecutionEnvironment_2002"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ExecutionEnvironment"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.ExecutionEnvironmentEditHelper">
- <param name="semanticHint" value="2002"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.Device_2003"
- name="%metatype.name.Device_2003"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Device"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.DeviceEditHelper">
- <param name="semanticHint" value="2003"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_2006"
- name="%metatype.name.Artifact_2006"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Artifact"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.ArtifactEditHelper">
- <param name="semanticHint" value="2006"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.Node_2008"
- name="%metatype.name.Node_2008"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Node"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.NodeEditHelper">
- <param name="semanticHint" value="2008"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.NamedElement_2012"
- name="%metatype.name.NamedElement_2012"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="NamedElement"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.DefaultNamedElementEditHelper">
- <param name="semanticHint" value="2012"/>
- </metamodelType>
- </metamodel>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Model_49"
- name="%metatype.name.Model_49"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="49"/>
- </specializationType>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Package_36"
- name="%metatype.name.Package_36"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="36"/>
- </specializationType>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Device_16"
- name="%metatype.name.Device_16"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Device_2003"/>
- <param name="semanticHint" value="16"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Device_44"
- name="%metatype.name.Device_44"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Device_2003"/>
- <param name="semanticHint" value="44"/>
- </specializationType>
- </metamodel>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_21"
- name="%metatype.name.ExecutionEnvironment_21"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="21"/>
- </specializationType>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_46"
- name="%metatype.name.ExecutionEnvironment_46"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="46"/>
- </specializationType>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Node_23"
- name="%metatype.name.Node_23"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="23"/>
- </specializationType>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Node_42"
- name="%metatype.name.Node_42"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="42"/>
- </specializationType>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_25"
- name="%metatype.name.Artifact_25"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_2006"/>
- <param name="semanticHint" value="25"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_28"
- name="%metatype.name.Artifact_28"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_2006"/>
- <param name="semanticHint" value="28"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_40"
- name="%metatype.name.Artifact_40"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_2006"/>
- <param name="semanticHint" value="40"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.Comment_54"
- name="%metatype.name.Comment_54"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Comment"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.CommentEditHelper">
- <param name="semanticHint" value="54"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.Constraint_56"
- name="%metatype.name.Constraint_56"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Constraint"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.ConstraintEditHelper">
- <param name="semanticHint" value="56"/>
- </metamodelType>
- </metamodel>
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Link_4005"
- name="%metatype.name.Link_4005"
- kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4005"/>
- </specializationType>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.CommentAnnotatedElement_4006"
- name="%metatype.name.CommentAnnotatedElement_4008"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4008"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.ConstraintConstrainedElement_4007"
- name="%metatype.name.ConstraintConstrainedElement_4009"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4009"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.Deployment_4001"
- name="%metatype.name.Deployment_4001"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Deployment"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.DeploymentEditHelper">
- <param name="semanticHint" value="4001"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.Manifestation_4002"
- name="%metatype.name.Manifestation_4002"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Manifestation"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.ManifestationEditHelper">
- <param name="semanticHint" value="4002"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.deployment.Generalization_4003"
- name="%metatype.name.Generalization_4003"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Generalization"
- edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.GeneralizationEditHelper">
- <param name="semanticHint" value="4003"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Dependency_4004"
- name="%metatype.name.Dependency_4004"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Dependency_2011"/>
- <param name="semanticHint" value="4004"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.deployment.Dependency_4010"
- name="%metatype.name.Dependency_4010"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Dependency_2011"/>
- <param name="semanticHint" value="4010"/>
- </specializationType>
- </metamodel>
- </extension>
-
-<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
- <?gmfgen generated="true"?>
- <clientContext id="org.eclipse.papyrus.uml.diagram.deployment.TypeContext">
- <enablement>
- <test
- property="org.eclipse.gmf.runtime.emf.core.editingDomain"
- value="org.eclipse.papyrus.uml.diagram.deployment.EditingDomain"/>
- </enablement>
- </clientContext>
- <binding context="org.eclipse.papyrus.uml.diagram.deployment.TypeContext">
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Package_1000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Dependency_2011"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Model_2010"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Package_2009"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Constraint_2005"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Comment_2001"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_2002"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Device_2003"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Artifact_2006"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Node_2008"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.NamedElement_2012"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Model_49"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Package_36"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Device_16"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Device_44"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_21"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_46"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Node_23"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Node_42"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Artifact_25"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Artifact_28"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Artifact_40"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Comment_54"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Constraint_56"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Link_4005"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.CommentAnnotatedElement_4006"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.ConstraintConstrainedElement_4007"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Deployment_4001"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Manifestation_4002"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Generalization_4003"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Dependency_4004"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Dependency_4010"/>
- <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
- </binding>
- </extension>
-
-
-<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
- <?gmfgen generated="true"?>
- <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.deployment.providers.UMLMarkerNavigationProvider">
- <MarkerType name="org.eclipse.papyrus.uml.diagram.deployment.diagnostic"/>
- <Priority name="Lowest"/>
- </MarkerNavigationProvider>
- </extension>
-
-<extension id="diagnostic" name="Papyrus Deployment Diagram problems" point="org.eclipse.core.resources.markers">
- <?gmfgen generated="true"?>
- <super type="org.eclipse.core.resources.problemmarker"/>
- <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
- <persistent value="true"/>
- </extension><extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
- <?gmfgen generated="true"?>
- <decoratorProvider class="org.eclipse.papyrus.uml.diagram.deployment.providers.UMLValidationDecoratorProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
- <context decoratorTargets="PRIMARY_VIEW"/>
- </decoratorProvider>
- </extension>
-<extension point="org.eclipse.ui.handlers" id="menu-handlers">
- <?gmfgen generated="true"?>
- </extension>
+<extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
+ <?gmfgen generated="true"?>
+ <IconProvider class="org.eclipse.papyrus.uml.diagram.deployment.providers.UMLIconProvider">
+ <Priority name="Low"/>
+ </IconProvider>
+ </extension>
+
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
+ <?gmfgen generated="true"?>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Package_1000"
+ name="%metatype.name.Package_1000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Package"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.ModelEditHelper">
+ <param name="semanticHint" value="1000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Dependency_2011"
+ name="%metatype.name.Dependency_2011"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Dependency"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.DependencyEditHelper">
+ <param name="semanticHint" value="2011"/>
+ </metamodelType>
+ </metamodel>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Model_2010"
+ name="%metatype.name.Model_2010"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="2010"/>
+ </specializationType>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Package_2009"
+ name="%metatype.name.Package_2009"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="2009"/>
+ </specializationType>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Constraint_2005"
+ name="%metatype.name.Constraint_2005"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Constraint"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.ConstraintEditHelper">
+ <param name="semanticHint" value="2005"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Comment_2001"
+ name="%metatype.name.Comment_2001"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Comment"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.CommentEditHelper">
+ <param name="semanticHint" value="2001"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_2002"
+ name="%metatype.name.ExecutionEnvironment_2002"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="ExecutionEnvironment"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.ExecutionEnvironmentEditHelper">
+ <param name="semanticHint" value="2002"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Device_2003"
+ name="%metatype.name.Device_2003"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Device"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.DeviceEditHelper">
+ <param name="semanticHint" value="2003"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_2006"
+ name="%metatype.name.Artifact_2006"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Artifact"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.ArtifactEditHelper">
+ <param name="semanticHint" value="2006"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Node_2008"
+ name="%metatype.name.Node_2008"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Node"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.NodeEditHelper">
+ <param name="semanticHint" value="2008"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.NamedElement_2012"
+ name="%metatype.name.NamedElement_2012"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="NamedElement"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.DefaultNamedElementEditHelper">
+ <param name="semanticHint" value="2012"/>
+ </metamodelType>
+ </metamodel>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Model_49"
+ name="%metatype.name.Model_49"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="49"/>
+ </specializationType>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Package_36"
+ name="%metatype.name.Package_36"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="36"/>
+ </specializationType>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Device_16"
+ name="%metatype.name.Device_16"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Device_2003"/>
+ <param name="semanticHint" value="16"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Device_44"
+ name="%metatype.name.Device_44"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Device_2003"/>
+ <param name="semanticHint" value="44"/>
+ </specializationType>
+ </metamodel>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_21"
+ name="%metatype.name.ExecutionEnvironment_21"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="21"/>
+ </specializationType>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_46"
+ name="%metatype.name.ExecutionEnvironment_46"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="46"/>
+ </specializationType>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Node_23"
+ name="%metatype.name.Node_23"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="23"/>
+ </specializationType>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Node_42"
+ name="%metatype.name.Node_42"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="42"/>
+ </specializationType>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_25"
+ name="%metatype.name.Artifact_25"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_2006"/>
+ <param name="semanticHint" value="25"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_28"
+ name="%metatype.name.Artifact_28"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_2006"/>
+ <param name="semanticHint" value="28"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_40"
+ name="%metatype.name.Artifact_40"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Artifact_2006"/>
+ <param name="semanticHint" value="40"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Comment_54"
+ name="%metatype.name.Comment_54"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Comment"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.CommentEditHelper">
+ <param name="semanticHint" value="54"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Constraint_56"
+ name="%metatype.name.Constraint_56"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Constraint"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.ConstraintEditHelper">
+ <param name="semanticHint" value="56"/>
+ </metamodelType>
+ </metamodel>
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Link_4005"
+ name="%metatype.name.Link_4005"
+ kind="org.eclipse.gmf.runtime.diagram.ui.util.INotationType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4005"/>
+ </specializationType>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.CommentAnnotatedElement_4006"
+ name="%metatype.name.CommentAnnotatedElement_4008"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4008"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.ConstraintConstrainedElement_4007"
+ name="%metatype.name.ConstraintConstrainedElement_4009"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4009"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Deployment_4001"
+ name="%metatype.name.Deployment_4001"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Deployment"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.DeploymentEditHelper">
+ <param name="semanticHint" value="4001"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Manifestation_4002"
+ name="%metatype.name.Manifestation_4002"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Manifestation"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.ManifestationEditHelper">
+ <param name="semanticHint" value="4002"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Generalization_4003"
+ name="%metatype.name.Generalization_4003"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Generalization"
+ edithelper="org.eclipse.papyrus.uml.diagram.deployment.edit.helpers.GeneralizationEditHelper">
+ <param name="semanticHint" value="4003"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Dependency_4004"
+ name="%metatype.name.Dependency_4004"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Dependency_2011"/>
+ <param name="semanticHint" value="4004"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.deployment.Dependency_4010"
+ name="%metatype.name.Dependency_4010"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.deployment.Dependency_2011"/>
+ <param name="semanticHint" value="4010"/>
+ </specializationType>
+ </metamodel>
+ </extension>
+
+<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
+ <?gmfgen generated="true"?>
+ <clientContext id="org.eclipse.papyrus.uml.diagram.deployment.TypeContext">
+ <enablement>
+ <test
+ property="org.eclipse.gmf.runtime.emf.core.editingDomain"
+ value="org.eclipse.papyrus.uml.diagram.deployment.EditingDomain"/>
+ </enablement>
+ </clientContext>
+ <binding context="org.eclipse.papyrus.uml.diagram.deployment.TypeContext">
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Package_1000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Dependency_2011"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Model_2010"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Package_2009"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Constraint_2005"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Comment_2001"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_2002"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Device_2003"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Artifact_2006"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Node_2008"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.NamedElement_2012"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Model_49"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Package_36"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Device_16"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Device_44"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_21"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.ExecutionEnvironment_46"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Node_23"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Node_42"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Artifact_25"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Artifact_28"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Artifact_40"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Comment_54"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Constraint_56"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Link_4005"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.CommentAnnotatedElement_4006"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.ConstraintConstrainedElement_4007"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Deployment_4001"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Manifestation_4002"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Generalization_4003"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Dependency_4004"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.deployment.Dependency_4010"/>
+ <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
+ </binding>
+ </extension>
+
+
+<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
+ <?gmfgen generated="true"?>
+ <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.deployment.providers.UMLMarkerNavigationProvider">
+ <MarkerType name="org.eclipse.papyrus.uml.diagram.deployment.diagnostic"/>
+ <Priority name="Lowest"/>
+ </MarkerNavigationProvider>
+ </extension>
+
+<extension id="diagnostic" name="Papyrus Deployment Diagram problems" point="org.eclipse.core.resources.markers">
+ <?gmfgen generated="true"?>
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
+ <persistent value="true"/>
+ </extension><extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
+ <?gmfgen generated="true"?>
+ <decoratorProvider class="org.eclipse.papyrus.uml.diagram.deployment.providers.UMLValidationDecoratorProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
+ <context decoratorTargets="PRIMARY_VIEW"/>
+ </decoratorProvider>
+ </extension>
+<extension point="org.eclipse.ui.handlers" id="menu-handlers">
+ <?gmfgen generated="true"?>
+ </extension>
<extension point="org.eclipse.papyrus.infra.gmfdiag.common.notationTypesMapping">
<diagramMappings diagramID="PapyrusUMLDeploymentDiagram">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommand.java
index dce0f4cf9ac..6c30c2813b0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommand.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Artifact;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ArtifactCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ArtifactCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
-
- 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_Artifact_2006(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Artifact 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Artifact;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ArtifactCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ArtifactCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
+
+ 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_Artifact_2006(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Artifact 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandACN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandACN.java
index 66da0849214..d56d37c100b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandACN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandACN.java
@@ -1,126 +1,126 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Artifact;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ArtifactCreateCommandACN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ArtifactCreateCommandACN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
-
- 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 {
-
- Artifact qualifiedTarget = (Artifact) target;
- qualifiedTarget.getNestedArtifacts()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Artifact_28(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Artifact 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Artifact;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ArtifactCreateCommandACN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ArtifactCreateCommandACN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
+
+ 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 {
+
+ Artifact qualifiedTarget = (Artifact) target;
+ qualifiedTarget.getNestedArtifacts()
+ .add(newElement);
+
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
+
+
+ ElementInitializers.getInstance().init_Artifact_28(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Artifact 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandCN.java
index 1bd798433a0..dcc4fc67f39 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Artifact;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ArtifactCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ArtifactCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
-
- 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 {
-
- Class qualifiedTarget = (Class) target;
- qualifiedTarget.getNestedClassifiers()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Artifact_25(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Artifact 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Artifact;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ArtifactCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ArtifactCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
+
+ 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 {
+
+ Class qualifiedTarget = (Class) target;
+ qualifiedTarget.getNestedClassifiers()
+ .add(newElement);
+
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
+
+
+ ElementInitializers.getInstance().init_Artifact_25(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Artifact 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementCreateCommand.java
index 8ef3f5c77a4..fba2bd809fb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementCreateCommand.java
@@ -1,108 +1,108 @@
-/**
- * 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.deployment.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.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Element;
-
-/**
- * @generated
- */
-public class CommentAnnotatedElementCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- public CommentAnnotatedElementCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Comment) {
- return false;
- }
- if (target != null && false == target instanceof Element) {
- return false;
- }
- if (getSource() == null) {
- return true; // link creation is in progress; source is not defined yet
- }
- // target may be null here but it's possible to check constraint
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateCommentAnnotatedElement_4008(getSource(), getTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- 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
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Comment getSource() {
- return (Comment) source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element) target;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * @generated
+ */
+public class CommentAnnotatedElementCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ protected final EObject source;
+
+ /**
+ * @generated
+ */
+ protected final EObject target;
+
+ /**
+ * @generated
+ */
+ public CommentAnnotatedElementCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
+ super(request.getLabel(), null, request);
+ this.source = source;
+ this.target = target;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (source == null && target == null) {
+ return false;
+ }
+ if (source != null && false == source instanceof Comment) {
+ return false;
+ }
+ if (target != null && false == target instanceof Element) {
+ return false;
+ }
+ if (getSource() == null) {
+ return true; // link creation is in progress; source is not defined yet
+ }
+ // target may be null here but it's possible to check constraint
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateCommentAnnotatedElement_4008(getSource(), getTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ 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
+ */
+ @Override
+ protected void setElementToEdit(EObject element) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @generated
+ */
+ protected Comment getSource() {
+ return (Comment) source;
+ }
+
+ /**
+ * @generated
+ */
+ protected Element getTarget() {
+ return (Element) target;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementReorientCommand.java
index ce3c0a26d8a..d52203e6ca5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementReorientCommand.java
@@ -1,165 +1,165 @@
-/**
- * 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.deployment.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.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Element;
-
-/**
- * @generated
- */
-public class CommentAnnotatedElementReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject referenceOwner;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public CommentAnnotatedElementReorientCommand(ReorientReferenceRelationshipRequest request) {
- super(request.getLabel(), null, request);
- reorientDirection = request.getDirection();
- referenceOwner = request.getReferenceOwner();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (false == referenceOwner instanceof Comment) {
- return false;
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean canReorientSource() {
- if (!(oldEnd instanceof Element && newEnd instanceof Comment)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistCommentAnnotatedElement_4008(getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistCommentAnnotatedElement_4008(getOldSource(), getNewTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientSource() throws ExecutionException {
- getOldSource().getAnnotatedElements()
- .remove(getOldTarget());
- getNewSource().getAnnotatedElements()
- .add(getOldTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getOldSource().getAnnotatedElements()
- .remove(getOldTarget());
- getOldSource().getAnnotatedElements()
- .add(getNewTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected Comment getOldSource() {
- return (Comment) referenceOwner;
- }
-
- /**
- * @generated
- */
- protected Comment getNewSource() {
- return (Comment) newEnd;
- }
-
- /**
- * @generated
- */
- protected Element getOldTarget() {
- return (Element) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewTarget() {
- return (Element) newEnd;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * @generated
+ */
+public class CommentAnnotatedElementReorientCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private final int reorientDirection;
+
+ /**
+ * @generated
+ */
+ private final EObject referenceOwner;
+
+ /**
+ * @generated
+ */
+ private final EObject oldEnd;
+
+ /**
+ * @generated
+ */
+ private final EObject newEnd;
+
+ /**
+ * @generated
+ */
+ public CommentAnnotatedElementReorientCommand(ReorientReferenceRelationshipRequest request) {
+ super(request.getLabel(), null, request);
+ reorientDirection = request.getDirection();
+ referenceOwner = request.getReferenceOwner();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (false == referenceOwner instanceof Comment) {
+ return false;
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return canReorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return canReorientTarget();
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientSource() {
+ if (!(oldEnd instanceof Element && newEnd instanceof Comment)) {
+ return false;
+ }
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistCommentAnnotatedElement_4008(getNewSource(), getOldTarget());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientTarget() {
+ if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
+ return false;
+ }
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistCommentAnnotatedElement_4008(getOldSource(), getNewTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (!canExecute()) {
+ throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return reorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return reorientTarget();
+ }
+ throw new IllegalStateException();
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientSource() throws ExecutionException {
+ getOldSource().getAnnotatedElements()
+ .remove(getOldTarget());
+ getNewSource().getAnnotatedElements()
+ .add(getOldTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientTarget() throws ExecutionException {
+ getOldSource().getAnnotatedElements()
+ .remove(getOldTarget());
+ getOldSource().getAnnotatedElements()
+ .add(getNewTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected Comment getOldSource() {
+ return (Comment) referenceOwner;
+ }
+
+ /**
+ * @generated
+ */
+ protected Comment getNewSource() {
+ return (Comment) newEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected Element getOldTarget() {
+ return (Element) oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected Element getNewTarget() {
+ return (Element) newEnd;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommand.java
index 95123592e78..f0c232e38f1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommand.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class CommentCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public CommentCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- 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()) {
- 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 {
-
- 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_2001(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Comment 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class CommentCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public CommentCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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()) {
+ 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 {
+
+ 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_2001(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Comment 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommandCN.java
index 655802d4447..fe0fcfaa426 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class CommentCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public CommentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- 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()) {
- 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 {
-
- 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_54(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Comment 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class CommentCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public CommentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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()) {
+ 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 {
+
+ 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_54(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Comment 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementCreateCommand.java
index 3d157150f94..9935c03460b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementCreateCommand.java
@@ -1,108 +1,108 @@
-/**
- * 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.deployment.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.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Element;
-
-/**
- * @generated
- */
-public class ConstraintConstrainedElementCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- public ConstraintConstrainedElementCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Constraint) {
- return false;
- }
- if (target != null && false == target instanceof Element) {
- return false;
- }
- if (getSource() == null) {
- return true; // link creation is in progress; source is not defined yet
- }
- // target may be null here but it's possible to check constraint
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateConstraintConstrainedElement_4009(getSource(), getTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- 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
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Constraint getSource() {
- return (Constraint) source;
- }
-
- /**
- * @generated
- */
- protected Element getTarget() {
- return (Element) target;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * @generated
+ */
+public class ConstraintConstrainedElementCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ protected final EObject source;
+
+ /**
+ * @generated
+ */
+ protected final EObject target;
+
+ /**
+ * @generated
+ */
+ public ConstraintConstrainedElementCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
+ super(request.getLabel(), null, request);
+ this.source = source;
+ this.target = target;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (source == null && target == null) {
+ return false;
+ }
+ if (source != null && false == source instanceof Constraint) {
+ return false;
+ }
+ if (target != null && false == target instanceof Element) {
+ return false;
+ }
+ if (getSource() == null) {
+ return true; // link creation is in progress; source is not defined yet
+ }
+ // target may be null here but it's possible to check constraint
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateConstraintConstrainedElement_4009(getSource(), getTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ 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
+ */
+ @Override
+ protected void setElementToEdit(EObject element) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @generated
+ */
+ protected Constraint getSource() {
+ return (Constraint) source;
+ }
+
+ /**
+ * @generated
+ */
+ protected Element getTarget() {
+ return (Element) target;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementReorientCommand.java
index 86fe335c21f..eada99ceca9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementReorientCommand.java
@@ -1,165 +1,165 @@
-/**
- * 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.deployment.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.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Element;
-
-/**
- * @generated
- */
-public class ConstraintConstrainedElementReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject referenceOwner;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public ConstraintConstrainedElementReorientCommand(ReorientReferenceRelationshipRequest request) {
- super(request.getLabel(), null, request);
- reorientDirection = request.getDirection();
- referenceOwner = request.getReferenceOwner();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (false == referenceOwner instanceof Constraint) {
- return false;
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean canReorientSource() {
- if (!(oldEnd instanceof Element && newEnd instanceof Constraint)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConstraintConstrainedElement_4009(getNewSource(), getOldTarget());
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConstraintConstrainedElement_4009(getOldSource(), getNewTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientSource() throws ExecutionException {
- getOldSource().getConstrainedElements()
- .remove(getOldTarget());
- getNewSource().getConstrainedElements()
- .add(getOldTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getOldSource().getConstrainedElements()
- .remove(getOldTarget());
- getOldSource().getConstrainedElements()
- .add(getNewTarget());
- return CommandResult.newOKCommandResult(referenceOwner);
- }
-
- /**
- * @generated
- */
- protected Constraint getOldSource() {
- return (Constraint) referenceOwner;
- }
-
- /**
- * @generated
- */
- protected Constraint getNewSource() {
- return (Constraint) newEnd;
- }
-
- /**
- * @generated
- */
- protected Element getOldTarget() {
- return (Element) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Element getNewTarget() {
- return (Element) newEnd;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * @generated
+ */
+public class ConstraintConstrainedElementReorientCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private final int reorientDirection;
+
+ /**
+ * @generated
+ */
+ private final EObject referenceOwner;
+
+ /**
+ * @generated
+ */
+ private final EObject oldEnd;
+
+ /**
+ * @generated
+ */
+ private final EObject newEnd;
+
+ /**
+ * @generated
+ */
+ public ConstraintConstrainedElementReorientCommand(ReorientReferenceRelationshipRequest request) {
+ super(request.getLabel(), null, request);
+ reorientDirection = request.getDirection();
+ referenceOwner = request.getReferenceOwner();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (false == referenceOwner instanceof Constraint) {
+ return false;
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return canReorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return canReorientTarget();
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientSource() {
+ if (!(oldEnd instanceof Element && newEnd instanceof Constraint)) {
+ return false;
+ }
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConstraintConstrainedElement_4009(getNewSource(), getOldTarget());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientTarget() {
+ if (!(oldEnd instanceof Element && newEnd instanceof Element)) {
+ return false;
+ }
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistConstraintConstrainedElement_4009(getOldSource(), getNewTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (!canExecute()) {
+ throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return reorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return reorientTarget();
+ }
+ throw new IllegalStateException();
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientSource() throws ExecutionException {
+ getOldSource().getConstrainedElements()
+ .remove(getOldTarget());
+ getNewSource().getConstrainedElements()
+ .add(getOldTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientTarget() throws ExecutionException {
+ getOldSource().getConstrainedElements()
+ .remove(getOldTarget());
+ getOldSource().getConstrainedElements()
+ .add(getNewTarget());
+ return CommandResult.newOKCommandResult(referenceOwner);
+ }
+
+ /**
+ * @generated
+ */
+ protected Constraint getOldSource() {
+ return (Constraint) referenceOwner;
+ }
+
+ /**
+ * @generated
+ */
+ protected Constraint getNewSource() {
+ return (Constraint) newEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected Element getOldTarget() {
+ return (Element) oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected Element getNewTarget() {
+ return (Element) newEnd;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommand.java
index bdde5324eb2..7c2d748380a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommand.java
@@ -1,131 +1,131 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ConstraintCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- 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()) {
- 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");
- }
-
- Namespace childHolder = (Namespace) getElementToEdit();
- childHolder.getOwnedRules()
- .add(newElement);
-
- ElementInitializers.getInstance().init_Constraint_2005(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Constraint 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ConstraintCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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()) {
+ 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");
+ }
+
+ Namespace childHolder = (Namespace) getElementToEdit();
+ childHolder.getOwnedRules()
+ .add(newElement);
+
+ ElementInitializers.getInstance().init_Constraint_2005(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Constraint 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommandCN.java
index 52b5ce2e98d..9586e5d92c5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ConstraintCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- 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()) {
- 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 {
-
- Namespace qualifiedTarget = (Namespace) target;
- qualifiedTarget.getOwnedRules()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Constraint_56(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Constraint 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ConstraintCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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()) {
+ 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 {
+
+ Namespace qualifiedTarget = (Namespace) target;
+ qualifiedTarget.getOwnedRules()
+ .add(newElement);
+
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
+
+
+ ElementInitializers.getInstance().init_Constraint_56(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Constraint 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchCreateCommand.java
index 71b9b00592a..4933a1fdde5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchCreateCommand.java
@@ -1,171 +1,171 @@
-/**
- * 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.deployment.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.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Dependency;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class DependencyBranchCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Package container;
-
- /**
- * @generated
- */
- public DependencyBranchCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof NamedElement) {
- return false;
- }
- if (target != null && false == target instanceof NamedElement) {
- return false;
- }
- if (getSource() == null) {
- return true; // link creation is in progress; source is not defined yet
- }
- // target may be null here but it's possible to check constraint
- if (getContainer() == null) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateDependency_4010(getContainer(), getSource(), getTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- 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());
- newElement.getSuppliers()
- .add(getTarget());
- ElementInitializers.getInstance().init_Dependency_4010(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Dependency 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());
- configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
- configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected NamedElement getSource() {
- return (NamedElement) source;
- }
-
- /**
- * @generated
- */
- protected NamedElement getTarget() {
- return (NamedElement) target;
- }
-
- /**
- * @generated
- */
- public Package getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container.
- * Modify with appropriate logic.
- *
- * @generated
- */
- protected Package deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for (EObject element = source; element != null; element = element.eContainer()) {
- if (element instanceof Package) {
- return (Package) element;
- }
- }
- return null;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * @generated
+ */
+public class DependencyBranchCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ protected final EObject source;
+
+ /**
+ * @generated
+ */
+ protected final EObject target;
+
+ /**
+ * @generated
+ */
+ protected Package container;
+
+ /**
+ * @generated
+ */
+ public DependencyBranchCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
+ super(request.getLabel(), null, request);
+ this.source = source;
+ this.target = target;
+ container = deduceContainer(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (source == null && target == null) {
+ return false;
+ }
+ if (source != null && false == source instanceof NamedElement) {
+ return false;
+ }
+ if (target != null && false == target instanceof NamedElement) {
+ return false;
+ }
+ if (getSource() == null) {
+ return true; // link creation is in progress; source is not defined yet
+ }
+ // target may be null here but it's possible to check constraint
+ if (getContainer() == null) {
+ return false;
+ }
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateDependency_4010(getContainer(), getSource(), getTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ 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());
+ newElement.getSuppliers()
+ .add(getTarget());
+ ElementInitializers.getInstance().init_Dependency_4010(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Dependency 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());
+ configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
+ configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute()) {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setElementToEdit(EObject element) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getSource() {
+ return (NamedElement) source;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getTarget() {
+ return (NamedElement) target;
+ }
+
+ /**
+ * @generated
+ */
+ public Package getContainer() {
+ return container;
+ }
+
+ /**
+ * Default approach is to traverse ancestors of the source to find instance of container.
+ * Modify with appropriate logic.
+ *
+ * @generated
+ */
+ protected Package deduceContainer(EObject source, EObject target) {
+ // Find container element for the new link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null; element = element.eContainer()) {
+ if (element instanceof Package) {
+ return (Package) element;
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchReorientCommand.java
index bc20650b971..4c3da9a962c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchReorientCommand.java
@@ -1,187 +1,187 @@
-/**
- * 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.deployment.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.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Dependency;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @generated
- */
-public class DependencyBranchReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public DependencyBranchReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (false == getElementToEdit() instanceof Dependency) {
- return false;
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean canReorientSource() {
- if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
- return false;
- }
- if (getLink().getSuppliers()
- .size() != 1) {
- return false;
- }
- NamedElement target = getLink().getSuppliers()
- .get(0);
- if (!(getLink().eContainer() instanceof Package)) {
- return false;
- }
- Package container = (Package) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDependency_4010(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
- return false;
- }
- if (getLink().getClients()
- .size() != 1) {
- return false;
- }
- NamedElement source = getLink().getClients()
- .get(0);
- if (!(getLink().eContainer() instanceof Package)) {
- return false;
- }
- Package container = (Package) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDependency_4010(container, getLink(), source, getNewTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientSource() throws ExecutionException {
- getLink().getClients()
- .remove(getOldSource());
- getLink().getClients()
- .add(getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getLink().getSuppliers()
- .remove(getOldTarget());
- getLink().getSuppliers()
- .add(getNewTarget());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected Dependency getLink() {
- return (Dependency) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected NamedElement getOldSource() {
- return (NamedElement) oldEnd;
- }
-
- /**
- * @generated
- */
- protected NamedElement getNewSource() {
- return (NamedElement) newEnd;
- }
-
- /**
- * @generated
- */
- protected NamedElement getOldTarget() {
- return (NamedElement) oldEnd;
- }
-
- /**
- * @generated
- */
- protected NamedElement getNewTarget() {
- return (NamedElement) newEnd;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+
+/**
+ * @generated
+ */
+public class DependencyBranchReorientCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private final int reorientDirection;
+
+ /**
+ * @generated
+ */
+ private final EObject oldEnd;
+
+ /**
+ * @generated
+ */
+ private final EObject newEnd;
+
+ /**
+ * @generated
+ */
+ public DependencyBranchReorientCommand(ReorientRelationshipRequest request) {
+ super(request.getLabel(), request.getRelationship(), request);
+ reorientDirection = request.getDirection();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (false == getElementToEdit() instanceof Dependency) {
+ return false;
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return canReorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return canReorientTarget();
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientSource() {
+ if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
+ return false;
+ }
+ if (getLink().getSuppliers()
+ .size() != 1) {
+ return false;
+ }
+ NamedElement target = getLink().getSuppliers()
+ .get(0);
+ if (!(getLink().eContainer() instanceof Package)) {
+ return false;
+ }
+ Package container = (Package) getLink().eContainer();
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDependency_4010(container, getLink(), getNewSource(), target);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientTarget() {
+ if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
+ return false;
+ }
+ if (getLink().getClients()
+ .size() != 1) {
+ return false;
+ }
+ NamedElement source = getLink().getClients()
+ .get(0);
+ if (!(getLink().eContainer() instanceof Package)) {
+ return false;
+ }
+ Package container = (Package) getLink().eContainer();
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDependency_4010(container, getLink(), source, getNewTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (!canExecute()) {
+ throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return reorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return reorientTarget();
+ }
+ throw new IllegalStateException();
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientSource() throws ExecutionException {
+ getLink().getClients()
+ .remove(getOldSource());
+ getLink().getClients()
+ .add(getNewSource());
+ return CommandResult.newOKCommandResult(getLink());
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientTarget() throws ExecutionException {
+ getLink().getSuppliers()
+ .remove(getOldTarget());
+ getLink().getSuppliers()
+ .add(getNewTarget());
+ return CommandResult.newOKCommandResult(getLink());
+ }
+
+ /**
+ * @generated
+ */
+ protected Dependency getLink() {
+ return (Dependency) getElementToEdit();
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getOldSource() {
+ return (NamedElement) oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getNewSource() {
+ return (NamedElement) newEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getOldTarget() {
+ return (NamedElement) oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getNewTarget() {
+ return (NamedElement) newEnd;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyCreateCommand.java
index 4b014542bc7..038a9c2d543 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyCreateCommand.java
@@ -1,171 +1,171 @@
-/**
- * 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.deployment.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.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Dependency;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class DependencyCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Package container;
-
- /**
- * @generated
- */
- public DependencyCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof NamedElement) {
- return false;
- }
- if (target != null && false == target instanceof NamedElement) {
- return false;
- }
- if (getSource() == null) {
- return true; // link creation is in progress; source is not defined yet
- }
- // target may be null here but it's possible to check constraint
- if (getContainer() == null) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateDependency_4004(getContainer(), getSource(), getTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- 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());
- newElement.getSuppliers()
- .add(getTarget());
- ElementInitializers.getInstance().init_Dependency_4004(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Dependency 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());
- configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
- configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected NamedElement getSource() {
- return (NamedElement) source;
- }
-
- /**
- * @generated
- */
- protected NamedElement getTarget() {
- return (NamedElement) target;
- }
-
- /**
- * @generated
- */
- public Package getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container.
- * Modify with appropriate logic.
- *
- * @generated
- */
- protected Package deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for (EObject element = source; element != null; element = element.eContainer()) {
- if (element instanceof Package) {
- return (Package) element;
- }
- }
- return null;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * @generated
+ */
+public class DependencyCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ protected final EObject source;
+
+ /**
+ * @generated
+ */
+ protected final EObject target;
+
+ /**
+ * @generated
+ */
+ protected Package container;
+
+ /**
+ * @generated
+ */
+ public DependencyCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
+ super(request.getLabel(), null, request);
+ this.source = source;
+ this.target = target;
+ container = deduceContainer(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (source == null && target == null) {
+ return false;
+ }
+ if (source != null && false == source instanceof NamedElement) {
+ return false;
+ }
+ if (target != null && false == target instanceof NamedElement) {
+ return false;
+ }
+ if (getSource() == null) {
+ return true; // link creation is in progress; source is not defined yet
+ }
+ // target may be null here but it's possible to check constraint
+ if (getContainer() == null) {
+ return false;
+ }
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateDependency_4004(getContainer(), getSource(), getTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ 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());
+ newElement.getSuppliers()
+ .add(getTarget());
+ ElementInitializers.getInstance().init_Dependency_4004(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Dependency 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());
+ configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
+ configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute()) {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setElementToEdit(EObject element) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getSource() {
+ return (NamedElement) source;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getTarget() {
+ return (NamedElement) target;
+ }
+
+ /**
+ * @generated
+ */
+ public Package getContainer() {
+ return container;
+ }
+
+ /**
+ * Default approach is to traverse ancestors of the source to find instance of container.
+ * Modify with appropriate logic.
+ *
+ * @generated
+ */
+ protected Package deduceContainer(EObject source, EObject target) {
+ // Find container element for the new link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null; element = element.eContainer()) {
+ if (element instanceof Package) {
+ return (Package) element;
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyNodeCreateCommand.java
index 13a97696bc6..1dd0bc440f1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyNodeCreateCommand.java
@@ -1,125 +1,125 @@
-/**
- * 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.deployment.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.uml2.uml.Dependency;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DependencyNodeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DependencyNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDependency());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- 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()) {
- 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");
- }
-
-
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Dependency 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);
- }
- }
-}
+/**
+ * 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.deployment.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.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class DependencyNodeCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public DependencyNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDependency());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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()) {
+ 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");
+ }
+
+
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Dependency 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyReorientCommand.java
index 85e73507858..258ae09f699 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyReorientCommand.java
@@ -1,187 +1,187 @@
-/**
- * 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.deployment.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.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Dependency;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @generated
- */
-public class DependencyReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public DependencyReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (false == getElementToEdit() instanceof Dependency) {
- return false;
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean canReorientSource() {
- if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
- return false;
- }
- if (getLink().getSuppliers()
- .size() != 1) {
- return false;
- }
- NamedElement target = getLink().getSuppliers()
- .get(0);
- if (!(getLink().eContainer() instanceof Package)) {
- return false;
- }
- Package container = (Package) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDependency_4004(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
- return false;
- }
- if (getLink().getClients()
- .size() != 1) {
- return false;
- }
- NamedElement source = getLink().getClients()
- .get(0);
- if (!(getLink().eContainer() instanceof Package)) {
- return false;
- }
- Package container = (Package) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDependency_4004(container, getLink(), source, getNewTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientSource() throws ExecutionException {
- getLink().getClients()
- .remove(getOldSource());
- getLink().getClients()
- .add(getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getLink().getSuppliers()
- .remove(getOldTarget());
- getLink().getSuppliers()
- .add(getNewTarget());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected Dependency getLink() {
- return (Dependency) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected NamedElement getOldSource() {
- return (NamedElement) oldEnd;
- }
-
- /**
- * @generated
- */
- protected NamedElement getNewSource() {
- return (NamedElement) newEnd;
- }
-
- /**
- * @generated
- */
- protected NamedElement getOldTarget() {
- return (NamedElement) oldEnd;
- }
-
- /**
- * @generated
- */
- protected NamedElement getNewTarget() {
- return (NamedElement) newEnd;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+
+/**
+ * @generated
+ */
+public class DependencyReorientCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private final int reorientDirection;
+
+ /**
+ * @generated
+ */
+ private final EObject oldEnd;
+
+ /**
+ * @generated
+ */
+ private final EObject newEnd;
+
+ /**
+ * @generated
+ */
+ public DependencyReorientCommand(ReorientRelationshipRequest request) {
+ super(request.getLabel(), request.getRelationship(), request);
+ reorientDirection = request.getDirection();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (false == getElementToEdit() instanceof Dependency) {
+ return false;
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return canReorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return canReorientTarget();
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientSource() {
+ if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
+ return false;
+ }
+ if (getLink().getSuppliers()
+ .size() != 1) {
+ return false;
+ }
+ NamedElement target = getLink().getSuppliers()
+ .get(0);
+ if (!(getLink().eContainer() instanceof Package)) {
+ return false;
+ }
+ Package container = (Package) getLink().eContainer();
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDependency_4004(container, getLink(), getNewSource(), target);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientTarget() {
+ if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
+ return false;
+ }
+ if (getLink().getClients()
+ .size() != 1) {
+ return false;
+ }
+ NamedElement source = getLink().getClients()
+ .get(0);
+ if (!(getLink().eContainer() instanceof Package)) {
+ return false;
+ }
+ Package container = (Package) getLink().eContainer();
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDependency_4004(container, getLink(), source, getNewTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (!canExecute()) {
+ throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return reorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return reorientTarget();
+ }
+ throw new IllegalStateException();
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientSource() throws ExecutionException {
+ getLink().getClients()
+ .remove(getOldSource());
+ getLink().getClients()
+ .add(getNewSource());
+ return CommandResult.newOKCommandResult(getLink());
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientTarget() throws ExecutionException {
+ getLink().getSuppliers()
+ .remove(getOldTarget());
+ getLink().getSuppliers()
+ .add(getNewTarget());
+ return CommandResult.newOKCommandResult(getLink());
+ }
+
+ /**
+ * @generated
+ */
+ protected Dependency getLink() {
+ return (Dependency) getElementToEdit();
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getOldSource() {
+ return (NamedElement) oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getNewSource() {
+ return (NamedElement) newEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getOldTarget() {
+ return (NamedElement) oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getNewTarget() {
+ return (NamedElement) newEnd;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentCreateCommand.java
index d20b87d0bc6..86e297b18b0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentCreateCommand.java
@@ -1,171 +1,171 @@
-/**
- * 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.deployment.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.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Deployment;
-import org.eclipse.uml2.uml.DeploymentTarget;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class DeploymentCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected DeploymentTarget container;
-
- /**
- * @generated
- */
- public DeploymentCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof NamedElement) {
- return false;
- }
- if (target != null && false == target instanceof NamedElement) {
- return false;
- }
- if (getSource() == null) {
- return true; // link creation is in progress; source is not defined yet
- }
- // target may be null here but it's possible to check constraint
- if (getContainer() == null) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateDeployment_4001(getContainer(), getSource(), getTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
- }
-
- Deployment newElement = UMLFactory.eINSTANCE.createDeployment();
- getContainer().getDeployments()
- .add(newElement);
- newElement.getClients()
- .add(getSource());
- newElement.getSuppliers()
- .add(getTarget());
- ElementInitializers.getInstance().init_Deployment_4001(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Deployment 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());
- configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
- configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected NamedElement getSource() {
- return (NamedElement) source;
- }
-
- /**
- * @generated
- */
- protected NamedElement getTarget() {
- return (NamedElement) target;
- }
-
- /**
- * @generated
- */
- public DeploymentTarget getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container.
- * Modify with appropriate logic.
- *
- * @generated
- */
- protected DeploymentTarget deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for (EObject element = source; element != null; element = element.eContainer()) {
- if (element instanceof DeploymentTarget) {
- return (DeploymentTarget) element;
- }
- }
- return null;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Deployment;
+import org.eclipse.uml2.uml.DeploymentTarget;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * @generated
+ */
+public class DeploymentCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ protected final EObject source;
+
+ /**
+ * @generated
+ */
+ protected final EObject target;
+
+ /**
+ * @generated
+ */
+ protected DeploymentTarget container;
+
+ /**
+ * @generated
+ */
+ public DeploymentCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
+ super(request.getLabel(), null, request);
+ this.source = source;
+ this.target = target;
+ container = deduceContainer(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (source == null && target == null) {
+ return false;
+ }
+ if (source != null && false == source instanceof NamedElement) {
+ return false;
+ }
+ if (target != null && false == target instanceof NamedElement) {
+ return false;
+ }
+ if (getSource() == null) {
+ return true; // link creation is in progress; source is not defined yet
+ }
+ // target may be null here but it's possible to check constraint
+ if (getContainer() == null) {
+ return false;
+ }
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateDeployment_4001(getContainer(), getSource(), getTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (!canExecute()) {
+ throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
+ }
+
+ Deployment newElement = UMLFactory.eINSTANCE.createDeployment();
+ getContainer().getDeployments()
+ .add(newElement);
+ newElement.getClients()
+ .add(getSource());
+ newElement.getSuppliers()
+ .add(getTarget());
+ ElementInitializers.getInstance().init_Deployment_4001(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Deployment 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());
+ configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
+ configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute()) {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setElementToEdit(EObject element) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getSource() {
+ return (NamedElement) source;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getTarget() {
+ return (NamedElement) target;
+ }
+
+ /**
+ * @generated
+ */
+ public DeploymentTarget getContainer() {
+ return container;
+ }
+
+ /**
+ * Default approach is to traverse ancestors of the source to find instance of container.
+ * Modify with appropriate logic.
+ *
+ * @generated
+ */
+ protected DeploymentTarget deduceContainer(EObject source, EObject target) {
+ // Find container element for the new link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null; element = element.eContainer()) {
+ if (element instanceof DeploymentTarget) {
+ return (DeploymentTarget) element;
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentReorientCommand.java
index 3651c491eaf..d47b7379fa5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentReorientCommand.java
@@ -1,187 +1,187 @@
-/**
- * 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.deployment.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.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Deployment;
-import org.eclipse.uml2.uml.DeploymentTarget;
-import org.eclipse.uml2.uml.NamedElement;
-
-/**
- * @generated
- */
-public class DeploymentReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public DeploymentReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (false == getElementToEdit() instanceof Deployment) {
- return false;
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean canReorientSource() {
- if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
- return false;
- }
- if (getLink().getSuppliers()
- .size() != 1) {
- return false;
- }
- NamedElement target = getLink().getSuppliers()
- .get(0);
- if (!(getLink().eContainer() instanceof DeploymentTarget)) {
- return false;
- }
- DeploymentTarget container = (DeploymentTarget) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDeployment_4001(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
- return false;
- }
- if (getLink().getClients()
- .size() != 1) {
- return false;
- }
- NamedElement source = getLink().getClients()
- .get(0);
- if (!(getLink().eContainer() instanceof DeploymentTarget)) {
- return false;
- }
- DeploymentTarget container = (DeploymentTarget) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDeployment_4001(container, getLink(), source, getNewTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientSource() throws ExecutionException {
- getLink().getClients()
- .remove(getOldSource());
- getLink().getClients()
- .add(getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getLink().getSuppliers()
- .remove(getOldTarget());
- getLink().getSuppliers()
- .add(getNewTarget());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected Deployment getLink() {
- return (Deployment) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected NamedElement getOldSource() {
- return (NamedElement) oldEnd;
- }
-
- /**
- * @generated
- */
- protected NamedElement getNewSource() {
- return (NamedElement) newEnd;
- }
-
- /**
- * @generated
- */
- protected NamedElement getOldTarget() {
- return (NamedElement) oldEnd;
- }
-
- /**
- * @generated
- */
- protected NamedElement getNewTarget() {
- return (NamedElement) newEnd;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.uml2.uml.Deployment;
+import org.eclipse.uml2.uml.DeploymentTarget;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * @generated
+ */
+public class DeploymentReorientCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private final int reorientDirection;
+
+ /**
+ * @generated
+ */
+ private final EObject oldEnd;
+
+ /**
+ * @generated
+ */
+ private final EObject newEnd;
+
+ /**
+ * @generated
+ */
+ public DeploymentReorientCommand(ReorientRelationshipRequest request) {
+ super(request.getLabel(), request.getRelationship(), request);
+ reorientDirection = request.getDirection();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (false == getElementToEdit() instanceof Deployment) {
+ return false;
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return canReorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return canReorientTarget();
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientSource() {
+ if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
+ return false;
+ }
+ if (getLink().getSuppliers()
+ .size() != 1) {
+ return false;
+ }
+ NamedElement target = getLink().getSuppliers()
+ .get(0);
+ if (!(getLink().eContainer() instanceof DeploymentTarget)) {
+ return false;
+ }
+ DeploymentTarget container = (DeploymentTarget) getLink().eContainer();
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDeployment_4001(container, getLink(), getNewSource(), target);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientTarget() {
+ if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
+ return false;
+ }
+ if (getLink().getClients()
+ .size() != 1) {
+ return false;
+ }
+ NamedElement source = getLink().getClients()
+ .get(0);
+ if (!(getLink().eContainer() instanceof DeploymentTarget)) {
+ return false;
+ }
+ DeploymentTarget container = (DeploymentTarget) getLink().eContainer();
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistDeployment_4001(container, getLink(), source, getNewTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (!canExecute()) {
+ throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return reorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return reorientTarget();
+ }
+ throw new IllegalStateException();
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientSource() throws ExecutionException {
+ getLink().getClients()
+ .remove(getOldSource());
+ getLink().getClients()
+ .add(getNewSource());
+ return CommandResult.newOKCommandResult(getLink());
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientTarget() throws ExecutionException {
+ getLink().getSuppliers()
+ .remove(getOldTarget());
+ getLink().getSuppliers()
+ .add(getNewTarget());
+ return CommandResult.newOKCommandResult(getLink());
+ }
+
+ /**
+ * @generated
+ */
+ protected Deployment getLink() {
+ return (Deployment) getElementToEdit();
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getOldSource() {
+ return (NamedElement) oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getNewSource() {
+ return (NamedElement) newEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getOldTarget() {
+ return (NamedElement) oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getNewTarget() {
+ return (NamedElement) newEnd;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommand.java
index 03a65a41665..bcc579a44b3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommand.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Device;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DeviceCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DeviceCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDevice());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Device newElement = UMLFactory.eINSTANCE.createDevice();
-
- 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_Device_2003(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Device 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Device;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class DeviceCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public DeviceCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDevice());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Device newElement = UMLFactory.eINSTANCE.createDevice();
+
+ 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_Device_2003(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Device 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommandCN.java
index 67a93ad2847..dbe712dcfa6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Device;
-import org.eclipse.uml2.uml.Node;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DeviceCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public DeviceCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDevice());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Device newElement = UMLFactory.eINSTANCE.createDevice();
-
- 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 {
-
- Node qualifiedTarget = (Node) target;
- qualifiedTarget.getNestedNodes()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Device_16(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Device 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Device;
+import org.eclipse.uml2.uml.Node;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class DeviceCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public DeviceCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDevice());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Device newElement = UMLFactory.eINSTANCE.createDevice();
+
+ 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 {
+
+ Node qualifiedTarget = (Node) target;
+ qualifiedTarget.getNestedNodes()
+ .add(newElement);
+
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
+
+
+ ElementInitializers.getInstance().init_Device_16(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Device 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommand.java
index 6465eb241aa..5280e6d1e5b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommand.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.ExecutionEnvironment;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ExecutionEnvironmentCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExecutionEnvironment());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- ExecutionEnvironment newElement = UMLFactory.eINSTANCE.createExecutionEnvironment();
-
- 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_ExecutionEnvironment_2002(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(ExecutionEnvironment 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.ExecutionEnvironment;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ExecutionEnvironmentCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ExecutionEnvironmentCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExecutionEnvironment());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ ExecutionEnvironment newElement = UMLFactory.eINSTANCE.createExecutionEnvironment();
+
+ 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_ExecutionEnvironment_2002(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(ExecutionEnvironment 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommandCN.java
index 5afc5ff2cb8..03ba84dff58 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.ExecutionEnvironment;
-import org.eclipse.uml2.uml.Node;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ExecutionEnvironmentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExecutionEnvironment());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- ExecutionEnvironment newElement = UMLFactory.eINSTANCE.createExecutionEnvironment();
-
- 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 {
-
- Node qualifiedTarget = (Node) target;
- qualifiedTarget.getNestedNodes()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_ExecutionEnvironment_21(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(ExecutionEnvironment 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.ExecutionEnvironment;
+import org.eclipse.uml2.uml.Node;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ExecutionEnvironmentCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ExecutionEnvironmentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExecutionEnvironment());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ ExecutionEnvironment newElement = UMLFactory.eINSTANCE.createExecutionEnvironment();
+
+ 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 {
+
+ Node qualifiedTarget = (Node) target;
+ qualifiedTarget.getNestedNodes()
+ .add(newElement);
+
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
+
+
+ ElementInitializers.getInstance().init_ExecutionEnvironment_21(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(ExecutionEnvironment 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationCreateCommand.java
index f2428713352..6ecafe49515 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationCreateCommand.java
@@ -1,170 +1,170 @@
-/**
- * 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.deployment.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.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.Generalization;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class GeneralizationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Classifier container;
-
- /**
- * @generated
- */
- public GeneralizationCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof Classifier) {
- return false;
- }
- if (target != null && false == target instanceof Classifier) {
- return false;
- }
- if (getSource() == null) {
- return true; // link creation is in progress; source is not defined yet
- }
- // target may be null here but it's possible to check constraint
- if (getContainer() == null) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateGeneralization_4003(getContainer(), getSource(), getTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
- }
-
- Generalization newElement = UMLFactory.eINSTANCE.createGeneralization();
- getContainer().getGeneralizations()
- .add(newElement);
- newElement.setSpecific(
- getSource()
- );
- newElement.setGeneral(
- getTarget()
- );
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Generalization 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());
- configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
- configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected Classifier getSource() {
- return (Classifier) source;
- }
-
- /**
- * @generated
- */
- protected Classifier getTarget() {
- return (Classifier) target;
- }
-
- /**
- * @generated
- */
- public Classifier getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container.
- * Modify with appropriate logic.
- *
- * @generated
- */
- protected Classifier deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for (EObject element = source; element != null; element = element.eContainer()) {
- if (element instanceof Classifier) {
- return (Classifier) element;
- }
- }
- return null;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * @generated
+ */
+public class GeneralizationCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ protected final EObject source;
+
+ /**
+ * @generated
+ */
+ protected final EObject target;
+
+ /**
+ * @generated
+ */
+ protected Classifier container;
+
+ /**
+ * @generated
+ */
+ public GeneralizationCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
+ super(request.getLabel(), null, request);
+ this.source = source;
+ this.target = target;
+ container = deduceContainer(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (source == null && target == null) {
+ return false;
+ }
+ if (source != null && false == source instanceof Classifier) {
+ return false;
+ }
+ if (target != null && false == target instanceof Classifier) {
+ return false;
+ }
+ if (getSource() == null) {
+ return true; // link creation is in progress; source is not defined yet
+ }
+ // target may be null here but it's possible to check constraint
+ if (getContainer() == null) {
+ return false;
+ }
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateGeneralization_4003(getContainer(), getSource(), getTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (!canExecute()) {
+ throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
+ }
+
+ Generalization newElement = UMLFactory.eINSTANCE.createGeneralization();
+ getContainer().getGeneralizations()
+ .add(newElement);
+ newElement.setSpecific(
+ getSource()
+ );
+ newElement.setGeneral(
+ getTarget()
+ );
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Generalization 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());
+ configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
+ configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute()) {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setElementToEdit(EObject element) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @generated
+ */
+ protected Classifier getSource() {
+ return (Classifier) source;
+ }
+
+ /**
+ * @generated
+ */
+ protected Classifier getTarget() {
+ return (Classifier) target;
+ }
+
+ /**
+ * @generated
+ */
+ public Classifier getContainer() {
+ return container;
+ }
+
+ /**
+ * Default approach is to traverse ancestors of the source to find instance of container.
+ * Modify with appropriate logic.
+ *
+ * @generated
+ */
+ protected Classifier deduceContainer(EObject source, EObject target) {
+ // Find container element for the new link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null; element = element.eContainer()) {
+ if (element instanceof Classifier) {
+ return (Classifier) element;
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationReorientCommand.java
index b129eeda25f..94060861f70 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationReorientCommand.java
@@ -1,174 +1,174 @@
-/**
- * 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.deployment.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.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.Generalization;
-
-/**
- * @generated
- */
-public class GeneralizationReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public GeneralizationReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (false == getElementToEdit() instanceof Generalization) {
- return false;
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean canReorientSource() {
- if (!(oldEnd instanceof Classifier && newEnd instanceof Classifier)) {
- return false;
- }
- Classifier target = getLink().getGeneral();
- if (!(getLink().eContainer() instanceof Classifier)) {
- return false;
- }
- Classifier container = (Classifier) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistGeneralization_4003(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof Classifier && newEnd instanceof Classifier)) {
- return false;
- }
- Classifier source = getLink().getSpecific();
- if (!(getLink().eContainer() instanceof Classifier)) {
- return false;
- }
- Classifier container = (Classifier) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistGeneralization_4003(container, getLink(), source, getNewTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientSource() throws ExecutionException {
- getLink().setSpecific(
- getNewSource()
- );
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getLink().setGeneral(
- getNewTarget()
- );
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected Generalization getLink() {
- return (Generalization) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected Classifier getOldSource() {
- return (Classifier) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Classifier getNewSource() {
- return (Classifier) newEnd;
- }
-
- /**
- * @generated
- */
- protected Classifier getOldTarget() {
- return (Classifier) oldEnd;
- }
-
- /**
- * @generated
- */
- protected Classifier getNewTarget() {
- return (Classifier) newEnd;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Generalization;
+
+/**
+ * @generated
+ */
+public class GeneralizationReorientCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private final int reorientDirection;
+
+ /**
+ * @generated
+ */
+ private final EObject oldEnd;
+
+ /**
+ * @generated
+ */
+ private final EObject newEnd;
+
+ /**
+ * @generated
+ */
+ public GeneralizationReorientCommand(ReorientRelationshipRequest request) {
+ super(request.getLabel(), request.getRelationship(), request);
+ reorientDirection = request.getDirection();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (false == getElementToEdit() instanceof Generalization) {
+ return false;
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return canReorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return canReorientTarget();
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientSource() {
+ if (!(oldEnd instanceof Classifier && newEnd instanceof Classifier)) {
+ return false;
+ }
+ Classifier target = getLink().getGeneral();
+ if (!(getLink().eContainer() instanceof Classifier)) {
+ return false;
+ }
+ Classifier container = (Classifier) getLink().eContainer();
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistGeneralization_4003(container, getLink(), getNewSource(), target);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientTarget() {
+ if (!(oldEnd instanceof Classifier && newEnd instanceof Classifier)) {
+ return false;
+ }
+ Classifier source = getLink().getSpecific();
+ if (!(getLink().eContainer() instanceof Classifier)) {
+ return false;
+ }
+ Classifier container = (Classifier) getLink().eContainer();
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistGeneralization_4003(container, getLink(), source, getNewTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (!canExecute()) {
+ throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return reorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return reorientTarget();
+ }
+ throw new IllegalStateException();
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientSource() throws ExecutionException {
+ getLink().setSpecific(
+ getNewSource()
+ );
+ return CommandResult.newOKCommandResult(getLink());
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientTarget() throws ExecutionException {
+ getLink().setGeneral(
+ getNewTarget()
+ );
+ return CommandResult.newOKCommandResult(getLink());
+ }
+
+ /**
+ * @generated
+ */
+ protected Generalization getLink() {
+ return (Generalization) getElementToEdit();
+ }
+
+ /**
+ * @generated
+ */
+ protected Classifier getOldSource() {
+ return (Classifier) oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected Classifier getNewSource() {
+ return (Classifier) newEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected Classifier getOldTarget() {
+ return (Classifier) oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected Classifier getNewTarget() {
+ return (Classifier) newEnd;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationCreateCommand.java
index fbd507acf85..b0ea85be7c9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationCreateCommand.java
@@ -1,171 +1,171 @@
-/**
- * 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.deployment.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.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Artifact;
-import org.eclipse.uml2.uml.Manifestation;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class ManifestationCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- protected final EObject source;
-
- /**
- * @generated
- */
- protected final EObject target;
-
- /**
- * @generated
- */
- protected Artifact container;
-
- /**
- * @generated
- */
- public ManifestationCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
- super(request.getLabel(), null, request);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (source == null && target == null) {
- return false;
- }
- if (source != null && false == source instanceof NamedElement) {
- return false;
- }
- if (target != null && false == target instanceof NamedElement) {
- return false;
- }
- if (getSource() == null) {
- return true; // link creation is in progress; source is not defined yet
- }
- // target may be null here but it's possible to check constraint
- if (getContainer() == null) {
- return false;
- }
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateManifestation_4002(getContainer(), getSource(), getTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
- }
-
- Manifestation newElement = UMLFactory.eINSTANCE.createManifestation();
- getContainer().getManifestations()
- .add(newElement);
- newElement.getClients()
- .add(getSource());
- newElement.getSuppliers()
- .add(getTarget());
- ElementInitializers.getInstance().init_Manifestation_4002(newElement);
- doConfigure(newElement, monitor, info);
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
-
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Manifestation 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());
- configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
- configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setElementToEdit(EObject element) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @generated
- */
- protected NamedElement getSource() {
- return (NamedElement) source;
- }
-
- /**
- * @generated
- */
- protected NamedElement getTarget() {
- return (NamedElement) target;
- }
-
- /**
- * @generated
- */
- public Artifact getContainer() {
- return container;
- }
-
- /**
- * Default approach is to traverse ancestors of the source to find instance of container.
- * Modify with appropriate logic.
- *
- * @generated
- */
- protected Artifact deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for (EObject element = source; element != null; element = element.eContainer()) {
- if (element instanceof Artifact) {
- return (Artifact) element;
- }
- }
- return null;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Artifact;
+import org.eclipse.uml2.uml.Manifestation;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * @generated
+ */
+public class ManifestationCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ protected final EObject source;
+
+ /**
+ * @generated
+ */
+ protected final EObject target;
+
+ /**
+ * @generated
+ */
+ protected Artifact container;
+
+ /**
+ * @generated
+ */
+ public ManifestationCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
+ super(request.getLabel(), null, request);
+ this.source = source;
+ this.target = target;
+ container = deduceContainer(source, target);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (source == null && target == null) {
+ return false;
+ }
+ if (source != null && false == source instanceof NamedElement) {
+ return false;
+ }
+ if (target != null && false == target instanceof NamedElement) {
+ return false;
+ }
+ if (getSource() == null) {
+ return true; // link creation is in progress; source is not defined yet
+ }
+ // target may be null here but it's possible to check constraint
+ if (getContainer() == null) {
+ return false;
+ }
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateManifestation_4002(getContainer(), getSource(), getTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (!canExecute()) {
+ throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
+ }
+
+ Manifestation newElement = UMLFactory.eINSTANCE.createManifestation();
+ getContainer().getManifestations()
+ .add(newElement);
+ newElement.getClients()
+ .add(getSource());
+ newElement.getSuppliers()
+ .add(getTarget());
+ ElementInitializers.getInstance().init_Manifestation_4002(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Manifestation 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());
+ configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
+ configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute()) {
+ configureCommand.execute(monitor, info);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setElementToEdit(EObject element) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getSource() {
+ return (NamedElement) source;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getTarget() {
+ return (NamedElement) target;
+ }
+
+ /**
+ * @generated
+ */
+ public Artifact getContainer() {
+ return container;
+ }
+
+ /**
+ * Default approach is to traverse ancestors of the source to find instance of container.
+ * Modify with appropriate logic.
+ *
+ * @generated
+ */
+ protected Artifact deduceContainer(EObject source, EObject target) {
+ // Find container element for the new link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null; element = element.eContainer()) {
+ if (element instanceof Artifact) {
+ return (Artifact) element;
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationReorientCommand.java
index d0218a3570d..647b5bc4be4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationReorientCommand.java
@@ -1,187 +1,187 @@
-/**
- * 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.deployment.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.emf.type.core.commands.EditElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.uml2.uml.Artifact;
-import org.eclipse.uml2.uml.Manifestation;
-import org.eclipse.uml2.uml.NamedElement;
-
-/**
- * @generated
- */
-public class ManifestationReorientCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private final int reorientDirection;
-
- /**
- * @generated
- */
- private final EObject oldEnd;
-
- /**
- * @generated
- */
- private final EObject newEnd;
-
- /**
- * @generated
- */
- public ManifestationReorientCommand(ReorientRelationshipRequest request) {
- super(request.getLabel(), request.getRelationship(), request);
- reorientDirection = request.getDirection();
- oldEnd = request.getOldRelationshipEnd();
- newEnd = request.getNewRelationshipEnd();
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
- if (false == getElementToEdit() instanceof Manifestation) {
- return false;
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return canReorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return canReorientTarget();
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean canReorientSource() {
- if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
- return false;
- }
- if (getLink().getSuppliers()
- .size() != 1) {
- return false;
- }
- NamedElement target = getLink().getSuppliers()
- .get(0);
- if (!(getLink().eContainer() instanceof Artifact)) {
- return false;
- }
- Artifact container = (Artifact) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistManifestation_4002(container, getLink(), getNewSource(), target);
- }
-
- /**
- * @generated
- */
- protected boolean canReorientTarget() {
- if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
- return false;
- }
- if (getLink().getClients()
- .size() != 1) {
- return false;
- }
- NamedElement source = getLink().getClients()
- .get(0);
- if (!(getLink().eContainer() instanceof Artifact)) {
- return false;
- }
- Artifact container = (Artifact) getLink().eContainer();
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistManifestation_4002(container, getLink(), source, getNewTarget());
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if (!canExecute()) {
- throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
- }
- if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
- return reorientSource();
- }
- if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
- return reorientTarget();
- }
- throw new IllegalStateException();
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientSource() throws ExecutionException {
- getLink().getClients()
- .remove(getOldSource());
- getLink().getClients()
- .add(getNewSource());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected CommandResult reorientTarget() throws ExecutionException {
- getLink().getSuppliers()
- .remove(getOldTarget());
- getLink().getSuppliers()
- .add(getNewTarget());
- return CommandResult.newOKCommandResult(getLink());
- }
-
- /**
- * @generated
- */
- protected Manifestation getLink() {
- return (Manifestation) getElementToEdit();
- }
-
- /**
- * @generated
- */
- protected NamedElement getOldSource() {
- return (NamedElement) oldEnd;
- }
-
- /**
- * @generated
- */
- protected NamedElement getNewSource() {
- return (NamedElement) newEnd;
- }
-
- /**
- * @generated
- */
- protected NamedElement getOldTarget() {
- return (NamedElement) oldEnd;
- }
-
- /**
- * @generated
- */
- protected NamedElement getNewTarget() {
- return (NamedElement) newEnd;
- }
-}
+/**
+ * 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.deployment.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.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRequest;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.uml2.uml.Artifact;
+import org.eclipse.uml2.uml.Manifestation;
+import org.eclipse.uml2.uml.NamedElement;
+
+/**
+ * @generated
+ */
+public class ManifestationReorientCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private final int reorientDirection;
+
+ /**
+ * @generated
+ */
+ private final EObject oldEnd;
+
+ /**
+ * @generated
+ */
+ private final EObject newEnd;
+
+ /**
+ * @generated
+ */
+ public ManifestationReorientCommand(ReorientRelationshipRequest request) {
+ super(request.getLabel(), request.getRelationship(), request);
+ reorientDirection = request.getDirection();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+ if (false == getElementToEdit() instanceof Manifestation) {
+ return false;
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return canReorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return canReorientTarget();
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientSource() {
+ if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
+ return false;
+ }
+ if (getLink().getSuppliers()
+ .size() != 1) {
+ return false;
+ }
+ NamedElement target = getLink().getSuppliers()
+ .get(0);
+ if (!(getLink().eContainer() instanceof Artifact)) {
+ return false;
+ }
+ Artifact container = (Artifact) getLink().eContainer();
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistManifestation_4002(container, getLink(), getNewSource(), target);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean canReorientTarget() {
+ if (!(oldEnd instanceof NamedElement && newEnd instanceof NamedElement)) {
+ return false;
+ }
+ if (getLink().getClients()
+ .size() != 1) {
+ return false;
+ }
+ NamedElement source = getLink().getClients()
+ .get(0);
+ if (!(getLink().eContainer() instanceof Artifact)) {
+ return false;
+ }
+ Artifact container = (Artifact) getLink().eContainer();
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistManifestation_4002(container, getLink(), source, getNewTarget());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if (!canExecute()) {
+ throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ return reorientSource();
+ }
+ if (reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ return reorientTarget();
+ }
+ throw new IllegalStateException();
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientSource() throws ExecutionException {
+ getLink().getClients()
+ .remove(getOldSource());
+ getLink().getClients()
+ .add(getNewSource());
+ return CommandResult.newOKCommandResult(getLink());
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult reorientTarget() throws ExecutionException {
+ getLink().getSuppliers()
+ .remove(getOldTarget());
+ getLink().getSuppliers()
+ .add(getNewTarget());
+ return CommandResult.newOKCommandResult(getLink());
+ }
+
+ /**
+ * @generated
+ */
+ protected Manifestation getLink() {
+ return (Manifestation) getElementToEdit();
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getOldSource() {
+ return (NamedElement) oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getNewSource() {
+ return (NamedElement) newEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getOldTarget() {
+ return (NamedElement) oldEnd;
+ }
+
+ /**
+ * @generated
+ */
+ protected NamedElement getNewTarget() {
+ return (NamedElement) newEnd;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommand.java
index a6654f3f0ea..49d6b910ebc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommand.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Model;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ModelCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ModelCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- 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()) {
- 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_Model_2010(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Model 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ModelCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ModelCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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()) {
+ 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_Model_2010(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Model 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommandCN.java
index d34d78a54d9..1d21882522c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Model;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ModelCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public ModelCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- 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()) {
- 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_Model_49(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Model 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ModelCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ModelCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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()) {
+ 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_Model_49(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Model 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedArtifactNodeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedArtifactNodeCreateCommandCN.java
index ab643803c57..eccd8363066 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedArtifactNodeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedArtifactNodeCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Artifact;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class NestedArtifactNodeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public NestedArtifactNodeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
-
- 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_Artifact_40(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Artifact 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Artifact;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class NestedArtifactNodeCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public NestedArtifactNodeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
+
+ 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_Artifact_40(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Artifact 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedDeviceCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedDeviceCreateCommandCN.java
index 0737955324c..892dec48f28 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedDeviceCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedDeviceCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Device;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class NestedDeviceCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public NestedDeviceCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDevice());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Device newElement = UMLFactory.eINSTANCE.createDevice();
-
- 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_Device_44(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Device 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Device;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class NestedDeviceCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public NestedDeviceCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDevice());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Device newElement = UMLFactory.eINSTANCE.createDevice();
+
+ 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_Device_44(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Device 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedExecutionEnvironmentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedExecutionEnvironmentCreateCommandCN.java
index 8fc895a4198..054e9ba971c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedExecutionEnvironmentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedExecutionEnvironmentCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.ExecutionEnvironment;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class NestedExecutionEnvironmentCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public NestedExecutionEnvironmentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExecutionEnvironment());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- ExecutionEnvironment newElement = UMLFactory.eINSTANCE.createExecutionEnvironment();
-
- 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_ExecutionEnvironment_46(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(ExecutionEnvironment 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.ExecutionEnvironment;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class NestedExecutionEnvironmentCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public NestedExecutionEnvironmentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExecutionEnvironment());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ ExecutionEnvironment newElement = UMLFactory.eINSTANCE.createExecutionEnvironment();
+
+ 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_ExecutionEnvironment_46(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(ExecutionEnvironment 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedNodeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedNodeCreateCommandCN.java
index 6259b7784a1..8d7eb1935c0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedNodeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedNodeCreateCommandCN.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Node;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class NestedNodeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public NestedNodeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNode());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Node newElement = UMLFactory.eINSTANCE.createNode();
-
- 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_Node_42(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Node 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Node;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class NestedNodeCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public NestedNodeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNode());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Node newElement = UMLFactory.eINSTANCE.createNode();
+
+ 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_Node_42(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Node 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommand.java
index e39b52e9d8e..eb9cc5ecef9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommand.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Node;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class NodeCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public NodeCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNode());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Node newElement = UMLFactory.eINSTANCE.createNode();
-
- 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_Node_2008(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Node 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Node;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class NodeCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public NodeCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNode());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Node newElement = UMLFactory.eINSTANCE.createNode();
+
+ 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_Node_2008(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Node 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommandCN.java
index 1ea9b660270..dd4fb105669 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommandCN.java
@@ -1,126 +1,126 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Node;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class NodeCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public NodeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNode());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- Node newElement = UMLFactory.eINSTANCE.createNode();
-
- 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 {
-
- Node qualifiedTarget = (Node) target;
- qualifiedTarget.getNestedNodes()
- .add(newElement);
-
- }
- } else {
- return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
- }
-
-
- ElementInitializers.getInstance().init_Node_23(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Node 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Node;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class NodeCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public NodeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNode());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+
+ Node newElement = UMLFactory.eINSTANCE.createNode();
+
+ 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 {
+
+ Node qualifiedTarget = (Node) target;
+ qualifiedTarget.getNestedNodes()
+ .add(newElement);
+
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
+
+
+ ElementInitializers.getInstance().init_Node_23(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Node 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommand.java
index 88505e1aac8..9128a15766a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommand.java
@@ -1,126 +1,126 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class PackageCreateCommand extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public PackageCreateCommand(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- 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()) {
- 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_Package_2009(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Package 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class PackageCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public PackageCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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()) {
+ 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_Package_2009(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Package 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommandCN.java
index bae1b23cf28..5c0931f0f6f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommandCN.java
@@ -1,126 +1,126 @@
-/**
- * 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.deployment.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.deployment.providers.ElementInitializers;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class PackageCreateCommandCN extends EditElementCommand {
-
- /**
- * @generated
- */
- private Diagram diagram = null;
-
- /**
- * @generated
- */
- public PackageCreateCommandCN(CreateElementRequest req, Diagram diagram) {
- super(req.getLabel(), null, req);
- this.diagram = diagram;
- }
-
- /**
- * FIXME: replace with setElementToEdit()
- *
- * @generated
- */
- @Override
- protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest()).getContainer();
- if (container instanceof View) {
- container = ((View) container).getElement();
- }
- return container;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean canExecute() {
-
- EObject target = getElementToEdit();
- ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
- return data.isPermitted();
-
-
- }
-
- /**
- * @generated
- */
- @Override
- 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()) {
- 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_Package_36(newElement);
-
- doConfigure(newElement, monitor, info);
-
- ((CreateElementRequest) getRequest()).setNewElement(newElement);
- return CommandResult.newOKCommandResult(newElement);
- }
-
- /**
- * @generated
- */
- protected void doConfigure(Package 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);
- }
- }
-}
+/**
+ * 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.deployment.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.deployment.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class PackageCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public PackageCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ *
+ * @generated
+ */
+ @Override
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof View) {
+ container = ((View) container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean canExecute() {
+
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
+ return data.isPermitted();
+
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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()) {
+ 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_Package_36(newElement);
+
+ doConfigure(newElement, monitor, info);
+
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Package 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPart.java
index 3adbf4b7e0f..9890a677575 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPart.java
@@ -1,137 +1,139 @@
-/**
- * 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.deployment.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.ShapeCompartmentEditPart;
-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.CustomContainerEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-
-/**
- * @generated
- */
-public class ArtifactCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 26;
-
- /**
- * @generated
- */
- public ArtifactCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ArtifactCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactCompositeCompartmentCanonicalEditPolicy());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
-
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-}
+/**
+ * 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.deployment.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.ShapeCompartmentEditPart;
+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.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactCompositeCompartmentItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+
+/**
+ * @generated
+ */
+public class ArtifactCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 26;
+
+ /**
+ * @generated
+ */
+ public ArtifactCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.ArtifactCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactCompositeCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactCompositeCompartmentCanonicalEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPartACN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPartACN.java
index c55f2809efb..fffb6818647 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPartACN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPartACN.java
@@ -1,137 +1,139 @@
-/**
- * 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.deployment.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.ShapeCompartmentEditPart;
-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.CustomContainerEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactCompositeCompartmentItemSemanticEditPolicyACN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-
-/**
- * @generated
- */
-public class ArtifactCompositeCompartmentEditPartACN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 34;
-
- /**
- * @generated
- */
- public ArtifactCompositeCompartmentEditPartACN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ArtifactCompositeCompartmentEditPartACN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactCompositeCompartmentItemSemanticEditPolicyACN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactCompositeCompartmentCanonicalEditPolicyACN());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
-
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-}
+/**
+ * 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.deployment.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.ShapeCompartmentEditPart;
+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.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactCompositeCompartmentItemSemanticEditPolicyACN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+
+/**
+ * @generated
+ */
+public class ArtifactCompositeCompartmentEditPartACN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 34;
+
+ /**
+ * @generated
+ */
+ public ArtifactCompositeCompartmentEditPartACN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.ArtifactCompositeCompartmentEditPartACN_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactCompositeCompartmentItemSemanticEditPolicyACN());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactCompositeCompartmentCanonicalEditPolicyACN());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPartCN.java
index c14b9eb4f6d..e10c2117bc0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactCompositeCompartmentEditPartCN.java
@@ -1,137 +1,139 @@
-/**
- * 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.deployment.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.ShapeCompartmentEditPart;
-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.CustomContainerEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-
-/**
- * @generated
- */
-public class ArtifactCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 33;
-
- /**
- * @generated
- */
- public ArtifactCompositeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ArtifactCompositeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactCompositeCompartmentCanonicalEditPolicyCN());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
-
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-}
+/**
+ * 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.deployment.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.ShapeCompartmentEditPart;
+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.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactCompositeCompartmentItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+
+/**
+ * @generated
+ */
+public class ArtifactCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 33;
+
+ /**
+ * @generated
+ */
+ public ArtifactCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.ArtifactCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactCompositeCompartmentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactCompositeCompartmentCanonicalEditPolicyCN());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPart.java
index 1abb3059960..fe8d3ec9206 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPart.java
@@ -1,303 +1,360 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ArtifactEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2006;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ArtifactEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ArtifactFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure
- *
- * @generated
- */
- @Override
- public ArtifactFigure getPrimaryShape() {
- return (ArtifactFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ArtifactNameEditPart) {
- ((ArtifactNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- if (childEditPart instanceof ArtifactCompositeCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ArtifactCompositeCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ArtifactNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ArtifactCompositeCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ArtifactCompositeCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ArtifactCompositeCompartmentEditPart) {
- return getPrimaryShape().getCompositeCompartmentFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 70);
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ArtifactNameEditPart.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+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.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ArtifactEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2006;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ArtifactEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ArtifactFloatingLabelEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ArtifactFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure
+ *
+ * @generated
+ */
+ @Override
+ public ArtifactFigure getPrimaryShape() {
+ return (ArtifactFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ArtifactNameEditPart) {
+ ((ArtifactNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ if (childEditPart instanceof ArtifactCompositeCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ArtifactCompositeCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ArtifactNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ArtifactCompositeCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ pane.remove(((ArtifactCompositeCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof ArtifactCompositeCompartmentEditPart) {
+ return getPrimaryShape().getCompositeCompartmentFigure();
+ }
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof ArtifactFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 70);
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ArtifactNameEditPart.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPartACN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPartACN.java
index c2aa568d833..feb72347227 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPartACN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPartACN.java
@@ -1,303 +1,360 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactItemSemanticEditPolicyACN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ArtifactEditPartACN extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 28;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ArtifactEditPartACN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactItemSemanticEditPolicyACN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ArtifactFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure
- *
- * @generated
- */
- @Override
- public ArtifactFigure getPrimaryShape() {
- return (ArtifactFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ArtifactNameEditPartACN) {
- ((ArtifactNameEditPartACN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- if (childEditPart instanceof ArtifactCompositeCompartmentEditPartACN) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ArtifactCompositeCompartmentEditPartACN) childEditPart).getFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ArtifactNameEditPartACN) {
- return true;
- }
- if (childEditPart instanceof ArtifactCompositeCompartmentEditPartACN) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ArtifactCompositeCompartmentEditPartACN) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ArtifactCompositeCompartmentEditPartACN) {
- return getPrimaryShape().getCompositeCompartmentFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 70);
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ArtifactNameEditPartACN.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+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.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactItemSemanticEditPolicyACN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ArtifactEditPartACN extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 28;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ArtifactEditPartACN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactItemSemanticEditPolicyACN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ArtifactFloatingLabelEditPartACN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ArtifactFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure
+ *
+ * @generated
+ */
+ @Override
+ public ArtifactFigure getPrimaryShape() {
+ return (ArtifactFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ArtifactNameEditPartACN) {
+ ((ArtifactNameEditPartACN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ if (childEditPart instanceof ArtifactCompositeCompartmentEditPartACN) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ArtifactCompositeCompartmentEditPartACN) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ArtifactNameEditPartACN) {
+ return true;
+ }
+ if (childEditPart instanceof ArtifactCompositeCompartmentEditPartACN) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ pane.remove(((ArtifactCompositeCompartmentEditPartACN) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof ArtifactCompositeCompartmentEditPartACN) {
+ return getPrimaryShape().getCompositeCompartmentFigure();
+ }
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof ArtifactFloatingLabelEditPartACN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 70);
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ArtifactNameEditPartACN.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPartCN.java
index 1ba8223eb63..4725d5e31e9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactEditPartCN.java
@@ -1,288 +1,360 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ArtifactEditPartCN extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 25;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ArtifactEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ArtifactFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure
- *
- * @generated
- */
- @Override
- public ArtifactFigure getPrimaryShape() {
- return (ArtifactFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ArtifactNameEditPartCN) {
- ((ArtifactNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ArtifactNameEditPartCN) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 70);
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ArtifactNameEditPartCN.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+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.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ArtifactItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ArtifactEditPartCN extends RoundedCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 25;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ArtifactEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ArtifactItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ArtifactFloatingLabelEditPartCN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ArtifactFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure
+ *
+ * @generated
+ */
+ @Override
+ public ArtifactFigure getPrimaryShape() {
+ return (ArtifactFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ArtifactNameEditPartCN) {
+ ((ArtifactNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ if (childEditPart instanceof ArtifactCompositeCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ArtifactCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ArtifactNameEditPartCN) {
+ return true;
+ }
+ if (childEditPart instanceof ArtifactCompositeCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ pane.remove(((ArtifactCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof ArtifactCompositeCompartmentEditPartCN) {
+ return getPrimaryShape().getCompositeCompartmentFigure();
+ }
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof ArtifactFloatingLabelEditPartCN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 70);
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ArtifactNameEditPartCN.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPart.java
new file mode 100644
index 00000000000..a9a2d23a59b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.deployment.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ArtifactFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 61;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ArtifactFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_2006, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPartACN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPartACN.java
new file mode 100644
index 00000000000..0aa455a6478
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPartACN.java
@@ -0,0 +1,861 @@
+/**
+ * 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.deployment.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ArtifactFloatingLabelEditPartACN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 60;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPartACN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ArtifactFloatingLabelEditPartACN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_28, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPartACN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPartCN.java
new file mode 100644
index 00000000000..b7c58782dc0
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactFloatingLabelEditPartCN.java
@@ -0,0 +1,861 @@
+/**
+ * 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.deployment.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ArtifactFloatingLabelEditPartCN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 59;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPartCN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ArtifactFloatingLabelEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_25, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPart.java
index 0f72f2d30d9..e5a087fa56a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPart.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 ArtifactNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 8;
-
- /**
- * @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 ArtifactNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_2006, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ArtifactNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8;
+
+ /**
+ * @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 ArtifactNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_2006, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPartACN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPartACN.java
index 02f86cfad11..0f65de8b718 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPartACN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPartACN.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 ArtifactNameEditPartACN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 29;
-
- /**
- * @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 ArtifactNameEditPartACN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_28, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartACN.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ArtifactNameEditPartACN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 29;
+
+ /**
+ * @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 ArtifactNameEditPartACN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_28, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartACN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPartCN.java
index dd1b90fdc8d..df9ae85dd29 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ArtifactNameEditPartCN.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 27;
-
- /**
- * @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 ArtifactNameEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_25, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartCN.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 27;
+
+ /**
+ * @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 ArtifactNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_25, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentBodyEditPart.java
index baa3b2d7f04..4667e7cc856 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentBodyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentBodyEditPart.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 CommentBodyEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 1;
-
- /**
- * @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 CommentBodyEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Comment_2001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 CommentBodyEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 1;
+
+ /**
+ * @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 CommentBodyEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Comment_2001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentBodyEditPartCN.java
index de785630fee..b26f973878a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentBodyEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentBodyEditPartCN.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 55;
-
- /**
- * @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 CommentBodyEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Comment_54, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPartCN.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 55;
+
+ /**
+ * @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 CommentBodyEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Comment_54, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentEditPart.java
index 121eadfd230..a7cc3ecebeb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentEditPart.java
@@ -1,281 +1,282 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.editpolicies.PapyrusReflowableShapeEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
-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.figure.node.HTMLCornerBentFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.CommentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class CommentEditPart extends AbstractCommentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2001;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public CommentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusReflowableShapeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new HTMLCornerBentFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure
- *
- * @generated
- */
- @Override
- public HTMLCornerBentFigure getPrimaryShape() {
- return (HTMLCornerBentFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CommentBodyEditPart) {
- ((CommentBodyEditPart) childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
- return true;
- }
-
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CommentBodyEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof NodeFigure) {
- ((NodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
+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.figure.node.HTMLCornerBentFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.CommentItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class CommentEditPart extends AbstractCommentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2001;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public CommentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusReflowableShapeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new HTMLCornerBentFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure
+ *
+ * @generated
+ */
+ @Override
+ public HTMLCornerBentFigure getPrimaryShape() {
+ return (HTMLCornerBentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CommentBodyEditPart) {
+ ((CommentBodyEditPart) childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
+ return true;
+ }
+
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CommentBodyEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentEditPartCN.java
index 5a84fb3c160..b376307938e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/CommentEditPartCN.java
@@ -1,281 +1,282 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.editpolicies.PapyrusReflowableShapeEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
-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.figure.node.HTMLCornerBentFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.CommentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class CommentEditPartCN extends AbstractCommentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 54;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public CommentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusReflowableShapeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new HTMLCornerBentFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure
- *
- * @generated
- */
- @Override
- public HTMLCornerBentFigure getPrimaryShape() {
- return (HTMLCornerBentFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CommentBodyEditPartCN) {
- ((CommentBodyEditPartCN) childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
- return true;
- }
-
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CommentBodyEditPartCN) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof NodeFigure) {
- ((NodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(CommentBodyEditPartCN.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
+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.figure.node.HTMLCornerBentFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.CommentItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class CommentEditPartCN extends AbstractCommentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 54;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public CommentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CommentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusReflowableShapeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new HTMLCornerBentFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure
+ *
+ * @generated
+ */
+ @Override
+ public HTMLCornerBentFigure getPrimaryShape() {
+ return (HTMLCornerBentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CommentBodyEditPartCN) {
+ ((CommentBodyEditPartCN) childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
+ return true;
+ }
+
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CommentBodyEditPartCN) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(CommentBodyEditPartCN.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintEditPart.java
index 8a5d87fc425..eedbb2e7c74 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintEditPart.java
@@ -1,287 +1,287 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
-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.figure.node.ConstraintFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ConstraintItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ConstraintEditPart extends AbstractConstraintEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2005;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ConstraintEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ConstraintFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure
- *
- * @generated
- */
- @Override
- public ConstraintFigure getPrimaryShape() {
- return (ConstraintFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ConstraintNameEditPart) {
- ((ConstraintNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- if (childEditPart instanceof ConstraintSpecificationEditPart) {
- ((ConstraintSpecificationEditPart) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
- return true;
- }
-
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ConstraintNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ConstraintSpecificationEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
+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.figure.node.ConstraintFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ConstraintItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ConstraintEditPart extends AbstractConstraintEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2005;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ConstraintEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ConstraintFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure
+ *
+ * @generated
+ */
+ @Override
+ public ConstraintFigure getPrimaryShape() {
+ return (ConstraintFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ConstraintNameEditPart) {
+ ((ConstraintNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof ConstraintSpecificationEditPart) {
+ ((ConstraintSpecificationEditPart) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
+ return true;
+ }
+
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ConstraintNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ConstraintSpecificationEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintEditPartCN.java
index 5111b72e28d..d5ec2ba7507 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintEditPartCN.java
@@ -1,287 +1,287 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
-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.figure.node.ConstraintFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ConstraintItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ConstraintEditPartCN extends AbstractConstraintEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 56;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ConstraintEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ConstraintFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure
- *
- * @generated
- */
- @Override
- public ConstraintFigure getPrimaryShape() {
- return (ConstraintFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ConstraintNameEditPartCN) {
- ((ConstraintNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
- if (childEditPart instanceof ConstraintSpecificationEditPartCN) {
- ((ConstraintSpecificationEditPartCN) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
- return true;
- }
-
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ConstraintNameEditPartCN) {
- return true;
- }
- if (childEditPart instanceof ConstraintSpecificationEditPartCN) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
+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.figure.node.ConstraintFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ConstraintItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ConstraintEditPartCN extends AbstractConstraintEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 56;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ConstraintEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ConstraintItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ConstraintFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure
+ *
+ * @generated
+ */
+ @Override
+ public ConstraintFigure getPrimaryShape() {
+ return (ConstraintFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ConstraintNameEditPartCN) {
+ ((ConstraintNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if (childEditPart instanceof ConstraintSpecificationEditPartCN) {
+ ((ConstraintSpecificationEditPartCN) childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
+ return true;
+ }
+
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ConstraintNameEditPartCN) {
+ return true;
+ }
+ if (childEditPart instanceof ConstraintSpecificationEditPartCN) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintNameEditPart.java
index 64df8b7c385..4397c97360f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintNameEditPart.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 ConstraintNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2;
-
- /**
- * @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 ConstraintNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_2005, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ConstraintNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2;
+
+ /**
+ * @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 ConstraintNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_2005, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintNameEditPartCN.java
index 5ad1e2d4b84..f631c2a2cbc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintNameEditPartCN.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 ConstraintNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 57;
-
- /**
- * @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 ConstraintNameEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_56, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPartCN.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ConstraintNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 57;
+
+ /**
+ * @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 ConstraintNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_56, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintSpecificationEditPart.java
index bb29e950505..a8663579a70 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintSpecificationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintSpecificationEditPart.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 3;
-
- /**
- * @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 ConstraintSpecificationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_2005, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3;
+
+ /**
+ * @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 ConstraintSpecificationEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_2005, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintSpecificationEditPartCN.java
index d581807dc19..3c22530c1eb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintSpecificationEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ConstraintSpecificationEditPartCN.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 58;
-
- /**
- * @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 ConstraintSpecificationEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_56, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPartCN.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 58;
+
+ /**
+ * @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 ConstraintSpecificationEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Constraint_56, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DefaultNamedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DefaultNamedElementEditPart.java
index 168747e8d76..aae0a47c4c1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DefaultNamedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DefaultNamedElementEditPart.java
@@ -1,285 +1,285 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.ChangeStereotypedShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.DeploymentDiagramChangeStereotypedShapeEditpolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.itemsemantic.CustomDefaultNamedElementItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DefaultNamedElementItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class DefaultNamedElementEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2012;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DefaultNamedElementEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultNamedElementItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new DeploymentDiagramChangeStereotypedShapeEditpolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultNamedElementItemSemanticEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new NodeNamedElementFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
- *
- * @generated
- */
- @Override
- public NodeNamedElementFigure getPrimaryShape() {
- return (NodeNamedElementFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DefaultNamedElementNameEditPart) {
- ((DefaultNamedElementNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DefaultNamedElementNameEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(DefaultNamedElementNameEditPart.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+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.ChangeStereotypedShapeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.DeploymentDiagramChangeStereotypedShapeEditpolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.itemsemantic.CustomDefaultNamedElementItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DefaultNamedElementItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class DefaultNamedElementEditPart extends NamedElementEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2012;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public DefaultNamedElementEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultNamedElementItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(ChangeStereotypedShapeEditPolicy.CHANGE_SHAPE_POLICY, new DeploymentDiagramChangeStereotypedShapeEditpolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDefaultNamedElementItemSemanticEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new NodeNamedElementFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure
+ *
+ * @generated
+ */
+ @Override
+ public NodeNamedElementFigure getPrimaryShape() {
+ return (NodeNamedElementFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DefaultNamedElementNameEditPart) {
+ ((DefaultNamedElementNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DefaultNamedElementNameEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 50);
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(DefaultNamedElementNameEditPart.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DefaultNamedElementNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DefaultNamedElementNameEditPart.java
index 7b5e4091bf2..a9336cc894b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DefaultNamedElementNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DefaultNamedElementNameEditPart.java
@@ -1,888 +1,888 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 DefaultNamedElementNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 53;
-
- /**
- * @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 DefaultNamedElementNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.NamedElement_2012, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 DefaultNamedElementNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 53;
+
+ /**
+ * @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 DefaultNamedElementNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.NamedElement_2012, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyAppliedStereotypeEditPart.java
index de272943edc..94eb0c83009 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyAppliedStereotypeEditPart.java
@@ -1,828 +1,830 @@
-/**
- * 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.deployment.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 15;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public DependencyAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4004, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.deployment.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 DependencyAppliedStereotypeEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 15;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public DependencyAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4004, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyEditPart.java
index d82ccd3438c..09502a56c2f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyEditPart.java
@@ -1,127 +1,127 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DependencyItemSemanticEditPolicy;
-
-/**
- * @generated
- */
-public class DependencyEditPart extends UMLConnectionNodeEditPart implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4004;
-
- /**
- * @generated
- */
- public DependencyEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DependencyItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
- installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DependencyNameEditPart) {
- ((DependencyNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getNameLabel());
- }
- if (childEditPart instanceof DependencyAppliedStereotypeEditPart) {
- ((DependencyAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DependencyNameEditPart) {
- return true;
- }
- if (childEditPart instanceof DependencyAppliedStereotypeEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * 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
- */
- @Override
- protected Connection createConnectionFigure() {
- return new DashedEdgeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public DashedEdgeFigure getPrimaryShape() {
- return (DashedEdgeFigure) getFigure();
- }
-}
+/**
+ * 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.deployment.edit.parts;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DependencyItemSemanticEditPolicy;
+
+/**
+ * @generated
+ */
+public class DependencyEditPart extends UMLConnectionNodeEditPart implements ITreeBranchEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 4004;
+
+ /**
+ * @generated
+ */
+ public DependencyEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DependencyItemSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DependencyNameEditPart) {
+ ((DependencyNameEditPart) childEditPart).setLabel(
+ getPrimaryShape().getNameLabel());
+ }
+ if (childEditPart instanceof DependencyAppliedStereotypeEditPart) {
+ ((DependencyAppliedStereotypeEditPart) childEditPart).setLabel(
+ getPrimaryShape().getAppliedStereotypeLabel());
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DependencyNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof DependencyAppliedStereotypeEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ protected Connection createConnectionFigure() {
+ return new DashedEdgeFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public DashedEdgeFigure getPrimaryShape() {
+ return (DashedEdgeFigure) getFigure();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyNameEditPart.java
index 4376a921049..f86cc0e344b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyNameEditPart.java
@@ -1,828 +1,830 @@
-/**
- * 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.deployment.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 DependencyNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 12;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNameEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public DependencyNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4004, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.deployment.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 DependencyNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 12;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNameEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public DependencyNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4004, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyNodeEditPart.java
index 89c77980413..d8ef280bb84 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DependencyNodeEditPart.java
@@ -1,244 +1,244 @@
-/**
- * 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.deployment.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
-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.handles.MoveHandle;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
-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.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.DependencyNodeFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DependencyNodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class DependencyNodeEditPart extends NodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2011;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DependencyNodeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DependencyNodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- View childView = (View) child.getModel();
- switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case MultiDependencyLabelEditPart.VISUAL_ID:
- return new BorderItemSelectionEditPolicy() {
-
- @Override
- protected List<?> createSelectionHandles() {
- MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
- }
- ;
- }
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new DependencyNodeFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.DependencyNodeFigure
- *
- * @generated
- */
- @Override
- public DependencyNodeFigure getPrimaryShape() {
- return (DependencyNodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof MultiDependencyLabelEditPart) {
- BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
- locator.setBorderItemOffset(new Dimension(-20, -20));
- borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
- super.addBorderItem(borderItemContainer, borderItemEditPart);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(10, 10);
- 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
- */
- @Override
- protected NodeFigure createMainFigure() {
- 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
- */
- @Override
- protected IFigure setupContentPane(IFigure nodeShape) {
- return nodeShape; // use nodeShape itself as contentPane
- }
-
- /**
- * @generated
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(MultiDependencyLabelEditPart.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+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.handles.MoveHandle;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
+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.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.DependencyNodeFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DependencyNodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class DependencyNodeEditPart extends NodeEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2011;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public DependencyNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DependencyNodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case MultiDependencyLabelEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new DependencyNodeFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.DependencyNodeFigure
+ *
+ * @generated
+ */
+ @Override
+ public DependencyNodeFigure getPrimaryShape() {
+ return (DependencyNodeFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof MultiDependencyLabelEditPart) {
+ BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
+ locator.setBorderItemOffset(new Dimension(-20, -20));
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(10, 10);
+ 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
+ */
+ @Override
+ protected NodeFigure createMainFigure() {
+ 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
+ */
+ @Override
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(MultiDependencyLabelEditPart.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentAppliedStereotypeEditPart.java
index c4e02eaa688..68a936f6d58 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentAppliedStereotypeEditPart.java
@@ -1,828 +1,830 @@
-/**
- * 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.deployment.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 14;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public DeploymentAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Deployment_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.deployment.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 DeploymentAppliedStereotypeEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 14;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public DeploymentAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Deployment_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentDiagramEditPart.java
index e94a30ae22c..e0ed3a80ac7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentDiagramEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentDiagramEditPart.java
@@ -1,63 +1,63 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeploymentDiagramItemSemanticEditPolicy;
-
-/**
- * @generated
- */
-public class DeploymentDiagramEditPart extends PapyrusDiagramEditPart {
-
- /**
- * @generated
- */
- public final static String MODEL_ID = "PapyrusUMLDeploymentDiagram"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 1000;
-
- /**
- * @generated
- */
- public DeploymentDiagramEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
-
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
-
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeploymentDiagramItemSemanticEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelCanonicalEditPolicy());
-
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
- }
-}
+/**
+ * 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.deployment.edit.parts;
+
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusDiagramEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeploymentDiagramItemSemanticEditPolicy;
+
+/**
+ * @generated
+ */
+public class DeploymentDiagramEditPart extends PapyrusDiagramEditPart {
+
+ /**
+ * @generated
+ */
+ public final static String MODEL_ID = "PapyrusUMLDeploymentDiagram"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 1000;
+
+ /**
+ * @generated
+ */
+ public DeploymentDiagramEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeploymentDiagramItemSemanticEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelCanonicalEditPolicy());
+
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentEditPart.java
index 4f36187877f..8dae48028c3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentEditPart.java
@@ -1,124 +1,124 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeDeploymentLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeploymentItemSemanticEditPolicy;
-
-/**
- * @generated
- */
-public class DeploymentEditPart extends UMLConnectionNodeEditPart implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4001;
-
- /**
- * @generated
- */
- public DeploymentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeploymentItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeDeploymentLabelDisplayEditPolicy());
- installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeploymentNameEditPart) {
- ((DeploymentNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getNameLabel());
- }
- if (childEditPart instanceof DeploymentAppliedStereotypeEditPart) {
- ((DeploymentAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeploymentNameEditPart) {
- return true;
- }
- if (childEditPart instanceof DeploymentAppliedStereotypeEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * 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
- */
- @Override
- protected Connection createConnectionFigure() {
- return new DashedEdgeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public DashedEdgeFigure getPrimaryShape() {
- return (DashedEdgeFigure) getFigure();
- }
-}
+/**
+ * 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.deployment.edit.parts;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeDeploymentLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeploymentItemSemanticEditPolicy;
+
+/**
+ * @generated
+ */
+public class DeploymentEditPart extends UMLConnectionNodeEditPart implements ITreeBranchEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 4001;
+
+ /**
+ * @generated
+ */
+ public DeploymentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeploymentItemSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeDeploymentLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DeploymentNameEditPart) {
+ ((DeploymentNameEditPart) childEditPart).setLabel(
+ getPrimaryShape().getNameLabel());
+ }
+ if (childEditPart instanceof DeploymentAppliedStereotypeEditPart) {
+ ((DeploymentAppliedStereotypeEditPart) childEditPart).setLabel(
+ getPrimaryShape().getAppliedStereotypeLabel());
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DeploymentNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof DeploymentAppliedStereotypeEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ protected Connection createConnectionFigure() {
+ return new DashedEdgeFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public DashedEdgeFigure getPrimaryShape() {
+ return (DashedEdgeFigure) getFigure();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentNameEditPart.java
index d4793e6ea01..e1531a178ab 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeploymentNameEditPart.java
@@ -1,828 +1,830 @@
-/**
- * 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.deployment.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 DeploymentNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 13;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentNameEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public DeploymentNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Deployment_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.deployment.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 DeploymentNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 13;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentNameEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public DeploymentNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Deployment_4001, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceCompositeCompartmentEditPart.java
index d36bce6edc9..21ef6e5991f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceCompositeCompartmentEditPart.java
@@ -1,135 +1,135 @@
-/**
- * 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.deployment.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.ShapeCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-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.CustomContainerEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeviceCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-
-/**
- * @generated
- */
-public class DeviceCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 17;
-
- /**
- * @generated
- */
- public DeviceCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.DeviceCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeviceCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeviceCompositeCompartmentCanonicalEditPolicy());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
-
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-}
+/**
+ * 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.deployment.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.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+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.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeviceCompositeCompartmentItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+
+/**
+ * @generated
+ */
+public class DeviceCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 17;
+
+ /**
+ * @generated
+ */
+ public DeviceCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.DeviceCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeviceCompositeCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeviceCompositeCompartmentCanonicalEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceCompositeCompartmentEditPartCN.java
index b7752b50ebe..e3ee3e9d9e0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceCompositeCompartmentEditPartCN.java
@@ -1,137 +1,137 @@
-/**
- * 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.deployment.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.ShapeCompartmentEditPart;
-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.CustomContainerEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeviceCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-
-/**
- * @generated
- */
-public class DeviceCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 30;
-
- /**
- * @generated
- */
- public DeviceCompositeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.DeviceCompositeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeviceCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeviceCompositeCompartmentCanonicalEditPolicyCN());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
-
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-}
+/**
+ * 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.deployment.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.ShapeCompartmentEditPart;
+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.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeviceCompositeCompartmentItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+
+/**
+ * @generated
+ */
+public class DeviceCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 30;
+
+ /**
+ * @generated
+ */
+ public DeviceCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.DeviceCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeviceCompositeCompartmentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeviceCompositeCompartmentCanonicalEditPolicyCN());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceEditPart.java
index fb9df7a1747..5b848adadea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceEditPart.java
@@ -1,305 +1,305 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeviceItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class DeviceEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2003;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DeviceEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeviceItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new DeviceFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure
- *
- * @generated
- */
- @Override
- public DeviceFigure getPrimaryShape() {
- return (DeviceFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeviceNameEditPart) {
- ((DeviceNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- if (childEditPart instanceof DeviceCompositeCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((DeviceCompositeCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeviceNameEditPart) {
- return true;
- }
- if (childEditPart instanceof DeviceCompositeCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((DeviceCompositeCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof DeviceCompositeCompartmentEditPart) {
- return getPrimaryShape().getCompositeCompartmentFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(DeviceNameEditPart.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeviceItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class DeviceEditPart extends NamedElementEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2003;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public DeviceEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeviceItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new DeviceFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure
+ *
+ * @generated
+ */
+ @Override
+ public DeviceFigure getPrimaryShape() {
+ return (DeviceFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DeviceNameEditPart) {
+ ((DeviceNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ if (childEditPart instanceof DeviceCompositeCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((DeviceCompositeCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DeviceNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof DeviceCompositeCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ pane.remove(((DeviceCompositeCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof DeviceCompositeCompartmentEditPart) {
+ return getPrimaryShape().getCompositeCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(DeviceNameEditPart.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceEditPartCN.java
index cb258383a3b..e469c0ea93b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceEditPartCN.java
@@ -1,290 +1,290 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeviceItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class DeviceEditPartCN extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 16;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public DeviceEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeviceItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new DeviceFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure
- *
- * @generated
- */
- @Override
- public DeviceFigure getPrimaryShape() {
- return (DeviceFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeviceNameEditPartCN) {
- ((DeviceNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof DeviceNameEditPartCN) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(DeviceNameEditPartCN.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.DeviceItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class DeviceEditPartCN extends NamedElementEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 16;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public DeviceEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DeviceItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new DeviceFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure
+ *
+ * @generated
+ */
+ @Override
+ public DeviceFigure getPrimaryShape() {
+ return (DeviceFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DeviceNameEditPartCN) {
+ ((DeviceNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof DeviceNameEditPartCN) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(DeviceNameEditPartCN.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceNameEditPart.java
index c1e58116bb2..b8d8793d648 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceNameEditPart.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 DeviceNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6;
-
- /**
- * @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 DeviceNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Device_2003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 DeviceNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6;
+
+ /**
+ * @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 DeviceNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Device_2003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceNameEditPartCN.java
index 383733609db..75680a7ec61 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/DeviceNameEditPartCN.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 DeviceNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 20;
-
- /**
- * @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 DeviceNameEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Device_16, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPartCN.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 DeviceNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 20;
+
+ /**
+ * @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 DeviceNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Device_16, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java
index 43071863fe7..94bbc995172 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java
@@ -1,135 +1,135 @@
-/**
- * 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.deployment.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.ShapeCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-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.CustomContainerEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 18;
-
- /**
- * @generated
- */
- public ExecutionEnvironmentCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ExecutionEnvironmentCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
-
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-}
+/**
+ * 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.deployment.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.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+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.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+
+/**
+ * @generated
+ */
+public class ExecutionEnvironmentCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 18;
+
+ /**
+ * @generated
+ */
+ public ExecutionEnvironmentCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.ExecutionEnvironmentCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java
index 1cf6cd0b7da..b1273a758af 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java
@@ -1,137 +1,137 @@
-/**
- * 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.deployment.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.ShapeCompartmentEditPart;
-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.CustomContainerEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 31;
-
- /**
- * @generated
- */
- public ExecutionEnvironmentCompositeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ExecutionEnvironmentCompositeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
-
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-}
+/**
+ * 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.deployment.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.ShapeCompartmentEditPart;
+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.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+
+/**
+ * @generated
+ */
+public class ExecutionEnvironmentCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 31;
+
+ /**
+ * @generated
+ */
+ public ExecutionEnvironmentCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.ExecutionEnvironmentCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentEditPart.java
index ea27e9168a0..b2ae1e53c40 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentEditPart.java
@@ -1,305 +1,305 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ExecutionEnvironmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2002;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ExecutionEnvironmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExecutionEnvironmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ExecutionEnvironmentFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure
- *
- * @generated
- */
- @Override
- public ExecutionEnvironmentFigure getPrimaryShape() {
- return (ExecutionEnvironmentFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ExecutionEnvironmentNameEditPart) {
- ((ExecutionEnvironmentNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- if (childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ExecutionEnvironmentCompositeCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ExecutionEnvironmentNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ExecutionEnvironmentCompositeCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ExecutionEnvironmentCompositeCompartmentEditPart) {
- return getPrimaryShape().getCompositeCompartmentFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ExecutionEnvironmentNameEditPart.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ExecutionEnvironmentItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ExecutionEnvironmentEditPart extends NamedElementEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2002;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ExecutionEnvironmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExecutionEnvironmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ExecutionEnvironmentFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure
+ *
+ * @generated
+ */
+ @Override
+ public ExecutionEnvironmentFigure getPrimaryShape() {
+ return (ExecutionEnvironmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ExecutionEnvironmentNameEditPart) {
+ ((ExecutionEnvironmentNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ if (childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ExecutionEnvironmentCompositeCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ExecutionEnvironmentNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ pane.remove(((ExecutionEnvironmentCompositeCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof ExecutionEnvironmentCompositeCompartmentEditPart) {
+ return getPrimaryShape().getCompositeCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ExecutionEnvironmentNameEditPart.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentEditPartCN.java
index 671177b59f3..3a8fdbbb93d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentEditPartCN.java
@@ -1,290 +1,290 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ExecutionEnvironmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentEditPartCN extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 21;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ExecutionEnvironmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExecutionEnvironmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ExecutionEnvironmentFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure
- *
- * @generated
- */
- @Override
- public ExecutionEnvironmentFigure getPrimaryShape() {
- return (ExecutionEnvironmentFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ExecutionEnvironmentNameEditPartCN) {
- ((ExecutionEnvironmentNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ExecutionEnvironmentNameEditPartCN) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ExecutionEnvironmentNameEditPartCN.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ExecutionEnvironmentItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ExecutionEnvironmentEditPartCN extends NamedElementEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 21;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ExecutionEnvironmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ExecutionEnvironmentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ExecutionEnvironmentFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure
+ *
+ * @generated
+ */
+ @Override
+ public ExecutionEnvironmentFigure getPrimaryShape() {
+ return (ExecutionEnvironmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ExecutionEnvironmentNameEditPartCN) {
+ ((ExecutionEnvironmentNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ExecutionEnvironmentNameEditPartCN) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ExecutionEnvironmentNameEditPartCN.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentNameEditPart.java
index 002d2eb4406..469117ccedb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentNameEditPart.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 ExecutionEnvironmentNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 5;
-
- /**
- * @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 ExecutionEnvironmentNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.ExecutionEnvironment_2002, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ExecutionEnvironmentNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5;
+
+ /**
+ * @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 ExecutionEnvironmentNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.ExecutionEnvironment_2002, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentNameEditPartCN.java
index 749d1501faa..600fccc89f7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ExecutionEnvironmentNameEditPartCN.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 ExecutionEnvironmentNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 22;
-
- /**
- * @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 ExecutionEnvironmentNameEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.ExecutionEnvironment_21, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPartCN.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ExecutionEnvironmentNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 22;
+
+ /**
+ * @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 ExecutionEnvironmentNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.ExecutionEnvironment_21, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/GeneralizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/GeneralizationAppliedStereotypeEditPart.java
index 36ddd681420..31bf1033274 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/GeneralizationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/GeneralizationAppliedStereotypeEditPart.java
@@ -1,820 +1,822 @@
-/**
- * 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.deployment.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public GeneralizationAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Generalization_4003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.deployment.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 GeneralizationAppliedStereotypeEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 4;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public GeneralizationAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Generalization_4003, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/GeneralizationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/GeneralizationEditPart.java
index ea728a5b6cf..44f177d880d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/GeneralizationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/GeneralizationEditPart.java
@@ -1,117 +1,117 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.edge.GeneralizationFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.GeneralizationItemSemanticEditPolicy;
-
-/**
- * @generated
- */
-public class GeneralizationEditPart extends UMLConnectionNodeEditPart implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4003;
-
- /**
- * @generated
- */
- public GeneralizationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new GeneralizationItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
- installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof GeneralizationAppliedStereotypeEditPart) {
- ((GeneralizationAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof GeneralizationAppliedStereotypeEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * 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
- */
- @Override
- protected Connection createConnectionFigure() {
- return new GeneralizationFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public GeneralizationFigure getPrimaryShape() {
- return (GeneralizationFigure) getFigure();
- }
-}
+/**
+ * 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.deployment.edit.parts;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.edge.GeneralizationFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.GeneralizationItemSemanticEditPolicy;
+
+/**
+ * @generated
+ */
+public class GeneralizationEditPart extends UMLConnectionNodeEditPart implements ITreeBranchEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 4003;
+
+ /**
+ * @generated
+ */
+ public GeneralizationEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new GeneralizationItemSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeLinkLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof GeneralizationAppliedStereotypeEditPart) {
+ ((GeneralizationAppliedStereotypeEditPart) childEditPart).setLabel(
+ getPrimaryShape().getAppliedStereotypeLabel());
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof GeneralizationAppliedStereotypeEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ protected Connection createConnectionFigure() {
+ return new GeneralizationFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public GeneralizationFigure getPrimaryShape() {
+ return (GeneralizationFigure) getFigure();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationAppliedStereotypeEditPart.java
index 2ed0b29f3a0..d7a85312410 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationAppliedStereotypeEditPart.java
@@ -1,828 +1,830 @@
-/**
- * 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.deployment.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 11;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 30));
- }
-
- /**
- * @generated
- */
- public ManifestationAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Manifestation_4002, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.deployment.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ManifestationAppliedStereotypeEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 11;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 30));
+ }
+
+ /**
+ * @generated
+ */
+ public ManifestationAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Manifestation_4002, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationEditPart.java
index ac191ae676d..df32ba6957d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationEditPart.java
@@ -1,124 +1,124 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.Connection;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeManifestationLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ManifestationItemSemanticEditPolicy;
-
-/**
- * @generated
- */
-public class ManifestationEditPart extends UMLConnectionNodeEditPart implements ITreeBranchEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 4002;
-
- /**
- * @generated
- */
- public ManifestationEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ManifestationItemSemanticEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeManifestationLabelDisplayEditPolicy());
- installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ManifestationNameEditPart) {
- ((ManifestationNameEditPart) childEditPart).setLabel(
- getPrimaryShape().getNameLabel());
- }
- if (childEditPart instanceof ManifestationAppliedStereotypeEditPart) {
- ((ManifestationAppliedStereotypeEditPart) childEditPart).setLabel(
- getPrimaryShape().getAppliedStereotypeLabel());
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ManifestationNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ManifestationAppliedStereotypeEditPart) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * 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
- */
- @Override
- protected Connection createConnectionFigure() {
- return new DashedEdgeFigure();
- }
-
- /**
- * @generated
- */
- @Override
- public DashedEdgeFigure getPrimaryShape() {
- return (DashedEdgeFigure) getFigure();
- }
-}
+/**
+ * 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.deployment.edit.parts;
+
+import org.eclipse.draw2d.Connection;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeManifestationLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ManifestationItemSemanticEditPolicy;
+
+/**
+ * @generated
+ */
+public class ManifestationEditPart extends UMLConnectionNodeEditPart implements ITreeBranchEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 4002;
+
+ /**
+ * @generated
+ */
+ public ManifestationEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ManifestationItemSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeManifestationLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ManifestationNameEditPart) {
+ ((ManifestationNameEditPart) childEditPart).setLabel(
+ getPrimaryShape().getNameLabel());
+ }
+ if (childEditPart instanceof ManifestationAppliedStereotypeEditPart) {
+ ((ManifestationAppliedStereotypeEditPart) childEditPart).setLabel(
+ getPrimaryShape().getAppliedStereotypeLabel());
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ManifestationNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ManifestationAppliedStereotypeEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ protected Connection createConnectionFigure() {
+ return new DashedEdgeFigure();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public DashedEdgeFigure getPrimaryShape() {
+ return (DashedEdgeFigure) getFigure();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationNameEditPart.java
index f147a21f8f7..e1a0487d967 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ManifestationNameEditPart.java
@@ -1,828 +1,830 @@
-/**
- * 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.deployment.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 ManifestationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 10;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationNameEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public ManifestationNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Manifestation_4002, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.deployment.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ManifestationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 10;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationNameEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public ManifestationNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Manifestation_4002, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelEditPart.java
index e702b82cb26..86ac7c91f3d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelEditPart.java
@@ -1,299 +1,299 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ModelEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2010;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ModelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new PackageFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure
- *
- * @generated
- */
- @Override
- public PackageFigure getPrimaryShape() {
- return (PackageFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ModelNameEditPart) {
- ((ModelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- if (childEditPart instanceof ModelPackageableElementCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getPackageableElementFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ModelPackageableElementCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ModelNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ModelPackageableElementCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getPackageableElementFigure();
- pane.remove(((ModelPackageableElementCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ModelPackageableElementCompartmentEditPart) {
- return getPrimaryShape().getPackageableElementFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 150);
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ModelNameEditPart.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+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.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ModelEditPart extends NamedElementEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2010;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ModelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new PackageFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure
+ *
+ * @generated
+ */
+ @Override
+ public PackageFigure getPrimaryShape() {
+ return (PackageFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ModelNameEditPart) {
+ ((ModelNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ if (childEditPart instanceof ModelPackageableElementCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPackageableElementFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ModelPackageableElementCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ModelNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof ModelPackageableElementCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPackageableElementFigure();
+ pane.remove(((ModelPackageableElementCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof ModelPackageableElementCompartmentEditPart) {
+ return getPrimaryShape().getPackageableElementFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 150);
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ModelNameEditPart.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelEditPartCN.java
index 5096573afd1..7107522a5b7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelEditPartCN.java
@@ -1,299 +1,299 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class ModelEditPartCN extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 49;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public ModelEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new PackageFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure
- *
- * @generated
- */
- @Override
- public PackageFigure getPrimaryShape() {
- return (PackageFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ModelNameEditPartCN) {
- ((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;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof ModelNameEditPartCN) {
- return true;
- }
- if (childEditPart instanceof ModelPackageableElementCompartmentEditPartCN) {
- IFigure pane = getPrimaryShape().getPackageableElementFigure();
- pane.remove(((ModelPackageableElementCompartmentEditPartCN) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ModelPackageableElementCompartmentEditPartCN) {
- return getPrimaryShape().getPackageableElementFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 150);
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(ModelNameEditPartCN.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+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.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ModelEditPartCN extends NamedElementEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 49;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ModelEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new PackageFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure
+ *
+ * @generated
+ */
+ @Override
+ public PackageFigure getPrimaryShape() {
+ return (PackageFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ModelNameEditPartCN) {
+ ((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;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof ModelNameEditPartCN) {
+ return true;
+ }
+ if (childEditPart instanceof ModelPackageableElementCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getPackageableElementFigure();
+ pane.remove(((ModelPackageableElementCompartmentEditPartCN) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof ModelPackageableElementCompartmentEditPartCN) {
+ return getPrimaryShape().getPackageableElementFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 150);
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ModelNameEditPartCN.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelNameEditPart.java
index 1e355576af6..5af547d1f4a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelNameEditPart.java
@@ -1,888 +1,888 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 ModelNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 48;
-
- /**
- * @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 ModelNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Model_2010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ModelNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 48;
+
+ /**
+ * @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 ModelNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Model_2010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelNameEditPartCN.java
index 7f351d60fc0..4480ade1340 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelNameEditPartCN.java
@@ -1,888 +1,888 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 ModelNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 50;
-
- /**
- * @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 ModelNameEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Model_49, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPartCN.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 ModelNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 50;
+
+ /**
+ * @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 ModelNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Model_49, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelPackageableElementCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelPackageableElementCompartmentEditPart.java
index c476f27ba15..99339855f60 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelPackageableElementCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelPackageableElementCompartmentEditPart.java
@@ -1,135 +1,135 @@
-/**
- * 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.deployment.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.ShapeCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-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.CustomContainerEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelPackageableElementCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-
-/**
- * @generated
- */
-public class ModelPackageableElementCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 51;
-
- /**
- * @generated
- */
- public ModelPackageableElementCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ModelPackageableElementCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelPackageableElementCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelPackageableElementCompartmentCanonicalEditPolicy());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
-
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-}
+/**
+ * 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.deployment.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.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+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.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelPackageableElementCompartmentItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+
+/**
+ * @generated
+ */
+public class ModelPackageableElementCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 51;
+
+ /**
+ * @generated
+ */
+ public ModelPackageableElementCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.ModelPackageableElementCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelPackageableElementCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelPackageableElementCompartmentCanonicalEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelPackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
index 9e2949c8478..d95c32f84d0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/ModelPackageableElementCompartmentEditPartCN.java
@@ -1,135 +1,135 @@
-/**
- * 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.deployment.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.ShapeCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-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.CustomContainerEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelPackageableElementCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-
-/**
- * @generated
- */
-public class ModelPackageableElementCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 52;
-
- /**
- * @generated
- */
- public ModelPackageableElementCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.ModelPackageableElementCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelPackageableElementCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelPackageableElementCompartmentCanonicalEditPolicyCN());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
-
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-}
+/**
+ * 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.deployment.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.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+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.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelPackageableElementCompartmentItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+
+/**
+ * @generated
+ */
+public class ModelPackageableElementCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 52;
+
+ /**
+ * @generated
+ */
+ public ModelPackageableElementCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.ModelPackageableElementCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelPackageableElementCompartmentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.ModelPackageableElementCompartmentCanonicalEditPolicyCN());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/MultiDependencyLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/MultiDependencyLabelEditPart.java
index 0c8f513e76e..684fbc9ccf2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/MultiDependencyLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/MultiDependencyLabelEditPart.java
@@ -1,850 +1,852 @@
-/**
- * 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.deployment.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.draw2d.geometry.Rectangle;
-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.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 MultiDependencyLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.MultiDependencyLabelEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public MultiDependencyLabelEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public void refreshBounds() {
- int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_2011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.MultiDependencyLabelEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new WrappingLabel();
- }
-}
+/**
+ * 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.deployment.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 MultiDependencyLabelEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.MultiDependencyLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public MultiDependencyLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_2011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.MultiDependencyLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new WrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedArtifactNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedArtifactNameEditPart.java
index 78914eff0dd..0148cffc629 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedArtifactNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedArtifactNameEditPart.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 NestedArtifactNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 41;
-
- /**
- * @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 NestedArtifactNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_40, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 NestedArtifactNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 41;
+
+ /**
+ * @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 NestedArtifactNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Artifact_40, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedArtifactNodeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedArtifactNodeEditPartCN.java
index 5c80efadbfc..7d53ed6db5d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedArtifactNodeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedArtifactNodeEditPartCN.java
@@ -1,291 +1,276 @@
-/**
- * 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.deployment.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.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.IPapyrusNodeFigure;
-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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NestedArtifactNodeItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class NestedArtifactNodeEditPartCN extends NodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 40;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public NestedArtifactNodeEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NestedArtifactNodeItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ArtifactFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure
- *
- * @generated
- */
- @Override
- public ArtifactFigure getPrimaryShape() {
- return (ArtifactFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NestedArtifactNameEditPart) {
- ((NestedArtifactNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- if (childEditPart instanceof ArtifactCompositeCompartmentEditPartCN) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ArtifactCompositeCompartmentEditPartCN) childEditPart).getFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NestedArtifactNameEditPart) {
- return true;
- }
- if (childEditPart instanceof ArtifactCompositeCompartmentEditPartCN) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ArtifactCompositeCompartmentEditPartCN) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ArtifactCompositeCompartmentEditPartCN) {
- return getPrimaryShape().getCompositeCompartmentFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 70);
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(NestedArtifactNameEditPart.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.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.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.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.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NestedArtifactNodeItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class NestedArtifactNodeEditPartCN extends NodeEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 40;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public NestedArtifactNodeEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NestedArtifactNodeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ArtifactFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ArtifactFigure
+ *
+ * @generated
+ */
+ @Override
+ public ArtifactFigure getPrimaryShape() {
+ return (ArtifactFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NestedArtifactNameEditPart) {
+ ((NestedArtifactNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NestedArtifactNameEditPart) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 70);
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(NestedArtifactNameEditPart.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedDeviceEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedDeviceEditPartCN.java
index 91f9f40417f..7f5e64af65a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedDeviceEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedDeviceEditPartCN.java
@@ -1,293 +1,293 @@
-/**
- * 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.deployment.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.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.IPapyrusNodeFigure;
-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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NestedDeviceItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class NestedDeviceEditPartCN extends NodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 44;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public NestedDeviceEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NestedDeviceItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new DeviceFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure
- *
- * @generated
- */
- @Override
- public DeviceFigure getPrimaryShape() {
- return (DeviceFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NestedDeviceNameEditPartCN) {
- ((NestedDeviceNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- if (childEditPart instanceof DeviceCompositeCompartmentEditPartCN) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((DeviceCompositeCompartmentEditPartCN) childEditPart).getFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NestedDeviceNameEditPartCN) {
- return true;
- }
- if (childEditPart instanceof DeviceCompositeCompartmentEditPartCN) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((DeviceCompositeCompartmentEditPartCN) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof DeviceCompositeCompartmentEditPartCN) {
- return getPrimaryShape().getCompositeCompartmentFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(NestedDeviceNameEditPartCN.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.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.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.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.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NestedDeviceItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class NestedDeviceEditPartCN extends NodeEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 44;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public NestedDeviceEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NestedDeviceItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new DeviceFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.DeviceFigure
+ *
+ * @generated
+ */
+ @Override
+ public DeviceFigure getPrimaryShape() {
+ return (DeviceFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NestedDeviceNameEditPartCN) {
+ ((NestedDeviceNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ if (childEditPart instanceof DeviceCompositeCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((DeviceCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NestedDeviceNameEditPartCN) {
+ return true;
+ }
+ if (childEditPart instanceof DeviceCompositeCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ pane.remove(((DeviceCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof DeviceCompositeCompartmentEditPartCN) {
+ return getPrimaryShape().getCompositeCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(NestedDeviceNameEditPartCN.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedDeviceNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedDeviceNameEditPartCN.java
index d80f0ad4a39..d6b94256014 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedDeviceNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedDeviceNameEditPartCN.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 NestedDeviceNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 45;
-
- /**
- * @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 NestedDeviceNameEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Device_44, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceNameEditPartCN.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 NestedDeviceNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 45;
+
+ /**
+ * @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 NestedDeviceNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Device_44, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedExecutionEnvironmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedExecutionEnvironmentEditPartCN.java
index 445eca333d8..d4f241e17e0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedExecutionEnvironmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedExecutionEnvironmentEditPartCN.java
@@ -1,293 +1,293 @@
-/**
- * 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.deployment.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.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.IPapyrusNodeFigure;
-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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NestedExecutionEnvironmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class NestedExecutionEnvironmentEditPartCN extends NodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 46;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public NestedExecutionEnvironmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NestedExecutionEnvironmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new ExecutionEnvironmentFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure
- *
- * @generated
- */
- @Override
- public ExecutionEnvironmentFigure getPrimaryShape() {
- return (ExecutionEnvironmentFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NestedExecutionEnvironmentNameEditPartCN) {
- ((NestedExecutionEnvironmentNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- if (childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPartCN) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((ExecutionEnvironmentCompositeCompartmentEditPartCN) childEditPart).getFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NestedExecutionEnvironmentNameEditPartCN) {
- return true;
- }
- if (childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPartCN) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((ExecutionEnvironmentCompositeCompartmentEditPartCN) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof ExecutionEnvironmentCompositeCompartmentEditPartCN) {
- return getPrimaryShape().getCompositeCompartmentFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(NestedExecutionEnvironmentNameEditPartCN.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.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.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.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.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NestedExecutionEnvironmentItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class NestedExecutionEnvironmentEditPartCN extends NodeEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 46;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public NestedExecutionEnvironmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NestedExecutionEnvironmentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new ExecutionEnvironmentFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.ExecutionEnvironmentFigure
+ *
+ * @generated
+ */
+ @Override
+ public ExecutionEnvironmentFigure getPrimaryShape() {
+ return (ExecutionEnvironmentFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NestedExecutionEnvironmentNameEditPartCN) {
+ ((NestedExecutionEnvironmentNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ if (childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ExecutionEnvironmentCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NestedExecutionEnvironmentNameEditPartCN) {
+ return true;
+ }
+ if (childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ pane.remove(((ExecutionEnvironmentCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof ExecutionEnvironmentCompositeCompartmentEditPartCN) {
+ return getPrimaryShape().getCompositeCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(NestedExecutionEnvironmentNameEditPartCN.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedExecutionEnvironmentNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedExecutionEnvironmentNameEditPartCN.java
index 2df545ec06a..6cc959237be 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedExecutionEnvironmentNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedExecutionEnvironmentNameEditPartCN.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 NestedExecutionEnvironmentNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 47;
-
- /**
- * @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 NestedExecutionEnvironmentNameEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.ExecutionEnvironment_46, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentNameEditPartCN.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 NestedExecutionEnvironmentNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 47;
+
+ /**
+ * @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 NestedExecutionEnvironmentNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.ExecutionEnvironment_46, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedNodeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedNodeEditPartCN.java
index 0b4e22237fd..e39c39b5f59 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedNodeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedNodeEditPartCN.java
@@ -1,292 +1,292 @@
-/**
- * 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.deployment.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.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-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.IPapyrusNodeFigure;
-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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NestedNodeItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class NestedNodeEditPartCN extends NodeEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 42;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public NestedNodeEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NestedNodeItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new NodeFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure
- *
- * @generated
- */
- @Override
- public NodeFigure getPrimaryShape() {
- return (NodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NestedNodeNameEditPart) {
- ((NestedNodeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- if (childEditPart instanceof NodeCompositeCompartmentEditPartCN) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((NodeCompositeCompartmentEditPartCN) childEditPart).getFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NestedNodeNameEditPart) {
- return true;
- }
- if (childEditPart instanceof NodeCompositeCompartmentEditPartCN) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((NodeCompositeCompartmentEditPartCN) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof NodeCompositeCompartmentEditPartCN) {
- return getPrimaryShape().getCompositeCompartmentFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 150);
- 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
- */
- @Override
- protected org.eclipse.gmf.runtime.gef.ui.figures.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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(NestedNodeNameEditPart.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.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.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NestedNodeItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class NestedNodeEditPartCN extends NodeEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 42;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public NestedNodeEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NestedNodeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new NodeFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure
+ *
+ * @generated
+ */
+ @Override
+ public NodeFigure getPrimaryShape() {
+ return (NodeFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NestedNodeNameEditPart) {
+ ((NestedNodeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ if (childEditPart instanceof NodeCompositeCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((NodeCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NestedNodeNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof NodeCompositeCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ pane.remove(((NodeCompositeCompartmentEditPartCN) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof NodeCompositeCompartmentEditPartCN) {
+ return getPrimaryShape().getCompositeCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 150);
+ 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
+ */
+ @Override
+ protected org.eclipse.gmf.runtime.gef.ui.figures.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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(NestedNodeNameEditPart.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedNodeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedNodeNameEditPart.java
index d60e9b54bf0..32e928d958f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedNodeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NestedNodeNameEditPart.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 NestedNodeNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 43;
-
- /**
- * @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 NestedNodeNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Node_42, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 NestedNodeNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 43;
+
+ /**
+ * @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 NestedNodeNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Node_42, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeCompositeCompartmentEditPart.java
index 4e866905e78..e3365edee25 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeCompositeCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeCompositeCompartmentEditPart.java
@@ -1,135 +1,135 @@
-/**
- * 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.deployment.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.ShapeCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-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.CustomContainerEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NodeCompositeCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-
-/**
- * @generated
- */
-public class NodeCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 19;
-
- /**
- * @generated
- */
- public NodeCompositeCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.NodeCompositeCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NodeCompositeCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NodeCompositeCompartmentCanonicalEditPolicy());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
-
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-}
+/**
+ * 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.deployment.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.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+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.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NodeCompositeCompartmentItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+
+/**
+ * @generated
+ */
+public class NodeCompositeCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 19;
+
+ /**
+ * @generated
+ */
+ public NodeCompositeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.NodeCompositeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NodeCompositeCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NodeCompositeCompartmentCanonicalEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeCompositeCompartmentEditPartCN.java
index 869bd3d66b4..26b34a291cd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeCompositeCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeCompositeCompartmentEditPartCN.java
@@ -1,137 +1,137 @@
-/**
- * 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.deployment.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.ShapeCompartmentEditPart;
-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.CustomContainerEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NodeCompositeCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-
-/**
- * @generated
- */
-public class NodeCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 32;
-
- /**
- * @generated
- */
- public NodeCompositeCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.NodeCompositeCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NodeCompositeCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NodeCompositeCompartmentCanonicalEditPolicyCN());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
-
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-}
+/**
+ * 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.deployment.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.ShapeCompartmentEditPart;
+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.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NodeCompositeCompartmentItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+
+/**
+ * @generated
+ */
+public class NodeCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 32;
+
+ /**
+ * @generated
+ */
+ public NodeCompositeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.NodeCompositeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NodeCompositeCompartmentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NodeCompositeCompartmentCanonicalEditPolicyCN());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeEditPart.java
index df502b204d1..3801bec7337 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeEditPart.java
@@ -1,304 +1,304 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NodeItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class NodeEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2008;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public NodeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NodeItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new NodeFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure
- *
- * @generated
- */
- @Override
- public NodeFigure getPrimaryShape() {
- return (NodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NodeNameEditPart) {
- ((NodeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- if (childEditPart instanceof NodeCompositeCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((NodeCompositeCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NodeNameEditPart) {
- return true;
- }
- if (childEditPart instanceof NodeCompositeCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
- pane.remove(((NodeCompositeCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof NodeCompositeCompartmentEditPart) {
- return getPrimaryShape().getCompositeCompartmentFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 150);
- 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
- */
- @Override
- protected org.eclipse.gmf.runtime.gef.ui.figures.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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(NodeNameEditPart.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NodeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class NodeEditPart extends NamedElementEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2008;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public NodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NodeItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new NodeFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure
+ *
+ * @generated
+ */
+ @Override
+ public NodeFigure getPrimaryShape() {
+ return (NodeFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NodeNameEditPart) {
+ ((NodeNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ if (childEditPart instanceof NodeCompositeCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((NodeCompositeCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NodeNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof NodeCompositeCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
+ pane.remove(((NodeCompositeCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof NodeCompositeCompartmentEditPart) {
+ return getPrimaryShape().getCompositeCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 150);
+ 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
+ */
+ @Override
+ protected org.eclipse.gmf.runtime.gef.ui.figures.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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(NodeNameEditPart.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeEditPartCN.java
index 00add7441f8..774e6a022df 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeEditPartCN.java
@@ -1,289 +1,289 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NodeItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class NodeEditPartCN extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 23;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public NodeEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NodeItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
- installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new NodeFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure
- *
- * @generated
- */
- @Override
- public NodeFigure getPrimaryShape() {
- return (NodeFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NodeNameEditPartCN) {
- ((NodeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
- return true;
- }
-
-
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof NodeNameEditPartCN) {
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 150);
- 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
- */
- @Override
- protected org.eclipse.gmf.runtime.gef.ui.figures.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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(NodeNameEditPartCN.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.NodeItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class NodeEditPartCN extends NamedElementEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 23;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public NodeEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new NodeItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY, new ShowHideClassifierContentsEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new NodeFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.deployment.custom.figure.nodes.NodeFigure
+ *
+ * @generated
+ */
+ @Override
+ public NodeFigure getPrimaryShape() {
+ return (NodeFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NodeNameEditPartCN) {
+ ((NodeNameEditPartCN) childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+
+
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof NodeNameEditPartCN) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 150);
+ 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
+ */
+ @Override
+ protected org.eclipse.gmf.runtime.gef.ui.figures.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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(NodeNameEditPartCN.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeNameEditPart.java
index 80282072c55..e8d2fa79001 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeNameEditPart.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 NodeNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 9;
-
- /**
- * @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 NodeNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Node_2008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 NodeNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 9;
+
+ /**
+ * @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 NodeNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Node_2008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeNameEditPartCN.java
index a0ef35eea92..0f90a742615 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/NodeNameEditPartCN.java
@@ -1,871 +1,871 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 NodeNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 24;
-
- /**
- * @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 NodeNameEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Node_23, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPartCN.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 NodeNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 24;
+
+ /**
+ * @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 NodeNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Node_23, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageEditPart.java
index 34b2ac4360c..db1e2ff2c13 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageEditPart.java
@@ -1,299 +1,299 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.PackageItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class PackageEditPart extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 2009;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public PackageEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageItemSemanticEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new PackageFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure
- *
- * @generated
- */
- @Override
- public PackageFigure getPrimaryShape() {
- return (PackageFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof PackageNameEditPart) {
- ((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;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof PackageNameEditPart) {
- return true;
- }
- if (childEditPart instanceof PackagePackageableElementCompartmentEditPart) {
- IFigure pane = getPrimaryShape().getPackageableElementFigure();
- pane.remove(((PackagePackageableElementCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof PackagePackageableElementCompartmentEditPart) {
- return getPrimaryShape().getPackageableElementFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 150);
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(PackageNameEditPart.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+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.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.PackageItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class PackageEditPart extends NamedElementEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2009;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public PackageEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new PackageFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure
+ *
+ * @generated
+ */
+ @Override
+ public PackageFigure getPrimaryShape() {
+ return (PackageFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof PackageNameEditPart) {
+ ((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;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof PackageNameEditPart) {
+ return true;
+ }
+ if (childEditPart instanceof PackagePackageableElementCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getPackageableElementFigure();
+ pane.remove(((PackagePackageableElementCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof PackagePackageableElementCompartmentEditPart) {
+ return getPrimaryShape().getPackageableElementFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 150);
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PackageNameEditPart.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageEditPartCN.java
index 436a371f132..bd9b53c0305 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageEditPartCN.java
@@ -1,299 +1,299 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.editpolicies.LayoutEditPolicy;
-import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-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.ShowHideCompartmentEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.PackageItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @generated
- */
-public class PackageEditPartCN extends NamedElementEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 36;
-
- /**
- * @generated
- */
- protected IFigure contentPane;
-
- /**
- * @generated
- */
- protected IFigure primaryShape;
-
- /**
- * @generated
- */
- public PackageEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
- installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
- // 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() {
-
- @Override
- protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (result == null) {
- result = new NonResizableEditPolicy();
- }
- return result;
- }
-
- @Override
- protected Command getMoveChildrenCommand(Request request) {
- return null;
- }
-
- @Override
- protected Command getCreateCommand(CreateRequest request) {
- return null;
- }
- };
- return lep;
- }
-
- /**
- * Papyrus codeGen
- *
- * @generated
- **/
- @Override
- protected void handleNotificationEvent(Notification event) {
- super.handleNotificationEvent(event);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure createNodeShape() {
- return primaryShape = new PackageFigure();
- }
-
- /**
- * org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure
- *
- * @generated
- */
- @Override
- public PackageFigure getPrimaryShape() {
- return (PackageFigure) primaryShape;
- }
-
- /**
- * @generated
- */
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof PackageNameEditPartCN) {
- ((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;
- }
-
- /**
- * @generated
- */
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof PackageNameEditPartCN) {
- return true;
- }
- if (childEditPart instanceof PackagePackageableElementCompartmentEditPartCN) {
- IFigure pane = getPrimaryShape().getPackageableElementFigure();
- pane.remove(((PackagePackageableElementCompartmentEditPartCN) childEditPart).getFigure());
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void addChildVisual(EditPart childEditPart, int index) {
- if (addFixedChild(childEditPart)) {
- return;
- }
- super.addChildVisual(childEditPart, -1);
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeChildVisual(EditPart childEditPart) {
- if (removeFixedChild(childEditPart)) {
- return;
- }
- super.removeChildVisual(childEditPart);
- }
-
- /**
- * @generated
- */
- @Override
- protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof PackagePackageableElementCompartmentEditPartCN) {
- return getPrimaryShape().getPackageableElementFigure();
- }
- return getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 150);
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public IFigure getContentPane() {
- if (contentPane != null) {
- return contentPane;
- }
- return super.getContentPane();
- }
-
- /**
- * @generated
- */
- @Override
- protected void setForegroundColor(Color color) {
- if (primaryShape != null) {
- primaryShape.setForegroundColor(color);
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineWidth(int width) {
- super.setLineWidth(width);
- }
-
- /**
- * @generated
- */
- @Override
- protected void setLineType(int style) {
- if (primaryShape instanceof IPapyrusNodeFigure) {
- ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(PackageNameEditPartCN.VISUAL_ID));
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+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.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.PackageItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class PackageEditPartCN extends NamedElementEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 36;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public PackageEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ // 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() {
+
+ @Override
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ @Override
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ @Override
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * Papyrus codeGen
+ *
+ * @generated
+ **/
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ super.handleNotificationEvent(event);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure createNodeShape() {
+ return primaryShape = new PackageFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure
+ *
+ * @generated
+ */
+ @Override
+ public PackageFigure getPrimaryShape() {
+ return (PackageFigure) primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof PackageNameEditPartCN) {
+ ((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;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof PackageNameEditPartCN) {
+ return true;
+ }
+ if (childEditPart instanceof PackagePackageableElementCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getPackageableElementFigure();
+ pane.remove(((PackagePackageableElementCompartmentEditPartCN) childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if (addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeChildVisual(EditPart childEditPart) {
+ if (removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof PackagePackageableElementCompartmentEditPartCN) {
+ return getPrimaryShape().getPackageableElementFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected NodeFigure createNodePlate() {
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 150);
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public IFigure getContentPane() {
+ if (contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setForegroundColor(Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setLineType(int style) {
+ if (primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure) primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PackageNameEditPartCN.VISUAL_ID));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageNameEditPart.java
index 7089934bacf..55b5972c5f2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageNameEditPart.java
@@ -1,888 +1,888 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 PackageNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 35;
-
- /**
- * @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 PackageNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Package_2009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 PackageNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 35;
+
+ /**
+ * @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 PackageNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Package_2009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageNameEditPartCN.java
index 2f2f595907d..ba411a82b87 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackageNameEditPartCN.java
@@ -1,888 +1,888 @@
-/**
- * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-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.deployment.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.deployment.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 PackageNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 37;
-
- /**
- * @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 PackageNameEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Package_36, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPartCN.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void addNotationalListeners() {
- super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- protected void removeNotationalListeners() {
- super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-
- /**
- * @generated
- */
- private static final String ADD_PARENT_MODEL = "AddParentModel";
-
- /**
- * @generated
- */
- @Override
- public void activate() {
- super.activate();
- addOwnerElementListeners();
- }
-
- /**
- * @generated
- */
- protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
-
- }
-
- /**
- * @generated
- */
- @Override
- public void deactivate() {
- removeOwnerElementListeners();
- super.deactivate();
-
- }
-
- /**
- * @generated
- */
- protected void removeOwnerElementListeners() {
- removeListenerFilter(ADD_PARENT_MODEL);
-
- }
-}
+/**
+ * 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.deployment.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.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.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+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.deployment.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.deployment.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 PackageNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 37;
+
+ /**
+ * @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 PackageNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Package_36, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPartCN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ @Override
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackagePackageableElementCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackagePackageableElementCompartmentEditPart.java
index 8bd99aa96db..c636330009c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackagePackageableElementCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackagePackageableElementCompartmentEditPart.java
@@ -1,135 +1,135 @@
-/**
- * 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.deployment.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.ShapeCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-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.CustomContainerEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.PackagePackageableElementCompartmentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-
-/**
- * @generated
- */
-public class PackagePackageableElementCompartmentEditPart extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 38;
-
- /**
- * @generated
- */
- public PackagePackageableElementCompartmentEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.PackagePackageableElementCompartmentEditPart_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackagePackageableElementCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicy());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
-
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-}
+/**
+ * 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.deployment.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.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+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.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.PackagePackageableElementCompartmentItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+
+/**
+ * @generated
+ */
+public class PackagePackageableElementCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 38;
+
+ /**
+ * @generated
+ */
+ public PackagePackageableElementCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.PackagePackageableElementCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackagePackageableElementCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicy());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackagePackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
index 06f78b23e69..14c7ac2c3ee 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/PackagePackageableElementCompartmentEditPartCN.java
@@ -1,135 +1,135 @@
-/**
- * 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.deployment.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.ShapeCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-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.CustomContainerEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.PackagePackageableElementCompartmentItemSemanticEditPolicyCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-
-/**
- * @generated
- */
-public class PackagePackageableElementCompartmentEditPartCN extends ShapeCompartmentEditPart {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 39;
-
- /**
- * @generated
- */
- public PackagePackageableElementCompartmentEditPartCN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getCompartmentName() {
- return Messages.PackagePackageableElementCompartmentEditPartCN_title;
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackagePackageableElementCompartmentItemSemanticEditPolicyCN());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicyCN());
-
- installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
- super.setRatio(ratio);
- }
- }
-
- /**
- * @generated
- */
- @Override
- public EditPart getTargetEditPart(Request request) {
-
- return super.getTargetEditPart(request);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshBounds();
- }
-}
+/**
+ * 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.deployment.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.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+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.CustomContainerEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.custom.edit.policies.CustomDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.PackagePackageableElementCompartmentItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+
+/**
+ * @generated
+ */
+public class PackagePackageableElementCompartmentEditPartCN extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 39;
+
+ /**
+ * @generated
+ */
+ public PackagePackageableElementCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.PackagePackageableElementCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackagePackageableElementCompartmentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.deployment.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicyCN());
+
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/UMLEditPartFactory.java
index b477c2137bf..ffa7e7d20f8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/UMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/parts/UMLEditPartFactory.java
@@ -1,350 +1,359 @@
-/**
- * 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.deployment.edit.parts;
-
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPartFactory;
-import org.eclipse.gef.tools.CellEditorLocator;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.directedit.locator.CellEditorLocatorAccess;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @generated
- */
-public class UMLEditPartFactory implements EditPartFactory {
-
- /**
- * @generated
- */
- @Override
- public EditPart createEditPart(EditPart context, Object model) {
- if (model instanceof View) {
- View view = (View) model;
- switch (UMLVisualIDRegistry.getVisualID(view)) {
-
- case DeploymentDiagramEditPart.VISUAL_ID:
- return new DeploymentDiagramEditPart(view);
-
- case DependencyNodeEditPart.VISUAL_ID:
- return new DependencyNodeEditPart(view);
-
- case MultiDependencyLabelEditPart.VISUAL_ID:
- return new MultiDependencyLabelEditPart(view);
-
- case ModelEditPart.VISUAL_ID:
- return new ModelEditPart(view);
-
- case ModelNameEditPart.VISUAL_ID:
- return new ModelNameEditPart(view);
-
- case PackageEditPart.VISUAL_ID:
- return new PackageEditPart(view);
-
- case PackageNameEditPart.VISUAL_ID:
- return new PackageNameEditPart(view);
-
- case ConstraintEditPart.VISUAL_ID:
- return new ConstraintEditPart(view);
-
- case ConstraintNameEditPart.VISUAL_ID:
- return new ConstraintNameEditPart(view);
-
- case ConstraintSpecificationEditPart.VISUAL_ID:
- return new ConstraintSpecificationEditPart(view);
-
- case CommentEditPart.VISUAL_ID:
- return new CommentEditPart(view);
-
- case CommentBodyEditPart.VISUAL_ID:
- return new CommentBodyEditPart(view);
-
- case ExecutionEnvironmentEditPart.VISUAL_ID:
- return new ExecutionEnvironmentEditPart(view);
-
- case ExecutionEnvironmentNameEditPart.VISUAL_ID:
- return new ExecutionEnvironmentNameEditPart(view);
-
- case DeviceEditPart.VISUAL_ID:
- return new DeviceEditPart(view);
-
- case DeviceNameEditPart.VISUAL_ID:
- return new DeviceNameEditPart(view);
-
- case ArtifactEditPart.VISUAL_ID:
- return new ArtifactEditPart(view);
-
- case ArtifactNameEditPart.VISUAL_ID:
- return new ArtifactNameEditPart(view);
-
- case NodeEditPart.VISUAL_ID:
- return new NodeEditPart(view);
-
- case NodeNameEditPart.VISUAL_ID:
- return new NodeNameEditPart(view);
-
- case DefaultNamedElementEditPart.VISUAL_ID:
- return new DefaultNamedElementEditPart(view);
-
- case DefaultNamedElementNameEditPart.VISUAL_ID:
- return new DefaultNamedElementNameEditPart(view);
-
- case ModelEditPartCN.VISUAL_ID:
- return new ModelEditPartCN(view);
-
- case ModelNameEditPartCN.VISUAL_ID:
- return new ModelNameEditPartCN(view);
-
- case PackageEditPartCN.VISUAL_ID:
- return new PackageEditPartCN(view);
-
- case PackageNameEditPartCN.VISUAL_ID:
- return new PackageNameEditPartCN(view);
-
- case DeviceEditPartCN.VISUAL_ID:
- return new DeviceEditPartCN(view);
-
- case DeviceNameEditPartCN.VISUAL_ID:
- return new DeviceNameEditPartCN(view);
-
- case NestedDeviceEditPartCN.VISUAL_ID:
- return new NestedDeviceEditPartCN(view);
-
- case NestedDeviceNameEditPartCN.VISUAL_ID:
- return new NestedDeviceNameEditPartCN(view);
-
- case ExecutionEnvironmentEditPartCN.VISUAL_ID:
- return new ExecutionEnvironmentEditPartCN(view);
-
- case ExecutionEnvironmentNameEditPartCN.VISUAL_ID:
- return new ExecutionEnvironmentNameEditPartCN(view);
-
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
- return new NestedExecutionEnvironmentEditPartCN(view);
-
- case NestedExecutionEnvironmentNameEditPartCN.VISUAL_ID:
- return new NestedExecutionEnvironmentNameEditPartCN(view);
-
- case NodeEditPartCN.VISUAL_ID:
- return new NodeEditPartCN(view);
-
- case NodeNameEditPartCN.VISUAL_ID:
- return new NodeNameEditPartCN(view);
-
- case NestedNodeEditPartCN.VISUAL_ID:
- return new NestedNodeEditPartCN(view);
-
- case NestedNodeNameEditPart.VISUAL_ID:
- return new NestedNodeNameEditPart(view);
-
- case ArtifactEditPartCN.VISUAL_ID:
- return new ArtifactEditPartCN(view);
-
- case ArtifactNameEditPartCN.VISUAL_ID:
- return new ArtifactNameEditPartCN(view);
-
- case ArtifactEditPartACN.VISUAL_ID:
- return new ArtifactEditPartACN(view);
-
- case ArtifactNameEditPartACN.VISUAL_ID:
- return new ArtifactNameEditPartACN(view);
-
- case NestedArtifactNodeEditPartCN.VISUAL_ID:
- return new NestedArtifactNodeEditPartCN(view);
-
- case NestedArtifactNameEditPart.VISUAL_ID:
- return new NestedArtifactNameEditPart(view);
-
- case CommentEditPartCN.VISUAL_ID:
- return new CommentEditPartCN(view);
-
- case CommentBodyEditPartCN.VISUAL_ID:
- return new CommentBodyEditPartCN(view);
-
- case ConstraintEditPartCN.VISUAL_ID:
- return new ConstraintEditPartCN(view);
-
- case ConstraintNameEditPartCN.VISUAL_ID:
- return new ConstraintNameEditPartCN(view);
-
- case ConstraintSpecificationEditPartCN.VISUAL_ID:
- return new ConstraintSpecificationEditPartCN(view);
-
- case ModelPackageableElementCompartmentEditPart.VISUAL_ID:
- return new ModelPackageableElementCompartmentEditPart(view);
-
- case PackagePackageableElementCompartmentEditPart.VISUAL_ID:
- return new PackagePackageableElementCompartmentEditPart(view);
-
- case DeviceCompositeCompartmentEditPart.VISUAL_ID:
- return new DeviceCompositeCompartmentEditPart(view);
-
- case ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID:
- return new ExecutionEnvironmentCompositeCompartmentEditPart(view);
-
- case NodeCompositeCompartmentEditPart.VISUAL_ID:
- return new NodeCompositeCompartmentEditPart(view);
-
- case ArtifactCompositeCompartmentEditPart.VISUAL_ID:
- return new ArtifactCompositeCompartmentEditPart(view);
-
- case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
- return new ModelPackageableElementCompartmentEditPartCN(view);
-
- case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
- return new PackagePackageableElementCompartmentEditPartCN(view);
-
- case DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
- return new DeviceCompositeCompartmentEditPartCN(view);
-
- case ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
- return new ExecutionEnvironmentCompositeCompartmentEditPartCN(view);
-
- case NodeCompositeCompartmentEditPartCN.VISUAL_ID:
- return new NodeCompositeCompartmentEditPartCN(view);
-
- case ArtifactCompositeCompartmentEditPartCN.VISUAL_ID:
- return new ArtifactCompositeCompartmentEditPartCN(view);
-
- case ArtifactCompositeCompartmentEditPartACN.VISUAL_ID:
- return new ArtifactCompositeCompartmentEditPartACN(view);
-
- case LinkDescriptorEditPart.VISUAL_ID:
- return new LinkDescriptorEditPart(view);
-
-
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return new CommentAnnotatedElementEditPart(view);
-
-
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return new ConstraintConstrainedElementEditPart(view);
-
-
- case DeploymentEditPart.VISUAL_ID:
- return new DeploymentEditPart(view);
-
- case DeploymentNameEditPart.VISUAL_ID:
- return new DeploymentNameEditPart(view);
-
- case DeploymentAppliedStereotypeEditPart.VISUAL_ID:
- return new DeploymentAppliedStereotypeEditPart(view);
-
-
- case ManifestationEditPart.VISUAL_ID:
- return new ManifestationEditPart(view);
-
- case ManifestationNameEditPart.VISUAL_ID:
- return new ManifestationNameEditPart(view);
-
- case ManifestationAppliedStereotypeEditPart.VISUAL_ID:
- return new ManifestationAppliedStereotypeEditPart(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);
-
- }
- }
- return createUnrecognizedEditPart(context, model);
- }
-
- /**
- * @generated
- */
- private EditPart createUnrecognizedEditPart(EditPart context, Object model) {
- // Handle creation of unrecognized child node EditParts here
- return null;
- }
-
- /**
- * @generated
- */
- public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) {
- if (source.getFigure() instanceof IMultilineEditableFigure) {
- return new MultilineCellEditorLocator(
- (IMultilineEditableFigure) source.getFigure());
- }
- else {
- return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source);
-
- }
- }
-
- /**
- * @generated
- */
- static private class MultilineCellEditorLocator implements CellEditorLocator {
-
- /**
- * @generated
- */
- private IMultilineEditableFigure multilineEditableFigure;
-
- /**
- * @generated
- */
- public MultilineCellEditorLocator(IMultilineEditableFigure figure) {
- this.multilineEditableFigure = figure;
- }
-
- /**
- * @generated
- */
- public IMultilineEditableFigure getMultilineEditableFigure() {
- return multilineEditableFigure;
- }
-
- /**
- * @generated
- */
- @Override
- public void relocate(CellEditor celleditor) {
- Text text = (Text) celleditor.getControl();
- Rectangle rect = getMultilineEditableFigure().getBounds().getCopy();
- rect.x = getMultilineEditableFigure().getEditionLocation().x;
- rect.y = getMultilineEditableFigure().getEditionLocation().y;
- getMultilineEditableFigure().translateToAbsolute(rect);
- if (getMultilineEditableFigure().getText().length() > 0) {
- rect.setSize(new Dimension(text.computeSize(rect.width,
- SWT.DEFAULT)));
- }
- if (!rect.equals(new Rectangle(text.getBounds()))) {
- text.setBounds(rect.x, rect.y, rect.width, rect.height);
- }
- }
- }
-}
+/**
+ * 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.deployment.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartFactory;
+import org.eclipse.gef.tools.CellEditorLocator;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.directedit.locator.CellEditorLocatorAccess;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @generated
+ */
+public class UMLEditPartFactory implements EditPartFactory {
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart createEditPart(EditPart context, Object model) {
+ if (model instanceof View) {
+ View view = (View) model;
+ switch (UMLVisualIDRegistry.getVisualID(view)) {
+
+ case DeploymentDiagramEditPart.VISUAL_ID:
+ return new DeploymentDiagramEditPart(view);
+
+ case DependencyNodeEditPart.VISUAL_ID:
+ return new DependencyNodeEditPart(view);
+
+ case MultiDependencyLabelEditPart.VISUAL_ID:
+ return new MultiDependencyLabelEditPart(view);
+
+ case ModelEditPart.VISUAL_ID:
+ return new ModelEditPart(view);
+
+ case ModelNameEditPart.VISUAL_ID:
+ return new ModelNameEditPart(view);
+
+ case PackageEditPart.VISUAL_ID:
+ return new PackageEditPart(view);
+
+ case PackageNameEditPart.VISUAL_ID:
+ return new PackageNameEditPart(view);
+
+ case ConstraintEditPart.VISUAL_ID:
+ return new ConstraintEditPart(view);
+
+ case ConstraintNameEditPart.VISUAL_ID:
+ return new ConstraintNameEditPart(view);
+
+ case ConstraintSpecificationEditPart.VISUAL_ID:
+ return new ConstraintSpecificationEditPart(view);
+
+ case CommentEditPart.VISUAL_ID:
+ return new CommentEditPart(view);
+
+ case CommentBodyEditPart.VISUAL_ID:
+ return new CommentBodyEditPart(view);
+
+ case ExecutionEnvironmentEditPart.VISUAL_ID:
+ return new ExecutionEnvironmentEditPart(view);
+
+ case ExecutionEnvironmentNameEditPart.VISUAL_ID:
+ return new ExecutionEnvironmentNameEditPart(view);
+
+ case DeviceEditPart.VISUAL_ID:
+ return new DeviceEditPart(view);
+
+ case DeviceNameEditPart.VISUAL_ID:
+ return new DeviceNameEditPart(view);
+
+ case ArtifactEditPart.VISUAL_ID:
+ return new ArtifactEditPart(view);
+
+ case ArtifactNameEditPart.VISUAL_ID:
+ return new ArtifactNameEditPart(view);
+
+ case ArtifactFloatingLabelEditPart.VISUAL_ID:
+ return new ArtifactFloatingLabelEditPart(view);
+
+ case NodeEditPart.VISUAL_ID:
+ return new NodeEditPart(view);
+
+ case NodeNameEditPart.VISUAL_ID:
+ return new NodeNameEditPart(view);
+
+ case DefaultNamedElementEditPart.VISUAL_ID:
+ return new DefaultNamedElementEditPart(view);
+
+ case DefaultNamedElementNameEditPart.VISUAL_ID:
+ return new DefaultNamedElementNameEditPart(view);
+
+ case ModelEditPartCN.VISUAL_ID:
+ return new ModelEditPartCN(view);
+
+ case ModelNameEditPartCN.VISUAL_ID:
+ return new ModelNameEditPartCN(view);
+
+ case PackageEditPartCN.VISUAL_ID:
+ return new PackageEditPartCN(view);
+
+ case PackageNameEditPartCN.VISUAL_ID:
+ return new PackageNameEditPartCN(view);
+
+ case DeviceEditPartCN.VISUAL_ID:
+ return new DeviceEditPartCN(view);
+
+ case DeviceNameEditPartCN.VISUAL_ID:
+ return new DeviceNameEditPartCN(view);
+
+ case NestedDeviceEditPartCN.VISUAL_ID:
+ return new NestedDeviceEditPartCN(view);
+
+ case NestedDeviceNameEditPartCN.VISUAL_ID:
+ return new NestedDeviceNameEditPartCN(view);
+
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID:
+ return new ExecutionEnvironmentEditPartCN(view);
+
+ case ExecutionEnvironmentNameEditPartCN.VISUAL_ID:
+ return new ExecutionEnvironmentNameEditPartCN(view);
+
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
+ return new NestedExecutionEnvironmentEditPartCN(view);
+
+ case NestedExecutionEnvironmentNameEditPartCN.VISUAL_ID:
+ return new NestedExecutionEnvironmentNameEditPartCN(view);
+
+ case NodeEditPartCN.VISUAL_ID:
+ return new NodeEditPartCN(view);
+
+ case NodeNameEditPartCN.VISUAL_ID:
+ return new NodeNameEditPartCN(view);
+
+ case NestedNodeEditPartCN.VISUAL_ID:
+ return new NestedNodeEditPartCN(view);
+
+ case NestedNodeNameEditPart.VISUAL_ID:
+ return new NestedNodeNameEditPart(view);
+
+ case ArtifactEditPartCN.VISUAL_ID:
+ return new ArtifactEditPartCN(view);
+
+ case ArtifactNameEditPartCN.VISUAL_ID:
+ return new ArtifactNameEditPartCN(view);
+
+ case ArtifactFloatingLabelEditPartCN.VISUAL_ID:
+ return new ArtifactFloatingLabelEditPartCN(view);
+
+ case ArtifactEditPartACN.VISUAL_ID:
+ return new ArtifactEditPartACN(view);
+
+ case ArtifactNameEditPartACN.VISUAL_ID:
+ return new ArtifactNameEditPartACN(view);
+
+ case ArtifactFloatingLabelEditPartACN.VISUAL_ID:
+ return new ArtifactFloatingLabelEditPartACN(view);
+
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+ return new NestedArtifactNodeEditPartCN(view);
+
+ case NestedArtifactNameEditPart.VISUAL_ID:
+ return new NestedArtifactNameEditPart(view);
+
+ case CommentEditPartCN.VISUAL_ID:
+ return new CommentEditPartCN(view);
+
+ case CommentBodyEditPartCN.VISUAL_ID:
+ return new CommentBodyEditPartCN(view);
+
+ case ConstraintEditPartCN.VISUAL_ID:
+ return new ConstraintEditPartCN(view);
+
+ case ConstraintNameEditPartCN.VISUAL_ID:
+ return new ConstraintNameEditPartCN(view);
+
+ case ConstraintSpecificationEditPartCN.VISUAL_ID:
+ return new ConstraintSpecificationEditPartCN(view);
+
+ case ModelPackageableElementCompartmentEditPart.VISUAL_ID:
+ return new ModelPackageableElementCompartmentEditPart(view);
+
+ case PackagePackageableElementCompartmentEditPart.VISUAL_ID:
+ return new PackagePackageableElementCompartmentEditPart(view);
+
+ case DeviceCompositeCompartmentEditPart.VISUAL_ID:
+ return new DeviceCompositeCompartmentEditPart(view);
+
+ case ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID:
+ return new ExecutionEnvironmentCompositeCompartmentEditPart(view);
+
+ case NodeCompositeCompartmentEditPart.VISUAL_ID:
+ return new NodeCompositeCompartmentEditPart(view);
+
+ case ArtifactCompositeCompartmentEditPart.VISUAL_ID:
+ return new ArtifactCompositeCompartmentEditPart(view);
+
+ case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
+ return new ModelPackageableElementCompartmentEditPartCN(view);
+
+ case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
+ return new PackagePackageableElementCompartmentEditPartCN(view);
+
+ case DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
+ return new DeviceCompositeCompartmentEditPartCN(view);
+
+ case ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
+ return new ExecutionEnvironmentCompositeCompartmentEditPartCN(view);
+
+ case NodeCompositeCompartmentEditPartCN.VISUAL_ID:
+ return new NodeCompositeCompartmentEditPartCN(view);
+
+ case ArtifactCompositeCompartmentEditPartCN.VISUAL_ID:
+ return new ArtifactCompositeCompartmentEditPartCN(view);
+
+ case ArtifactCompositeCompartmentEditPartACN.VISUAL_ID:
+ return new ArtifactCompositeCompartmentEditPartACN(view);
+
+ case LinkDescriptorEditPart.VISUAL_ID:
+ return new LinkDescriptorEditPart(view);
+
+
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return new CommentAnnotatedElementEditPart(view);
+
+
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return new ConstraintConstrainedElementEditPart(view);
+
+
+ case DeploymentEditPart.VISUAL_ID:
+ return new DeploymentEditPart(view);
+
+ case DeploymentNameEditPart.VISUAL_ID:
+ return new DeploymentNameEditPart(view);
+
+ case DeploymentAppliedStereotypeEditPart.VISUAL_ID:
+ return new DeploymentAppliedStereotypeEditPart(view);
+
+
+ case ManifestationEditPart.VISUAL_ID:
+ return new ManifestationEditPart(view);
+
+ case ManifestationNameEditPart.VISUAL_ID:
+ return new ManifestationNameEditPart(view);
+
+ case ManifestationAppliedStereotypeEditPart.VISUAL_ID:
+ return new ManifestationAppliedStereotypeEditPart(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);
+
+ }
+ }
+ return createUnrecognizedEditPart(context, model);
+ }
+
+ /**
+ * @generated
+ */
+ private EditPart createUnrecognizedEditPart(EditPart context, Object model) {
+ // Handle creation of unrecognized child node EditParts here
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) {
+ if (source.getFigure() instanceof IMultilineEditableFigure) {
+ return new MultilineCellEditorLocator(
+ (IMultilineEditableFigure) source.getFigure());
+ }
+ else {
+ return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source);
+
+ }
+ }
+
+ /**
+ * @generated
+ */
+ static private class MultilineCellEditorLocator implements CellEditorLocator {
+
+ /**
+ * @generated
+ */
+ private IMultilineEditableFigure multilineEditableFigure;
+
+ /**
+ * @generated
+ */
+ public MultilineCellEditorLocator(IMultilineEditableFigure figure) {
+ this.multilineEditableFigure = figure;
+ }
+
+ /**
+ * @generated
+ */
+ public IMultilineEditableFigure getMultilineEditableFigure() {
+ return multilineEditableFigure;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void relocate(CellEditor celleditor) {
+ Text text = (Text) celleditor.getControl();
+ Rectangle rect = getMultilineEditableFigure().getBounds().getCopy();
+ rect.x = getMultilineEditableFigure().getEditionLocation().x;
+ rect.y = getMultilineEditableFigure().getEditionLocation().y;
+ getMultilineEditableFigure().translateToAbsolute(rect);
+ if (getMultilineEditableFigure().getText().length() > 0) {
+ rect.setSize(new Dimension(text.computeSize(rect.width,
+ SWT.DEFAULT)));
+ }
+ if (!rect.equals(new Rectangle(text.getBounds()))) {
+ text.setBounds(rect.x, rect.y, rect.width, rect.height);
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicy.java
index 9e529931237..97fca2733a7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicy.java
@@ -1,176 +1,176 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ArtifactCompositeCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected EStructuralFeature getFeatureToSynchronize() {
- return UMLPackage.eINSTANCE.getArtifact_NestedArtifact();
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getArtifactArtifactCompositeCompartment_26SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- return ArtifactEditPartACN.VISUAL_ID == UMLVisualIDRegistry.getVisualID(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getArtifactArtifactCompositeCompartment_26SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ArtifactCompositeCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getFeatureToSynchronize() {
+ return UMLPackage.eINSTANCE.getArtifact_NestedArtifact();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getArtifactArtifactCompositeCompartment_26SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ return ArtifactEditPartACN.VISUAL_ID == UMLVisualIDRegistry.getVisualID(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getArtifactArtifactCompositeCompartment_26SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ makeViewsImmutable(createdViews);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyACN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyACN.java
index 586131feb81..63b3a278c27 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyACN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyACN.java
@@ -1,176 +1,176 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ArtifactCompositeCompartmentCanonicalEditPolicyACN extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected EStructuralFeature getFeatureToSynchronize() {
- return UMLPackage.eINSTANCE.getArtifact_NestedArtifact();
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getArtifactArtifactCompositeCompartment_34SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- return ArtifactEditPartACN.VISUAL_ID == UMLVisualIDRegistry.getVisualID(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getArtifactArtifactCompositeCompartment_34SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ArtifactCompositeCompartmentCanonicalEditPolicyACN extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getFeatureToSynchronize() {
+ return UMLPackage.eINSTANCE.getArtifact_NestedArtifact();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getArtifactArtifactCompositeCompartment_34SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ return ArtifactEditPartACN.VISUAL_ID == UMLVisualIDRegistry.getVisualID(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getArtifactArtifactCompositeCompartment_34SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ makeViewsImmutable(createdViews);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyCN.java
index e6caa1607f6..ca8255657ca 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyCN.java
@@ -1,176 +1,176 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ArtifactCompositeCompartmentCanonicalEditPolicyCN extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected EStructuralFeature getFeatureToSynchronize() {
- return UMLPackage.eINSTANCE.getArtifact_NestedArtifact();
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getArtifactArtifactCompositeCompartment_33SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- return ArtifactEditPartACN.VISUAL_ID == UMLVisualIDRegistry.getVisualID(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getArtifactArtifactCompositeCompartment_33SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ArtifactCompositeCompartmentCanonicalEditPolicyCN extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getFeatureToSynchronize() {
+ return UMLPackage.eINSTANCE.getArtifact_NestedArtifact();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getArtifactArtifactCompositeCompartment_33SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ return ArtifactEditPartACN.VISUAL_ID == UMLVisualIDRegistry.getVisualID(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getArtifactArtifactCompositeCompartment_33SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ makeViewsImmutable(createdViews);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyCN.java
index 0866f80a073..abf5f529515 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -27,7 +27,7 @@ public class ArtifactCompositeCompartmentItemSemanticEditPolicyCN extends UMLBas
* @generated
*/
public ArtifactCompositeCompartmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Artifact_40);
+ super(UMLElementTypes.Artifact_25);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicy.java
index c9485a24849..e39cffe4f24 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicy.java
@@ -1,266 +1,266 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ArtifactItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ArtifactItemSemanticEditPolicy() {
- super(UMLElementTypes.Artifact_2006);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ArtifactItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ArtifactItemSemanticEditPolicy() {
+ super(UMLElementTypes.Artifact_2006);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyACN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyACN.java
index 32873c8d191..81dde53dffa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyACN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyACN.java
@@ -1,339 +1,339 @@
-/**
- * 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.deployment.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.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-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.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ArtifactItemSemanticEditPolicyACN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ArtifactItemSemanticEditPolicyACN() {
- super(UMLElementTypes.Artifact_28);
- }
-
- /**
- * @generated
- */
- @Override
- 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 ArtifactCompositeCompartmentEditPartACN.VISUAL_ID:
- for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
- Node cnode = (Node) cit.next();
- switch (UMLVisualIDRegistry.getVisualID(cnode)) {
- case ArtifactEditPartACN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- }
- }
- break;
- }
- }
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.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.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.commands.DestroyReferenceCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ArtifactItemSemanticEditPolicyACN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ArtifactItemSemanticEditPolicyACN() {
+ super(UMLElementTypes.Artifact_28);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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 ArtifactCompositeCompartmentEditPartACN.VISUAL_ID:
+ for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node) cit.next();
+ switch (UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ArtifactEditPartACN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyCN.java
index bf7ddf66b3c..092b1cf5ed5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyCN.java
@@ -1,278 +1,339 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-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.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ArtifactItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ArtifactItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Artifact_25);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View) getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
- EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
- if (annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.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.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.commands.DestroyReferenceCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ArtifactItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ArtifactItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Artifact_25);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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 ArtifactCompositeCompartmentEditPartCN.VISUAL_ID:
+ for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node) cit.next();
+ switch (UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ArtifactEditPartACN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java
index 7f2a717b930..03b35f376ba 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java
@@ -1,161 +1,161 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CommentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CommentItemSemanticEditPolicy() {
- super(UMLElementTypes.Comment_2001);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class CommentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public CommentItemSemanticEditPolicy() {
+ super(UMLElementTypes.Comment_2001);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ return null;
+ }
+
+ /**
+ * Returns command to reorient EReference based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicyCN.java
index a94a0a93031..4786f21c4e6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicyCN.java
@@ -1,169 +1,169 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-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.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.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public CommentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Comment_54);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View) getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
- EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
- if (annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+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.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.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public CommentItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Comment_54);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ View view = (View) getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
+ if (annotation == null) {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ List<EObject> todestroy = new ArrayList<EObject>();
+ todestroy.add(req.getElementToDestroy());
+ // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ } else {
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ return null;
+ }
+
+ /**
+ * Returns command to reorient EReference based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicy.java
index 52d63836f7f..4d7cda2a34a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicy.java
@@ -1,253 +1,253 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConstraintItemSemanticEditPolicy() {
- super(UMLElementTypes.Constraint_2005);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ConstraintItemSemanticEditPolicy() {
+ super(UMLElementTypes.Constraint_2005);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicyCN.java
index a83224a3546..d30c44d5f53 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicyCN.java
@@ -1,265 +1,265 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-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.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ConstraintItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Constraint_56);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View) getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
- EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
- if (annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ConstraintItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Constraint_56);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ View view = (View) getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
+ if (annotation == null) {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ List<EObject> todestroy = new ArrayList<EObject>();
+ todestroy.add(req.getElementToDestroy());
+ // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ } else {
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java
index 9a031a0fbca..fde45895a8d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java
@@ -1,261 +1,261 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-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.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DefaultNamedElementItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DefaultNamedElementItemSemanticEditPolicy() {
- super(UMLElementTypes.NamedElement_2012);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View) getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
- EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
- if (annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class DefaultNamedElementItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public DefaultNamedElementItemSemanticEditPolicy() {
+ super(UMLElementTypes.NamedElement_2012);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ View view = (View) getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
+ if (annotation == null) {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ List<EObject> todestroy = new ArrayList<EObject>();
+ todestroy.add(req.getElementToDestroy());
+ // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ } else {
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyBranchItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyBranchItemSemanticEditPolicy.java
index 30a7de68899..251703addbf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyBranchItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyBranchItemSemanticEditPolicy.java
@@ -1,249 +1,249 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DependencyBranchItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DependencyBranchItemSemanticEditPolicy() {
- super(UMLElementTypes.Dependency_4010);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class DependencyBranchItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public DependencyBranchItemSemanticEditPolicy() {
+ super(UMLElementTypes.Dependency_4010);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyItemSemanticEditPolicy.java
index 856fc559302..678734259c9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyItemSemanticEditPolicy.java
@@ -1,249 +1,249 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DependencyItemSemanticEditPolicy() {
- super(UMLElementTypes.Dependency_4004);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public DependencyItemSemanticEditPolicy() {
+ super(UMLElementTypes.Dependency_4004);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyNodeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyNodeItemSemanticEditPolicy.java
index c74f26ab68f..5dea41ccd43 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyNodeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyNodeItemSemanticEditPolicy.java
@@ -1,249 +1,249 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DependencyNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DependencyNodeItemSemanticEditPolicy() {
- super(UMLElementTypes.Dependency_2011);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class DependencyNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public DependencyNodeItemSemanticEditPolicy() {
+ super(UMLElementTypes.Dependency_2011);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentItemSemanticEditPolicy.java
index e6701aaf348..93882cb599f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentItemSemanticEditPolicy.java
@@ -1,249 +1,249 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DeploymentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DeploymentItemSemanticEditPolicy() {
- super(UMLElementTypes.Deployment_4001);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class DeploymentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public DeploymentItemSemanticEditPolicy() {
+ super(UMLElementTypes.Deployment_4001);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicy.java
index 34ef6a3cd32..9613fb5ab47 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicy.java
@@ -1,179 +1,179 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DeviceCompositeCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected EStructuralFeature getFeatureToSynchronize() {
- return UMLPackage.eINSTANCE.getNode_NestedNode();
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getDeviceDeviceCompositeCompartment_17SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- return visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID || visualID == DeviceEditPartCN.VISUAL_ID || visualID == NodeEditPartCN.VISUAL_ID;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getDeviceDeviceCompositeCompartment_17SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class DeviceCompositeCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getFeatureToSynchronize() {
+ return UMLPackage.eINSTANCE.getNode_NestedNode();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getDeviceDeviceCompositeCompartment_17SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ int visualID = UMLVisualIDRegistry.getVisualID(view);
+ return visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID || visualID == DeviceEditPartCN.VISUAL_ID || visualID == NodeEditPartCN.VISUAL_ID;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getDeviceDeviceCompositeCompartment_17SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ makeViewsImmutable(createdViews);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicyCN.java
index 389f7b5117a..c07377082cf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicyCN.java
@@ -1,179 +1,179 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class DeviceCompositeCompartmentCanonicalEditPolicyCN extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected EStructuralFeature getFeatureToSynchronize() {
- return UMLPackage.eINSTANCE.getNode_NestedNode();
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getDeviceDeviceCompositeCompartment_30SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- return visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID || visualID == DeviceEditPartCN.VISUAL_ID || visualID == NodeEditPartCN.VISUAL_ID;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getDeviceDeviceCompositeCompartment_30SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class DeviceCompositeCompartmentCanonicalEditPolicyCN extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getFeatureToSynchronize() {
+ return UMLPackage.eINSTANCE.getNode_NestedNode();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getDeviceDeviceCompositeCompartment_30SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ int visualID = UMLVisualIDRegistry.getVisualID(view);
+ return visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID || visualID == DeviceEditPartCN.VISUAL_ID || visualID == NodeEditPartCN.VISUAL_ID;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getDeviceDeviceCompositeCompartment_30SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ makeViewsImmutable(createdViews);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicy.java
index bdb0f0e397c..6ac83ffb0df 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicy.java
@@ -1,266 +1,266 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DeviceItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DeviceItemSemanticEditPolicy() {
- super(UMLElementTypes.Device_2003);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class DeviceItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public DeviceItemSemanticEditPolicy() {
+ super(UMLElementTypes.Device_2003);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicyCN.java
index 71c4cd6ed57..47e58cb6331 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicyCN.java
@@ -1,278 +1,278 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-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.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class DeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public DeviceItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Device_16);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View) getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
- EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
- if (annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class DeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public DeviceItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Device_16);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ View view = (View) getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
+ if (annotation == null) {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ List<EObject> todestroy = new ArrayList<EObject>();
+ todestroy.add(req.getElementToDestroy());
+ // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ } else {
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy.java
index b3872ac095a..3c4746193d3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy.java
@@ -1,190 +1,190 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- private Set<EStructuralFeature> myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected Set<EStructuralFeature> getFeaturesToSynchronize() {
- if (myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNode_NestedNode());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getClass_NestedClassifier());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_18SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- return visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID || visualID == ArtifactEditPartCN.VISUAL_ID;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_18SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ private Set<EStructuralFeature> myFeaturesToSynchronize;
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Set<EStructuralFeature> getFeaturesToSynchronize() {
+ if (myFeaturesToSynchronize == null) {
+ myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNode_NestedNode());
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getClass_NestedClassifier());
+ }
+ return myFeaturesToSynchronize;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_18SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ int visualID = UMLVisualIDRegistry.getVisualID(view);
+ return visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID || visualID == ArtifactEditPartCN.VISUAL_ID;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_18SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ makeViewsImmutable(createdViews);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN.java
index 4de6c3a30a4..2b7b6d61eb2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN.java
@@ -1,190 +1,190 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- private Set<EStructuralFeature> myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected Set<EStructuralFeature> getFeaturesToSynchronize() {
- if (myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getClass_NestedClassifier());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNode_NestedNode());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_31SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- return visualID == ArtifactEditPartCN.VISUAL_ID || visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_31SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ private Set<EStructuralFeature> myFeaturesToSynchronize;
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Set<EStructuralFeature> getFeaturesToSynchronize() {
+ if (myFeaturesToSynchronize == null) {
+ myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getClass_NestedClassifier());
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNode_NestedNode());
+ }
+ return myFeaturesToSynchronize;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_31SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ int visualID = UMLVisualIDRegistry.getVisualID(view);
+ return visualID == ArtifactEditPartCN.VISUAL_ID || visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_31SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ makeViewsImmutable(createdViews);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicy.java
index 003205694db..07280fea799 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicy.java
@@ -1,266 +1,266 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ExecutionEnvironmentItemSemanticEditPolicy() {
- super(UMLElementTypes.ExecutionEnvironment_2002);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ExecutionEnvironmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ExecutionEnvironmentItemSemanticEditPolicy() {
+ super(UMLElementTypes.ExecutionEnvironment_2002);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicyCN.java
index 3a4a7f65a5e..7a388f53636 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicyCN.java
@@ -1,278 +1,278 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-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.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ExecutionEnvironmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ExecutionEnvironmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.ExecutionEnvironment_21);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View) getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
- EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
- if (annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ExecutionEnvironmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ExecutionEnvironmentItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.ExecutionEnvironment_21);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ View view = (View) getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
+ if (annotation == null) {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ List<EObject> todestroy = new ArrayList<EObject>();
+ todestroy.add(req.getElementToDestroy());
+ // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ } else {
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/GeneralizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/GeneralizationItemSemanticEditPolicy.java
index 3811ed7f142..f4e6f5f1c7a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/GeneralizationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/GeneralizationItemSemanticEditPolicy.java
@@ -1,154 +1,154 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public GeneralizationItemSemanticEditPolicy() {
- super(UMLElementTypes.Generalization_4003);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- } 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);
- }
- }
- if (UMLElementTypes.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- return null;
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public GeneralizationItemSemanticEditPolicy() {
+ super(UMLElementTypes.Generalization_4003);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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;
+ if (requestElementType instanceof IExtendedHintedElementType) {
+ baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
+ if (baseElementType != null) {
+ } 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);
+ }
+ }
+ if (UMLElementTypes.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ return null;
+ }
+
+ /**
+ * Returns command to reorient EReference based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ManifestationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ManifestationItemSemanticEditPolicy.java
index 25887837890..8b15a004e7e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ManifestationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ManifestationItemSemanticEditPolicy.java
@@ -1,249 +1,249 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ManifestationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ManifestationItemSemanticEditPolicy() {
- super(UMLElementTypes.Manifestation_4002);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ManifestationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ManifestationItemSemanticEditPolicy() {
+ super(UMLElementTypes.Manifestation_4002);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelCanonicalEditPolicy.java
index 04df914ef07..b22599883a4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelCanonicalEditPolicy.java
@@ -1,639 +1,639 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.update.UpdaterLinkDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.LinkDescriptorEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLLinkDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- private Set<EStructuralFeature> myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected Set<EStructuralFeature> getFeaturesToSynchronize() {
- if (myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getPackage_PackagedElement());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getElement_OwnedComment());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getPackage_1000SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- switch (visualID) {
- case DependencyNodeEditPart.VISUAL_ID:
- case ModelEditPart.VISUAL_ID:
- case PackageEditPart.VISUAL_ID:
- case ConstraintEditPart.VISUAL_ID:
- case CommentEditPart.VISUAL_ID:
- case ExecutionEnvironmentEditPart.VISUAL_ID:
- case DeviceEditPart.VISUAL_ID:
- case ArtifactEditPart.VISUAL_ID:
- case NodeEditPart.VISUAL_ID:
- case DefaultNamedElementEditPart.VISUAL_ID:
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getPackage_1000SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
-
- Collection<IAdaptable> createdConnectionViews = refreshConnections();
-
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- createdViews.addAll(createdConnectionViews);
-
- makeViewsImmutable(createdViews);
- }
-
- /**
- * @generated
- */
- private Collection<IAdaptable> refreshConnections() {
- Domain2Notation domain2NotationMap = new Domain2Notation();
- Collection<UMLLinkDescriptor> linkDescriptors = collectAllLinks(getDiagram(), domain2NotationMap);
- List<View> edges = new ArrayList<View>();
- for (Object edge : getDiagram().getEdges())
- {
- if (edge instanceof View)
- {
- edges.add((View) edge);
- }
- }
- Collection<View> existingLinks = new LinkedList<View>(edges);
- for (Iterator<View> linksIterator = existingLinks.iterator(); linksIterator.hasNext();) {
- Edge nextDiagramLink = (Edge) linksIterator.next();
- int diagramLinkVisualID = UMLVisualIDRegistry.getVisualID(nextDiagramLink);
- if (diagramLinkVisualID == -1 || diagramLinkVisualID == LinkDescriptorEditPart.VISUAL_ID) {
- if (nextDiagramLink.getSource() != null && nextDiagramLink.getTarget() != null) {
- linksIterator.remove();
- }
- continue;
- }
- EObject diagramLinkObject = nextDiagramLink.getElement();
- EObject diagramLinkSrc = nextDiagramLink.getSource().getElement();
- EObject diagramLinkDst = nextDiagramLink.getTarget().getElement();
- for (Iterator<UMLLinkDescriptor> linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator.hasNext();) {
- UMLLinkDescriptor nextLinkDescriptor = linkDescriptorsIterator.next();
- if (diagramLinkObject == nextLinkDescriptor.getModelElement() && diagramLinkSrc == nextLinkDescriptor.getSource() && diagramLinkDst == nextLinkDescriptor.getDestination() && diagramLinkVisualID == nextLinkDescriptor.getVisualID()) {
- linksIterator.remove();
- linkDescriptorsIterator.remove();
- break;
- }
- }
- }
- deleteViews(existingLinks.iterator());
- return createConnections(linkDescriptors, domain2NotationMap);
- }
-
- /**
- * @generated
- */
- private Collection<UMLLinkDescriptor> collectAllLinks(View view, Domain2Notation domain2NotationMap) {
- if (!DeploymentDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view))) {
- return Collections.emptyList();
- }
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- switch (UMLVisualIDRegistry.getVisualID(view)) {
- case DeploymentDiagramEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getPackage_1000ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case DependencyNodeEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getDependency_2011ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ModelEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getModel_2010ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case PackageEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getPackage_2009ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ConstraintEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getConstraint_2005ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case CommentEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getComment_2001ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ExecutionEnvironmentEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getExecutionEnvironment_2002ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case DeviceEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getDevice_2003ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ArtifactEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getArtifact_2006ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case NodeEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getNode_2008ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case DefaultNamedElementEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getNamedElement_2012ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ModelEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getModel_49ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case PackageEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getPackage_36ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case DeviceEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getDevice_16ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case NestedDeviceEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getDevice_44ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ExecutionEnvironmentEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getExecutionEnvironment_21ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getExecutionEnvironment_46ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case NodeEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getNode_23ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case NestedNodeEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getNode_42ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ArtifactEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getArtifact_25ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ArtifactEditPartACN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getArtifact_28ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case NestedArtifactNodeEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getArtifact_40ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case CommentEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getComment_54ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ConstraintEditPartCN.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getConstraint_56ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case DeploymentEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getDeployment_4001ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case ManifestationEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getManifestation_4002ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case GeneralizationEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getGeneralization_4003ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case DependencyEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getDependency_4004ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- case DependencyBranchEditPart.VISUAL_ID: {
- if (!domain2NotationMap.containsKey(view.getElement())) {
- result.addAll(UMLDiagramUpdater.INSTANCE
- .getDependency_4010ContainedLinks(view));
- }
- domain2NotationMap.putView(view.getElement(), view);
- break;
- }
- }
- for (Iterator<?> children = view.getChildren().iterator(); children.hasNext();) {
- result.addAll(collectAllLinks((View) children.next(), domain2NotationMap));
- }
- for (Iterator<?> edges = view.getSourceEdges().iterator(); edges.hasNext();) {
- result.addAll(collectAllLinks((View) edges.next(), domain2NotationMap));
- }
- return result;
- }
-
- /**
- * @generated
- */
- private Collection<IAdaptable> createConnections(Collection<UMLLinkDescriptor> linkDescriptors, Domain2Notation domain2NotationMap) {
- LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
- for (UMLLinkDescriptor nextLinkDescriptor : linkDescriptors) {
- EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
- EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
- if (sourceEditPart == null || targetEditPart == null) {
- continue;
- }
- CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(nextLinkDescriptor.getSemanticAdapter(), UMLVisualIDRegistry.getType(nextLinkDescriptor.getVisualID()), ViewUtil.APPEND,
- false, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
- CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(descriptor);
- ccr.setType(org.eclipse.gef.RequestConstants.REQ_CONNECTION_START);
- ccr.setSourceEditPart(sourceEditPart);
- sourceEditPart.getCommand(ccr);
- ccr.setTargetEditPart(targetEditPart);
- ccr.setType(org.eclipse.gef.RequestConstants.REQ_CONNECTION_END);
- Command cmd = targetEditPart.getCommand(ccr);
- if (cmd != null && cmd.canExecute()) {
- executeCommand(cmd);
- IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
- if (viewAdapter != null) {
- adapters.add(viewAdapter);
- }
- }
- }
- return adapters;
- }
-
- /**
- * @generated
- */
- private EditPart getEditPart(EObject domainModelElement, Domain2Notation domain2NotationMap) {
- View view = domain2NotationMap.get(domainModelElement);
- if (view != null) {
- return (EditPart) getHost().getViewer().getEditPartRegistry().get(view);
- }
- return null;
- }
-
- /**
- * @generated
- */
- private Diagram getDiagram() {
- return ((View) getHost().getModel()).getDiagram();
- }
-
- /**
- * @generated
- */
- private EditPart getSourceEditPart(UpdaterLinkDescriptor descriptor, Domain2Notation domain2NotationMap) {
- return getEditPart(descriptor.getSource(), domain2NotationMap);
- }
-
- /**
- * @generated
- */
- private EditPart getTargetEditPart(UpdaterLinkDescriptor descriptor, Domain2Notation domain2NotationMap) {
- return getEditPart(descriptor.getDestination(), domain2NotationMap);
- }
-
- /**
- * @generated
- */
- protected final EditPart getHintedEditPart(EObject domainModelElement, Domain2Notation domain2NotationMap, int hintVisualId) {
- View view = domain2NotationMap.getHinted(domainModelElement, UMLVisualIDRegistry.getType(hintVisualId));
- if (view != null) {
- return (EditPart) getHost().getViewer().getEditPartRegistry().get(view);
- }
- return null;
- }
-
- /**
- * @generated
- */
- @SuppressWarnings("serial")
- protected static class Domain2Notation extends HashMap<EObject, View> {
-
- /**
- * @generated
- */
- public boolean containsDomainElement(EObject domainElement) {
- return this.containsKey(domainElement);
- }
-
- /**
- * @generated
- */
- public View getHinted(EObject domainEObject, String hint) {
- return this.get(domainEObject);
- }
-
- /**
- * @generated
- */
- public void putView(EObject domainElement, View view) {
- if (!containsKey(view.getElement())) {
- this.put(domainElement, view);
- }
- }
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.update.UpdaterLinkDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.LinkDescriptorEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLLinkDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ private Set<EStructuralFeature> myFeaturesToSynchronize;
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Set<EStructuralFeature> getFeaturesToSynchronize() {
+ if (myFeaturesToSynchronize == null) {
+ myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getPackage_PackagedElement());
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getElement_OwnedComment());
+ }
+ return myFeaturesToSynchronize;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getPackage_1000SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ int visualID = UMLVisualIDRegistry.getVisualID(view);
+ switch (visualID) {
+ case DependencyNodeEditPart.VISUAL_ID:
+ case ModelEditPart.VISUAL_ID:
+ case PackageEditPart.VISUAL_ID:
+ case ConstraintEditPart.VISUAL_ID:
+ case CommentEditPart.VISUAL_ID:
+ case ExecutionEnvironmentEditPart.VISUAL_ID:
+ case DeviceEditPart.VISUAL_ID:
+ case ArtifactEditPart.VISUAL_ID:
+ case NodeEditPart.VISUAL_ID:
+ case DefaultNamedElementEditPart.VISUAL_ID:
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getPackage_1000SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+
+ Collection<IAdaptable> createdConnectionViews = refreshConnections();
+
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ createdViews.addAll(createdConnectionViews);
+
+ makeViewsImmutable(createdViews);
+ }
+
+ /**
+ * @generated
+ */
+ private Collection<IAdaptable> refreshConnections() {
+ Domain2Notation domain2NotationMap = new Domain2Notation();
+ Collection<UMLLinkDescriptor> linkDescriptors = collectAllLinks(getDiagram(), domain2NotationMap);
+ List<View> edges = new ArrayList<View>();
+ for (Object edge : getDiagram().getEdges())
+ {
+ if (edge instanceof View)
+ {
+ edges.add((View) edge);
+ }
+ }
+ Collection<View> existingLinks = new LinkedList<View>(edges);
+ for (Iterator<View> linksIterator = existingLinks.iterator(); linksIterator.hasNext();) {
+ Edge nextDiagramLink = (Edge) linksIterator.next();
+ int diagramLinkVisualID = UMLVisualIDRegistry.getVisualID(nextDiagramLink);
+ if (diagramLinkVisualID == -1 || diagramLinkVisualID == LinkDescriptorEditPart.VISUAL_ID) {
+ if (nextDiagramLink.getSource() != null && nextDiagramLink.getTarget() != null) {
+ linksIterator.remove();
+ }
+ continue;
+ }
+ EObject diagramLinkObject = nextDiagramLink.getElement();
+ EObject diagramLinkSrc = nextDiagramLink.getSource().getElement();
+ EObject diagramLinkDst = nextDiagramLink.getTarget().getElement();
+ for (Iterator<UMLLinkDescriptor> linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator.hasNext();) {
+ UMLLinkDescriptor nextLinkDescriptor = linkDescriptorsIterator.next();
+ if (diagramLinkObject == nextLinkDescriptor.getModelElement() && diagramLinkSrc == nextLinkDescriptor.getSource() && diagramLinkDst == nextLinkDescriptor.getDestination() && diagramLinkVisualID == nextLinkDescriptor.getVisualID()) {
+ linksIterator.remove();
+ linkDescriptorsIterator.remove();
+ break;
+ }
+ }
+ }
+ deleteViews(existingLinks.iterator());
+ return createConnections(linkDescriptors, domain2NotationMap);
+ }
+
+ /**
+ * @generated
+ */
+ private Collection<UMLLinkDescriptor> collectAllLinks(View view, Domain2Notation domain2NotationMap) {
+ if (!DeploymentDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view))) {
+ return Collections.emptyList();
+ }
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ switch (UMLVisualIDRegistry.getVisualID(view)) {
+ case DeploymentDiagramEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getPackage_1000ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case DependencyNodeEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getDependency_2011ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case ModelEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getModel_2010ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case PackageEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getPackage_2009ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case ConstraintEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getConstraint_2005ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case CommentEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getComment_2001ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case ExecutionEnvironmentEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getExecutionEnvironment_2002ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case DeviceEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getDevice_2003ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case ArtifactEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getArtifact_2006ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case NodeEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getNode_2008ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case DefaultNamedElementEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getNamedElement_2012ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case ModelEditPartCN.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getModel_49ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case PackageEditPartCN.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getPackage_36ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case DeviceEditPartCN.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getDevice_16ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case NestedDeviceEditPartCN.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getDevice_44ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getExecutionEnvironment_21ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getExecutionEnvironment_46ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case NodeEditPartCN.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getNode_23ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case NestedNodeEditPartCN.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getNode_42ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case ArtifactEditPartCN.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getArtifact_25ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case ArtifactEditPartACN.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getArtifact_28ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case NestedArtifactNodeEditPartCN.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getArtifact_40ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case CommentEditPartCN.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getComment_54ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case ConstraintEditPartCN.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getConstraint_56ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case DeploymentEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getDeployment_4001ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case ManifestationEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getManifestation_4002ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case GeneralizationEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getGeneralization_4003ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case DependencyEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getDependency_4004ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ case DependencyBranchEditPart.VISUAL_ID: {
+ if (!domain2NotationMap.containsKey(view.getElement())) {
+ result.addAll(UMLDiagramUpdater.INSTANCE
+ .getDependency_4010ContainedLinks(view));
+ }
+ domain2NotationMap.putView(view.getElement(), view);
+ break;
+ }
+ }
+ for (Iterator<?> children = view.getChildren().iterator(); children.hasNext();) {
+ result.addAll(collectAllLinks((View) children.next(), domain2NotationMap));
+ }
+ for (Iterator<?> edges = view.getSourceEdges().iterator(); edges.hasNext();) {
+ result.addAll(collectAllLinks((View) edges.next(), domain2NotationMap));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private Collection<IAdaptable> createConnections(Collection<UMLLinkDescriptor> linkDescriptors, Domain2Notation domain2NotationMap) {
+ LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
+ for (UMLLinkDescriptor nextLinkDescriptor : linkDescriptors) {
+ EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
+ EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
+ if (sourceEditPart == null || targetEditPart == null) {
+ continue;
+ }
+ CreateConnectionViewRequest.ConnectionViewDescriptor descriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(nextLinkDescriptor.getSemanticAdapter(), UMLVisualIDRegistry.getType(nextLinkDescriptor.getVisualID()), ViewUtil.APPEND,
+ false, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
+ CreateConnectionViewRequest ccr = new CreateConnectionViewRequest(descriptor);
+ ccr.setType(org.eclipse.gef.RequestConstants.REQ_CONNECTION_START);
+ ccr.setSourceEditPart(sourceEditPart);
+ sourceEditPart.getCommand(ccr);
+ ccr.setTargetEditPart(targetEditPart);
+ ccr.setType(org.eclipse.gef.RequestConstants.REQ_CONNECTION_END);
+ Command cmd = targetEditPart.getCommand(ccr);
+ if (cmd != null && cmd.canExecute()) {
+ executeCommand(cmd);
+ IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
+ if (viewAdapter != null) {
+ adapters.add(viewAdapter);
+ }
+ }
+ }
+ return adapters;
+ }
+
+ /**
+ * @generated
+ */
+ private EditPart getEditPart(EObject domainModelElement, Domain2Notation domain2NotationMap) {
+ View view = domain2NotationMap.get(domainModelElement);
+ if (view != null) {
+ return (EditPart) getHost().getViewer().getEditPartRegistry().get(view);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private Diagram getDiagram() {
+ return ((View) getHost().getModel()).getDiagram();
+ }
+
+ /**
+ * @generated
+ */
+ private EditPart getSourceEditPart(UpdaterLinkDescriptor descriptor, Domain2Notation domain2NotationMap) {
+ return getEditPart(descriptor.getSource(), domain2NotationMap);
+ }
+
+ /**
+ * @generated
+ */
+ private EditPart getTargetEditPart(UpdaterLinkDescriptor descriptor, Domain2Notation domain2NotationMap) {
+ return getEditPart(descriptor.getDestination(), domain2NotationMap);
+ }
+
+ /**
+ * @generated
+ */
+ protected final EditPart getHintedEditPart(EObject domainModelElement, Domain2Notation domain2NotationMap, int hintVisualId) {
+ View view = domain2NotationMap.getHinted(domainModelElement, UMLVisualIDRegistry.getType(hintVisualId));
+ if (view != null) {
+ return (EditPart) getHost().getViewer().getEditPartRegistry().get(view);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @SuppressWarnings("serial")
+ protected static class Domain2Notation extends HashMap<EObject, View> {
+
+ /**
+ * @generated
+ */
+ public boolean containsDomainElement(EObject domainElement) {
+ return this.containsKey(domainElement);
+ }
+
+ /**
+ * @generated
+ */
+ public View getHinted(EObject domainEObject, String hint) {
+ return this.get(domainEObject);
+ }
+
+ /**
+ * @generated
+ */
+ public void putView(EObject domainElement, View view) {
+ if (!containsKey(view.getElement())) {
+ this.put(domainElement, view);
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicy.java
index 3803a49e451..69ae980cc96 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicy.java
@@ -1,535 +1,535 @@
-/**
- * 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.deployment.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.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-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.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ModelItemSemanticEditPolicy() {
- super(UMLElementTypes.Model_2010);
- }
-
- /**
- * @generated
- */
- @Override
- 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 ModelPackageableElementCompartmentEditPart.VISUAL_ID:
- for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
- Node cnode = (Node) cit.next();
- switch (UMLVisualIDRegistry.getVisualID(cnode)) {
- case ModelEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case NestedDeviceEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case NestedNodeEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case NestedArtifactNodeEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case CommentEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- 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)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- }
- }
- break;
- }
- }
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.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.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.commands.DestroyReferenceCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ModelItemSemanticEditPolicy() {
+ super(UMLElementTypes.Model_2010);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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 ModelPackageableElementCompartmentEditPart.VISUAL_ID:
+ for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node) cit.next();
+ switch (UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ModelEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case PackageEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case NestedDeviceEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case NestedNodeEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case CommentEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
+
+ 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)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicyCN.java
index 81e5ba149bd..e63a35ffea4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicyCN.java
@@ -1,535 +1,535 @@
-/**
- * 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.deployment.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.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-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.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public ModelItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Model_49);
- }
-
- /**
- * @generated
- */
- @Override
- 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 ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
- for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
- Node cnode = (Node) cit.next();
- switch (UMLVisualIDRegistry.getVisualID(cnode)) {
- case ModelEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case NestedDeviceEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case NestedNodeEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case NestedArtifactNodeEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case CommentEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- 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)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- }
- }
- break;
- }
- }
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.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.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.commands.DestroyReferenceCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ModelItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Model_49);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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 ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
+ for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node) cit.next();
+ switch (UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ModelEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case PackageEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case NestedDeviceEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case NestedNodeEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case CommentEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
+
+ 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)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java
index 158d30fa7ab..59d9660b474 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java
@@ -1,208 +1,208 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ModelPackageableElementCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- private Set<EStructuralFeature> myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected Set<EStructuralFeature> getFeaturesToSynchronize() {
- if (myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getPackage_PackagedElement());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getElement_OwnedComment());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNamespace_OwnedRule());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getModelModelCompartment_51SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- switch (visualID) {
- case ModelEditPartCN.VISUAL_ID:
- case PackageEditPartCN.VISUAL_ID:
- case NestedDeviceEditPartCN.VISUAL_ID:
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
- case NestedNodeEditPartCN.VISUAL_ID:
- case NestedArtifactNodeEditPartCN.VISUAL_ID:
- case CommentEditPartCN.VISUAL_ID:
- case ConstraintEditPartCN.VISUAL_ID:
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getModelModelCompartment_51SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ModelPackageableElementCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ private Set<EStructuralFeature> myFeaturesToSynchronize;
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Set<EStructuralFeature> getFeaturesToSynchronize() {
+ if (myFeaturesToSynchronize == null) {
+ myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getPackage_PackagedElement());
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getElement_OwnedComment());
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNamespace_OwnedRule());
+ }
+ return myFeaturesToSynchronize;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getModelModelCompartment_51SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ int visualID = UMLVisualIDRegistry.getVisualID(view);
+ switch (visualID) {
+ case ModelEditPartCN.VISUAL_ID:
+ case PackageEditPartCN.VISUAL_ID:
+ case NestedDeviceEditPartCN.VISUAL_ID:
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
+ case NestedNodeEditPartCN.VISUAL_ID:
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+ case CommentEditPartCN.VISUAL_ID:
+ case ConstraintEditPartCN.VISUAL_ID:
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getModelModelCompartment_51SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ makeViewsImmutable(createdViews);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java
index 35fa4b30b84..5d7203b6d64 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java
@@ -1,208 +1,208 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class ModelPackageableElementCompartmentCanonicalEditPolicyCN extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- private Set<EStructuralFeature> myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected Set<EStructuralFeature> getFeaturesToSynchronize() {
- if (myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getPackage_PackagedElement());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getElement_OwnedComment());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNamespace_OwnedRule());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getModelModelCompartment_52SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- switch (visualID) {
- case ModelEditPartCN.VISUAL_ID:
- case PackageEditPartCN.VISUAL_ID:
- case NestedDeviceEditPartCN.VISUAL_ID:
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
- case NestedNodeEditPartCN.VISUAL_ID:
- case NestedArtifactNodeEditPartCN.VISUAL_ID:
- case CommentEditPartCN.VISUAL_ID:
- case ConstraintEditPartCN.VISUAL_ID:
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getModelModelCompartment_52SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ModelPackageableElementCompartmentCanonicalEditPolicyCN extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ private Set<EStructuralFeature> myFeaturesToSynchronize;
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Set<EStructuralFeature> getFeaturesToSynchronize() {
+ if (myFeaturesToSynchronize == null) {
+ myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getPackage_PackagedElement());
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getElement_OwnedComment());
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNamespace_OwnedRule());
+ }
+ return myFeaturesToSynchronize;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getModelModelCompartment_52SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ int visualID = UMLVisualIDRegistry.getVisualID(view);
+ switch (visualID) {
+ case ModelEditPartCN.VISUAL_ID:
+ case PackageEditPartCN.VISUAL_ID:
+ case NestedDeviceEditPartCN.VISUAL_ID:
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
+ case NestedNodeEditPartCN.VISUAL_ID:
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+ case CommentEditPartCN.VISUAL_ID:
+ case ConstraintEditPartCN.VISUAL_ID:
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getModelModelCompartment_52SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ makeViewsImmutable(createdViews);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedArtifactNodeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedArtifactNodeItemSemanticEditPolicyCN.java
index 7e83a03ae51..ef4ed78ec07 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedArtifactNodeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedArtifactNodeItemSemanticEditPolicyCN.java
@@ -1,339 +1,278 @@
-/**
- * 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.deployment.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.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-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.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class NestedArtifactNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public NestedArtifactNodeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Artifact_40);
- }
-
- /**
- * @generated
- */
- @Override
- 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 ArtifactCompositeCompartmentEditPartCN.VISUAL_ID:
- for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
- Node cnode = (Node) cit.next();
- switch (UMLVisualIDRegistry.getVisualID(cnode)) {
- case ArtifactEditPartACN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- }
- }
- break;
- }
- }
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class NestedArtifactNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public NestedArtifactNodeItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Artifact_40);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ View view = (View) getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
+ if (annotation == null) {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ List<EObject> todestroy = new ArrayList<EObject>();
+ todestroy.add(req.getElementToDestroy());
+ // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ } else {
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedDeviceItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedDeviceItemSemanticEditPolicyCN.java
index 4f35c2c3e30..79dc065a4d2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedDeviceItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedDeviceItemSemanticEditPolicyCN.java
@@ -1,403 +1,403 @@
-/**
- * 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.deployment.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.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-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.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class NestedDeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public NestedDeviceItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Device_44);
- }
-
- /**
- * @generated
- */
- @Override
- 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 DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
- for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
- Node cnode = (Node) cit.next();
- switch (UMLVisualIDRegistry.getVisualID(cnode)) {
- case ExecutionEnvironmentEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case DeviceEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case NodeEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- }
- }
- break;
- }
- }
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.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.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.commands.DestroyReferenceCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class NestedDeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public NestedDeviceItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Device_44);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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 DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
+ for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node) cit.next();
+ switch (UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case DeviceEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case NodeEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedExecutionEnvironmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedExecutionEnvironmentItemSemanticEditPolicyCN.java
index 44732f59b02..0c396d45e93 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedExecutionEnvironmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedExecutionEnvironmentItemSemanticEditPolicyCN.java
@@ -1,371 +1,371 @@
-/**
- * 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.deployment.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.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-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.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class NestedExecutionEnvironmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public NestedExecutionEnvironmentItemSemanticEditPolicyCN() {
- super(UMLElementTypes.ExecutionEnvironment_46);
- }
-
- /**
- * @generated
- */
- @Override
- 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 ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
- for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
- Node cnode = (Node) cit.next();
- switch (UMLVisualIDRegistry.getVisualID(cnode)) {
- case ArtifactEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case ExecutionEnvironmentEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- }
- }
- break;
- }
- }
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.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.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.commands.DestroyReferenceCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class NestedExecutionEnvironmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public NestedExecutionEnvironmentItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.ExecutionEnvironment_46);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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 ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
+ for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node) cit.next();
+ switch (UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ArtifactEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedNodeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedNodeItemSemanticEditPolicyCN.java
index 21895944c88..2fd05b8e24b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedNodeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedNodeItemSemanticEditPolicyCN.java
@@ -1,435 +1,435 @@
-/**
- * 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.deployment.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.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-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.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class NestedNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public NestedNodeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Node_42);
- }
-
- /**
- * @generated
- */
- @Override
- 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 NodeCompositeCompartmentEditPartCN.VISUAL_ID:
- for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
- Node cnode = (Node) cit.next();
- switch (UMLVisualIDRegistry.getVisualID(cnode)) {
- case DeviceEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case ExecutionEnvironmentEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case NodeEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- case ArtifactEditPartCN.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.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));
- break;
- }
- }
- break;
- }
- }
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.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.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.commands.DestroyReferenceCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class NestedNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public NestedNodeItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Node_42);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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 NodeCompositeCompartmentEditPartCN.VISUAL_ID:
+ for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node) cit.next();
+ switch (UMLVisualIDRegistry.getVisualID(cnode)) {
+ case DeviceEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case NodeEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ case ArtifactEditPartCN.VISUAL_ID:
+
+
+
+
+
+ for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge) it.next();
+ switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.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));
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicy.java
index 3086f98f3ae..31563a97a95 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicy.java
@@ -1,199 +1,199 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class NodeCompositeCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- private Set<EStructuralFeature> myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected Set<EStructuralFeature> getFeaturesToSynchronize() {
- if (myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNode_NestedNode());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getClass_NestedClassifier());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getNodeCompositeCompartment_19SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- switch (visualID) {
- case DeviceEditPartCN.VISUAL_ID:
- case ExecutionEnvironmentEditPartCN.VISUAL_ID:
- case ArtifactEditPartCN.VISUAL_ID:
- case NodeEditPartCN.VISUAL_ID:
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getNodeCompositeCompartment_19SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class NodeCompositeCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ private Set<EStructuralFeature> myFeaturesToSynchronize;
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Set<EStructuralFeature> getFeaturesToSynchronize() {
+ if (myFeaturesToSynchronize == null) {
+ myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNode_NestedNode());
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getClass_NestedClassifier());
+ }
+ return myFeaturesToSynchronize;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getNodeCompositeCompartment_19SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ int visualID = UMLVisualIDRegistry.getVisualID(view);
+ switch (visualID) {
+ case DeviceEditPartCN.VISUAL_ID:
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID:
+ case ArtifactEditPartCN.VISUAL_ID:
+ case NodeEditPartCN.VISUAL_ID:
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getNodeCompositeCompartment_19SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ makeViewsImmutable(createdViews);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicyCN.java
index e891cd5d564..7aadd0be3d4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicyCN.java
@@ -1,199 +1,199 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class NodeCompositeCompartmentCanonicalEditPolicyCN extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- private Set<EStructuralFeature> myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected Set<EStructuralFeature> getFeaturesToSynchronize() {
- if (myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNode_NestedNode());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getClass_NestedClassifier());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getNodeCompositeCompartment_32SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- switch (visualID) {
- case DeviceEditPartCN.VISUAL_ID:
- case ExecutionEnvironmentEditPartCN.VISUAL_ID:
- case NodeEditPartCN.VISUAL_ID:
- case ArtifactEditPartCN.VISUAL_ID:
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getNodeCompositeCompartment_32SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class NodeCompositeCompartmentCanonicalEditPolicyCN extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ private Set<EStructuralFeature> myFeaturesToSynchronize;
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Set<EStructuralFeature> getFeaturesToSynchronize() {
+ if (myFeaturesToSynchronize == null) {
+ myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNode_NestedNode());
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getClass_NestedClassifier());
+ }
+ return myFeaturesToSynchronize;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getNodeCompositeCompartment_32SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ int visualID = UMLVisualIDRegistry.getVisualID(view);
+ switch (visualID) {
+ case DeviceEditPartCN.VISUAL_ID:
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID:
+ case NodeEditPartCN.VISUAL_ID:
+ case ArtifactEditPartCN.VISUAL_ID:
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getNodeCompositeCompartment_32SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ makeViewsImmutable(createdViews);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicy.java
index 66c3dfaf939..f4c5268b141 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicy.java
@@ -1,266 +1,266 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class NodeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public NodeItemSemanticEditPolicy() {
- super(UMLElementTypes.Node_2008);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class NodeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public NodeItemSemanticEditPolicy() {
+ super(UMLElementTypes.Node_2008);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicyCN.java
index 5b20f748960..710822d18fc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicyCN.java
@@ -1,278 +1,278 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-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.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class NodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public NodeItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Node_23);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View) getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
- EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
- if (annotation == null) {
- // there are indirectly referenced children, need extra commands: false
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Generalization_4003 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new GeneralizationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case GeneralizationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+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.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class NodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public NodeItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Node_23);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ View view = (View) getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
+ if (annotation == null) {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ List<EObject> todestroy = new ArrayList<EObject>();
+ todestroy.add(req.getElementToDestroy());
+ // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ } else {
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Generalization_4003 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicy.java
index 039804ad761..53b125bf66a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicy.java
@@ -1,249 +1,249 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PackageItemSemanticEditPolicy() {
- super(UMLElementTypes.Package_2009);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public PackageItemSemanticEditPolicy() {
+ super(UMLElementTypes.Package_2009);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicyCN.java
index aa83a6d5d18..41db292f1cb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicyCN.java
@@ -1,249 +1,249 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public PackageItemSemanticEditPolicyCN() {
- super(UMLElementTypes.Package_36);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- EObject selectedEObject = req.getElementToDestroy();
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
- if (provider != null) {
- // Retrieve delete command from the Element Edit service
- ICommand deleteCommand = provider.getEditCommand(req);
-
- if (deleteCommand != null) {
- return new ICommandProxy(deleteCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- @Override
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- 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.CommentAnnotatedElement_4008 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Deployment_4001 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DeploymentCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Manifestation_4002 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new ManifestationCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4004 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyCreateCommand(req,
- req.getSource(), req.getTarget()));
- }
- if (UMLElementTypes.Dependency_4010 == baseElementType) {
- if (isExtendedType) {
- return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
- }
- return getGEFWrapper(new DependencyBranchCreateCommand(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
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- case DeploymentEditPart.VISUAL_ID:
- case ManifestationEditPart.VISUAL_ID:
- case DependencyEditPart.VISUAL_ID:
- case DependencyBranchEditPart.VISUAL_ID:
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve re-orient command from the Element Edit service
- ICommand reorientCommand = provider.getEditCommand(req);
- if (reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
- }
- 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
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeploymentCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ManifestationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public PackageItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Package_36);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ if (provider != null) {
+ // Retrieve delete command from the Element Edit service
+ ICommand deleteCommand = provider.getEditCommand(req);
+
+ if (deleteCommand != null) {
+ return new ICommandProxy(deleteCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ return null;
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ 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.CommentAnnotatedElement_4008 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.ConstraintConstrainedElement_4009 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Deployment_4001 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DeploymentCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Manifestation_4002 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new ManifestationCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4004 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req,
+ req.getSource(), req.getTarget()));
+ }
+ if (UMLElementTypes.Dependency_4010 == baseElementType) {
+ if (isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType) requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(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
+ */
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case DeploymentEditPart.VISUAL_ID:
+ case ManifestationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve re-orient command from the Element Edit service
+ ICommand reorientCommand = provider.getEditCommand(req);
+ if (reorientCommand == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return getGEFWrapper(reorientCommand.reduce());
+ }
+ 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
+ */
+ @Override
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch (getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java
index c31a1bc510a..154564ba937 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java
@@ -1,208 +1,208 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class PackagePackageableElementCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- private Set<EStructuralFeature> myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected Set<EStructuralFeature> getFeaturesToSynchronize() {
- if (myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getPackage_PackagedElement());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getElement_OwnedComment());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNamespace_OwnedRule());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getPackagePackageableElementCompartment_38SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- switch (visualID) {
- case ModelEditPartCN.VISUAL_ID:
- case PackageEditPartCN.VISUAL_ID:
- case NestedArtifactNodeEditPartCN.VISUAL_ID:
- case NestedDeviceEditPartCN.VISUAL_ID:
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
- case NestedNodeEditPartCN.VISUAL_ID:
- case CommentEditPartCN.VISUAL_ID:
- case ConstraintEditPartCN.VISUAL_ID:
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getPackagePackageableElementCompartment_38SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class PackagePackageableElementCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ private Set<EStructuralFeature> myFeaturesToSynchronize;
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Set<EStructuralFeature> getFeaturesToSynchronize() {
+ if (myFeaturesToSynchronize == null) {
+ myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getPackage_PackagedElement());
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getElement_OwnedComment());
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNamespace_OwnedRule());
+ }
+ return myFeaturesToSynchronize;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getPackagePackageableElementCompartment_38SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ int visualID = UMLVisualIDRegistry.getVisualID(view);
+ switch (visualID) {
+ case ModelEditPartCN.VISUAL_ID:
+ case PackageEditPartCN.VISUAL_ID:
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+ case NestedDeviceEditPartCN.VISUAL_ID:
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
+ case NestedNodeEditPartCN.VISUAL_ID:
+ case CommentEditPartCN.VISUAL_ID:
+ case ConstraintEditPartCN.VISUAL_ID:
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getPackagePackageableElementCompartment_38SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ makeViewsImmutable(createdViews);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java
index efb0cbe1f64..cd0ea599b77 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java
@@ -1,206 +1,206 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class PackagePackageableElementCompartmentCanonicalEditPolicyCN extends CanonicalEditPolicy {
-
- /**
- * @generated
- */
- private Set<EStructuralFeature> myFeaturesToSynchronize;
-
- /**
- * @generated
- */
- @Override
- protected void refreshOnActivate() {
- // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
- List<?> c = getHost().getChildren();
- for (int i = 0; i < c.size(); i++) {
- ((EditPart) c.get(i)).activate();
- }
- super.refreshOnActivate();
- }
-
- /**
- * @generated
- */
- @Override
- protected Set<EStructuralFeature> getFeaturesToSynchronize() {
- if (myFeaturesToSynchronize == null) {
- myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getPackage_PackagedElement());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getElement_OwnedComment());
- myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNamespace_OwnedRule());
- }
- return myFeaturesToSynchronize;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<EObject> getSemanticChildrenList() {
- View viewObject = (View) getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
- .getPackagePackageableElementCompartment_39SemanticChildren(viewObject);
- for (UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- int visualID = UMLVisualIDRegistry.getVisualID(view);
- switch (visualID) {
- case PackageEditPartCN.VISUAL_ID:
- case NestedArtifactNodeEditPartCN.VISUAL_ID:
- case NestedDeviceEditPartCN.VISUAL_ID:
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
- case NestedNodeEditPartCN.VISUAL_ID:
- case CommentEditPartCN.VISUAL_ID:
- case ConstraintEditPartCN.VISUAL_ID:
- return true;
- }
- return false;
- }
-
- /**
- * @generated
- */
- @Override
- protected void refreshSemantic() {
- if (resolveSemanticElement() == null) {
- return;
- }
- LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
- List<UMLNodeDescriptor> childDescriptors =
- UMLDiagramUpdater.INSTANCE
- .getPackagePackageableElementCompartment_39SemanticChildren((View) getHost().getModel());
- LinkedList<View> orphaned = new LinkedList<View>();
- // we care to check only views we recognize as ours
- LinkedList<View> knownViewChildren = new LinkedList<View>();
- for (View v : getViewChildren()) {
- if (isMyDiagramElement(v)) {
- knownViewChildren.add(v);
- }
- }
- // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
- //
- // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
- // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
- // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
- for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
- UMLNodeDescriptor next = descriptorsIterator.next();
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
- for (View childView : getViewChildren()) {
- EObject semanticElement = childView.getElement();
- if (next.getModelElement().equals(semanticElement)) {
- if (hint.equals(childView.getType())) {
- perfectMatch.add(childView);
- // actually, can stop iteration over view children here, but
- // may want to use not the first view but last one as a 'real' match (the way original CEP does
- // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
- }
- }
- }
- if (perfectMatch.size() > 0) {
- descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
- // use only one view (first or last?), keep rest as orphaned for further consideration
- knownViewChildren.remove(perfectMatch.getFirst());
- }
- }
- // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
- // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
- orphaned.addAll(knownViewChildren);
- //
- ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
- for (UMLNodeDescriptor next : childDescriptors) {
- String hint = UMLVisualIDRegistry.getType(next.getVisualID());
- IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
- CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
- viewDescriptors.add(descriptor);
- }
-
- boolean changed = deleteViews(orphaned.iterator());
- //
- CreateViewRequest request = getCreateViewRequest(viewDescriptors);
- Command cmd = getCreateViewCommand(request);
- if (cmd != null && cmd.canExecute()) {
- SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
- executeCommand(cmd);
- @SuppressWarnings("unchecked")
- List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
- createdViews.addAll(nl);
- }
- if (changed || createdViews.size() > 0) {
- postProcessRefreshSemantic(createdViews);
- }
- if (createdViews.size() > 1) {
- // perform a layout of the container
- DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
- executeCommand(new ICommandProxy(layoutCmd));
- }
-
- makeViewsImmutable(createdViews);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.DeferredLayoutCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetViewMutabilityCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLNodeDescriptor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class PackagePackageableElementCompartmentCanonicalEditPolicyCN extends CanonicalEditPolicy {
+
+ /**
+ * @generated
+ */
+ private Set<EStructuralFeature> myFeaturesToSynchronize;
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshOnActivate() {
+ // Need to activate editpart children before invoking the canonical refresh for EditParts to add event listeners
+ List<?> c = getHost().getChildren();
+ for (int i = 0; i < c.size(); i++) {
+ ((EditPart) c.get(i)).activate();
+ }
+ super.refreshOnActivate();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Set<EStructuralFeature> getFeaturesToSynchronize() {
+ if (myFeaturesToSynchronize == null) {
+ myFeaturesToSynchronize = new HashSet<EStructuralFeature>();
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getPackage_PackagedElement());
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getElement_OwnedComment());
+ myFeaturesToSynchronize.add(UMLPackage.eINSTANCE.getNamespace_OwnedRule());
+ }
+ return myFeaturesToSynchronize;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<EObject> getSemanticChildrenList() {
+ View viewObject = (View) getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.INSTANCE
+ .getPackagePackageableElementCompartment_39SemanticChildren(viewObject);
+ for (UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ int visualID = UMLVisualIDRegistry.getVisualID(view);
+ switch (visualID) {
+ case PackageEditPartCN.VISUAL_ID:
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+ case NestedDeviceEditPartCN.VISUAL_ID:
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
+ case NestedNodeEditPartCN.VISUAL_ID:
+ case CommentEditPartCN.VISUAL_ID:
+ case ConstraintEditPartCN.VISUAL_ID:
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshSemantic() {
+ if (resolveSemanticElement() == null) {
+ return;
+ }
+ LinkedList<IAdaptable> createdViews = new LinkedList<IAdaptable>();
+ List<UMLNodeDescriptor> childDescriptors =
+ UMLDiagramUpdater.INSTANCE
+ .getPackagePackageableElementCompartment_39SemanticChildren((View) getHost().getModel());
+ LinkedList<View> orphaned = new LinkedList<View>();
+ // we care to check only views we recognize as ours
+ LinkedList<View> knownViewChildren = new LinkedList<View>();
+ for (View v : getViewChildren()) {
+ if (isMyDiagramElement(v)) {
+ knownViewChildren.add(v);
+ }
+ }
+ // alternative to #cleanCanonicalSemanticChildren(getViewChildren(), semanticChildren)
+ //
+ // iteration happens over list of desired semantic elements, trying to find best matching View, while original CEP
+ // iterates views, potentially losing view (size/bounds) information - i.e. if there are few views to reference same EObject, only last one
+ // to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
+ for (Iterator<UMLNodeDescriptor> descriptorsIterator = childDescriptors.iterator(); descriptorsIterator.hasNext();) {
+ UMLNodeDescriptor next = descriptorsIterator.next();
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ LinkedList<View> perfectMatch = new LinkedList<View>(); // both semanticElement and hint match that of NodeDescriptor
+ for (View childView : getViewChildren()) {
+ EObject semanticElement = childView.getElement();
+ if (next.getModelElement().equals(semanticElement)) {
+ if (hint.equals(childView.getType())) {
+ perfectMatch.add(childView);
+ // actually, can stop iteration over view children here, but
+ // may want to use not the first view but last one as a 'real' match (the way original CEP does
+ // with its trick with viewToSemanticMap inside #cleanCanonicalSemanticChildren
+ }
+ }
+ }
+ if (perfectMatch.size() > 0) {
+ descriptorsIterator.remove(); // precise match found no need to create anything for the NodeDescriptor
+ // use only one view (first or last?), keep rest as orphaned for further consideration
+ knownViewChildren.remove(perfectMatch.getFirst());
+ }
+ }
+ // those left in knownViewChildren are subject to removal - they are our diagram elements we didn't find match to,
+ // or those we have potential matches to, and thus need to be recreated, preserving size/location information.
+ orphaned.addAll(knownViewChildren);
+ //
+ ArrayList<CreateViewRequest.ViewDescriptor> viewDescriptors = new ArrayList<CreateViewRequest.ViewDescriptor>(childDescriptors.size());
+ for (UMLNodeDescriptor next : childDescriptors) {
+ String hint = UMLVisualIDRegistry.getType(next.getVisualID());
+ IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
+ CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
+ viewDescriptors.add(descriptor);
+ }
+
+ boolean changed = deleteViews(orphaned.iterator());
+ //
+ CreateViewRequest request = getCreateViewRequest(viewDescriptors);
+ Command cmd = getCreateViewCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ SetViewMutabilityCommand.makeMutable(new EObjectAdapter(host().getNotationView())).execute();
+ executeCommand(cmd);
+ @SuppressWarnings("unchecked")
+ List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
+ createdViews.addAll(nl);
+ }
+ if (changed || createdViews.size() > 0) {
+ postProcessRefreshSemantic(createdViews);
+ }
+ if (createdViews.size() > 1) {
+ // perform a layout of the container
+ DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
+ executeCommand(new ICommandProxy(layoutCmd));
+ }
+
+ makeViewsImmutable(createdViews);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLBaseItemSemanticEditPolicy.java
index 5f64dc69107..611dab396dd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -1,545 +1,545 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.Iterator;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
-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.MoveElementsCommand;
-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.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
-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.emf.type.core.requests.SetRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.edit.helpers.GeneratedEditHelperBase;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.Artifact;
-import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Dependency;
-import org.eclipse.uml2.uml.Deployment;
-import org.eclipse.uml2.uml.DeploymentTarget;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Generalization;
-import org.eclipse.uml2.uml.Manifestation;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-
-/**
- * @generated
- */
-public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
-
- /**
- * Extended request data key to hold editpart visual id.
- *
- * @generated
- */
- public static final String VISUAL_ID_KEY = "visual_id"; //$NON-NLS-1$
-
- /**
- * Extended request data key to hold the edge view during a reconnect request.
- *
- * @generated
- */
- public static final String GRAPHICAL_RECONNECTED_EDGE = "graphical_edge"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private final IElementType myElementType;
-
- /**
- * @generated
- */
- protected UMLBaseItemSemanticEditPolicy(IElementType elementType) {
- myElementType = elementType;
- }
-
- /**
- * Extended request data key to hold editpart visual id.
- * Add visual id of edited editpart to extended data of the request
- * so command switch can decide what kind of diagram element is being edited.
- * It is done in those cases when it's not possible to deduce diagram
- * element kind from domain element.
- * Add the reoriented view to the request extended data so that the view
- * currently edited can be distinguished from other views of the same element
- * and these latter possibly removed if they become inconsistent after reconnect
- *
- * @generated
- */
- @Override
- @SuppressWarnings("unchecked")
- public Command getCommand(Request request) {
- if (request instanceof ReconnectRequest) {
- Object view = ((ReconnectRequest) request).getConnectionEditPart().getModel();
- if (view instanceof View) {
- Integer id = new Integer(UMLVisualIDRegistry.getVisualID((View) view));
- request.getExtendedData().put(VISUAL_ID_KEY, id);
- request.getExtendedData().put(GRAPHICAL_RECONNECTED_EDGE, view);
- }
- }
- return super.getCommand(request);
- }
-
- /**
- * Returns visual id from request parameters.
- *
- * @generated
- */
- protected int getVisualID(IEditCommandRequest request) {
- Object id = request.getParameter(VISUAL_ID_KEY);
- return id instanceof Integer ? ((Integer) id).intValue() : -1;
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getSemanticCommand(IEditCommandRequest request) {
- IEditCommandRequest completedRequest = completeRequest(request);
- Command semanticCommand = getSemanticCommandSwitch(completedRequest);
- semanticCommand = getEditHelperCommand(completedRequest, semanticCommand);
- if (completedRequest instanceof DestroyRequest) {
- DestroyRequest destroyRequest = (DestroyRequest) completedRequest;
- return shouldProceed(destroyRequest) ? addDeleteViewCommand(semanticCommand, destroyRequest) : null;
- }
- return semanticCommand;
- }
-
- /**
- * @generated
- */
- protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
- return mainCommand == null ? deleteViewCommand : mainCommand.chain(deleteViewCommand);
- }
-
- /**
- * @generated
- */
- private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand) {
- if (editPolicyCommand != null) {
- ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy) editPolicyCommand).getICommand() : new CommandProxy(editPolicyCommand);
- request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND, command);
- }
- IElementType requestContextElementType = getContextElementType(request);
- request.setParameter(GeneratedEditHelperBase.CONTEXT_ELEMENT_TYPE, requestContextElementType);
- ICommand command = requestContextElementType.getEditCommand(request);
- request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND, null);
- request.setParameter(GeneratedEditHelperBase.CONTEXT_ELEMENT_TYPE, null);
- if (command != null) {
- if (!(command instanceof CompositeTransactionalCommand)) {
- command = new CompositeTransactionalCommand(getEditingDomain(), command.getLabel()).compose(command);
- }
- return new ICommandProxy(command);
- }
- return editPolicyCommand;
- }
-
- /**
- * @generated
- */
- protected IElementType getContextElementType(IEditCommandRequest request) {
- IElementType requestContextElementType = UMLElementTypes.getElementType(getVisualID(request));
- return requestContextElementType != null ? requestContextElementType : myElementType;
- }
-
- /**
- * @generated
- */
- protected Command getSemanticCommandSwitch(IEditCommandRequest req) {
- if (req instanceof CreateRelationshipRequest) {
- return getCreateRelationshipCommand((CreateRelationshipRequest) req);
- } else if (req instanceof CreateElementRequest) {
- return getCreateCommand((CreateElementRequest) req);
- } else if (req instanceof ConfigureRequest) {
- return getConfigureCommand((ConfigureRequest) req);
- } else if (req instanceof DestroyElementRequest) {
- return getDestroyElementCommand((DestroyElementRequest) req);
- } else if (req instanceof DestroyReferenceRequest) {
- return getDestroyReferenceCommand((DestroyReferenceRequest) req);
- } else if (req instanceof DuplicateElementsRequest) {
- return getDuplicateCommand((DuplicateElementsRequest) req);
- } else if (req instanceof GetEditContextRequest) {
- return getEditContextCommand((GetEditContextRequest) req);
- } else if (req instanceof MoveRequest) {
- return getMoveCommand((MoveRequest) req);
- } else if (req instanceof ReorientReferenceRelationshipRequest) {
- return getReorientReferenceRelationshipCommand((ReorientReferenceRelationshipRequest) req);
- } else if (req instanceof ReorientRelationshipRequest) {
- return getReorientRelationshipCommand((ReorientRelationshipRequest) req);
- } else if (req instanceof SetRequest) {
- return getSetCommand((SetRequest) req);
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getConfigureCommand(ConfigureRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCreateCommand(CreateElementRequest req) {
- 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;
- }
-
- // RS: add code for extended types
- /**
- * @generated
- */
- protected Command getExtendedTypeCreationCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(request.getContainer());
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve create command from the Element Edit service
- ICommand createGMFCommand = provider.getEditCommand(request);
- return getGEFWrapper(createGMFCommand);
- }
-
- /**
- * @generated
- */
- protected Command getExtendedStartCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve create command from the Element Edit service
- ICommand createGMFCommand = provider.getEditCommand(request);
- return getGEFWrapper(createGMFCommand);
- }
-
- /**
- * @generated
- */
- protected Command getExtendedCompleteCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
- if (provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
- // Retrieve create command from the Element Edit service
- ICommand createGMFCommand = provider.getEditCommand(request);
- return getGEFWrapper(createGMFCommand);
- }
-
- // RS: End of add code for extended types
- /**
- * @generated
- */
- protected Command getSetCommand(SetRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getEditContextCommand(GetEditContextRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getDuplicateCommand(DuplicateElementsRequest req) {
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getMoveCommand(MoveRequest req) {
- EObject targetCEObject = req.getTargetContainer();
- if (targetCEObject != null) {
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
- if (provider != null) {
- ICommand moveCommand = provider.getEditCommand(req);
- if (moveCommand != null) {
- return new ICommandProxy(moveCommand);
- }
- }
- return UnexecutableCommand.INSTANCE;
- } else {
- return getGEFWrapper(new MoveElementsCommand(req));
- }
-
- }
-
- /**
- * @generated
- */
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- return UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @generated
- */
- protected final Command getGEFWrapper(ICommand cmd) {
- return new ICommandProxy(cmd);
- }
-
- /**
- * Returns editing domain from the host edit part.
- *
- * @generated
- */
- protected TransactionalEditingDomain getEditingDomain() {
- return ((IGraphicalEditPart) getHost()).getEditingDomain();
- }
-
- /**
- * Clean all shortcuts to the host element from the same diagram
- *
- * @generated
- */
- protected void addDestroyShortcutsCommand(ICompositeCommand cmd, View view) {
- assert view.getEAnnotation("Shortcut") == null; //$NON-NLS-1$
- for (Iterator<?> it = view.getDiagram().getChildren().iterator(); it.hasNext();) {
- View nextView = (View) it.next();
- if (nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) { //$NON-NLS-1$
- continue;
- }
- cmd.add(new DeleteCommand(getEditingDomain(), nextView));
- }
- }
-
- /**
- * @generated
- */
- public static LinkConstraints getLinkConstraints() {
- LinkConstraints cached = UMLDiagramEditorPlugin.getInstance().getLinkConstraints();
- if (cached == null) {
- UMLDiagramEditorPlugin.getInstance().setLinkConstraints(cached = new LinkConstraints());
- }
- return cached;
- }
-
- /**
- * @generated
- */
- public static class LinkConstraints {
-
- /**
- * @generated
- */
- public LinkConstraints() { // use static method #getLinkConstraints() to access instance
- }
-
- /**
- * @generated
- */
- public boolean canCreateLink_4005() {
- return canExistLink_4005();
- }
-
- /**
- * @generated
- */
- public boolean canCreateCommentAnnotatedElement_4008(Comment source, Element target) {
- if (source != null) {
- if (source.getAnnotatedElements()
- .contains(target)) {
- return false;
- }
- }
-
- return canExistCommentAnnotatedElement_4008(
- source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateConstraintConstrainedElement_4009(Constraint source, Element target) {
- if (source != null) {
- if (source.getConstrainedElements()
- .contains(target)) {
- return false;
- }
- }
-
- return canExistConstraintConstrainedElement_4009(
- source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateDeployment_4001(DeploymentTarget container, NamedElement source, NamedElement target) {
- return canExistDeployment_4001(
- container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateManifestation_4002(Artifact container, NamedElement source, NamedElement target) {
- return canExistManifestation_4002(
- container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateGeneralization_4003(Classifier container, Classifier source, Classifier target) {
- return canExistGeneralization_4003(
- container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateDependency_4004(Package container, NamedElement source, NamedElement target) {
- return canExistDependency_4004(
- container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canCreateDependency_4010(Package container, NamedElement source, NamedElement target) {
- return canExistDependency_4010(
- container, null, source, target);
- }
-
- /**
- * @generated
- */
- public boolean canExistLink_4005() {
- return true;
- }
-
- /**
- * @generated
- */
- public boolean canExistCommentAnnotatedElement_4008(Comment source, Element target) {
- return true;
- }
-
- /**
- * @generated
- */
- public boolean canExistConstraintConstrainedElement_4009(Constraint source, Element target) {
- return true;
- }
-
- /**
- * @generated
- */
- public boolean canExistDeployment_4001(DeploymentTarget container, Deployment linkInstance, NamedElement source, NamedElement target) {
- return true;
- }
-
- /**
- * @generated
- */
- public boolean canExistManifestation_4002(Artifact container, Manifestation linkInstance, NamedElement source, NamedElement target) {
- return true;
- }
-
- /**
- * @generated
- */
- public boolean canExistGeneralization_4003(Classifier container, Generalization linkInstance, Classifier source, Classifier target) {
- return true;
- }
-
- /**
- * @generated
- */
- public boolean canExistDependency_4004(Package container, Dependency linkInstance, NamedElement source, NamedElement target) {
- return true;
- }
-
- /**
- * @generated
- */
- public boolean canExistDependency_4010(Package container, Dependency linkInstance, NamedElement source, NamedElement target) {
- return true;
- }
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.Iterator;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
+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.MoveElementsCommand;
+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.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
+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.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.edit.helpers.GeneratedEditHelperBase;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.uml2.uml.Artifact;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Deployment;
+import org.eclipse.uml2.uml.DeploymentTarget;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.Manifestation;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+
+/**
+ * @generated
+ */
+public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
+
+ /**
+ * Extended request data key to hold editpart visual id.
+ *
+ * @generated
+ */
+ public static final String VISUAL_ID_KEY = "visual_id"; //$NON-NLS-1$
+
+ /**
+ * Extended request data key to hold the edge view during a reconnect request.
+ *
+ * @generated
+ */
+ public static final String GRAPHICAL_RECONNECTED_EDGE = "graphical_edge"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final IElementType myElementType;
+
+ /**
+ * @generated
+ */
+ protected UMLBaseItemSemanticEditPolicy(IElementType elementType) {
+ myElementType = elementType;
+ }
+
+ /**
+ * Extended request data key to hold editpart visual id.
+ * Add visual id of edited editpart to extended data of the request
+ * so command switch can decide what kind of diagram element is being edited.
+ * It is done in those cases when it's not possible to deduce diagram
+ * element kind from domain element.
+ * Add the reoriented view to the request extended data so that the view
+ * currently edited can be distinguished from other views of the same element
+ * and these latter possibly removed if they become inconsistent after reconnect
+ *
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Command getCommand(Request request) {
+ if (request instanceof ReconnectRequest) {
+ Object view = ((ReconnectRequest) request).getConnectionEditPart().getModel();
+ if (view instanceof View) {
+ Integer id = new Integer(UMLVisualIDRegistry.getVisualID((View) view));
+ request.getExtendedData().put(VISUAL_ID_KEY, id);
+ request.getExtendedData().put(GRAPHICAL_RECONNECTED_EDGE, view);
+ }
+ }
+ return super.getCommand(request);
+ }
+
+ /**
+ * Returns visual id from request parameters.
+ *
+ * @generated
+ */
+ protected int getVisualID(IEditCommandRequest request) {
+ Object id = request.getParameter(VISUAL_ID_KEY);
+ return id instanceof Integer ? ((Integer) id).intValue() : -1;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected Command getSemanticCommand(IEditCommandRequest request) {
+ IEditCommandRequest completedRequest = completeRequest(request);
+ Command semanticCommand = getSemanticCommandSwitch(completedRequest);
+ semanticCommand = getEditHelperCommand(completedRequest, semanticCommand);
+ if (completedRequest instanceof DestroyRequest) {
+ DestroyRequest destroyRequest = (DestroyRequest) completedRequest;
+ return shouldProceed(destroyRequest) ? addDeleteViewCommand(semanticCommand, destroyRequest) : null;
+ }
+ return semanticCommand;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
+ Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View) getHost().getModel()));
+ return mainCommand == null ? deleteViewCommand : mainCommand.chain(deleteViewCommand);
+ }
+
+ /**
+ * @generated
+ */
+ private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand) {
+ if (editPolicyCommand != null) {
+ ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy) editPolicyCommand).getICommand() : new CommandProxy(editPolicyCommand);
+ request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND, command);
+ }
+ IElementType requestContextElementType = getContextElementType(request);
+ request.setParameter(GeneratedEditHelperBase.CONTEXT_ELEMENT_TYPE, requestContextElementType);
+ ICommand command = requestContextElementType.getEditCommand(request);
+ request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND, null);
+ request.setParameter(GeneratedEditHelperBase.CONTEXT_ELEMENT_TYPE, null);
+ if (command != null) {
+ if (!(command instanceof CompositeTransactionalCommand)) {
+ command = new CompositeTransactionalCommand(getEditingDomain(), command.getLabel()).compose(command);
+ }
+ return new ICommandProxy(command);
+ }
+ return editPolicyCommand;
+ }
+
+ /**
+ * @generated
+ */
+ protected IElementType getContextElementType(IEditCommandRequest request) {
+ IElementType requestContextElementType = UMLElementTypes.getElementType(getVisualID(request));
+ return requestContextElementType != null ? requestContextElementType : myElementType;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getSemanticCommandSwitch(IEditCommandRequest req) {
+ if (req instanceof CreateRelationshipRequest) {
+ return getCreateRelationshipCommand((CreateRelationshipRequest) req);
+ } else if (req instanceof CreateElementRequest) {
+ return getCreateCommand((CreateElementRequest) req);
+ } else if (req instanceof ConfigureRequest) {
+ return getConfigureCommand((ConfigureRequest) req);
+ } else if (req instanceof DestroyElementRequest) {
+ return getDestroyElementCommand((DestroyElementRequest) req);
+ } else if (req instanceof DestroyReferenceRequest) {
+ return getDestroyReferenceCommand((DestroyReferenceRequest) req);
+ } else if (req instanceof DuplicateElementsRequest) {
+ return getDuplicateCommand((DuplicateElementsRequest) req);
+ } else if (req instanceof GetEditContextRequest) {
+ return getEditContextCommand((GetEditContextRequest) req);
+ } else if (req instanceof MoveRequest) {
+ return getMoveCommand((MoveRequest) req);
+ } else if (req instanceof ReorientReferenceRelationshipRequest) {
+ return getReorientReferenceRelationshipCommand((ReorientReferenceRelationshipRequest) req);
+ } else if (req instanceof ReorientRelationshipRequest) {
+ return getReorientRelationshipCommand((ReorientRelationshipRequest) req);
+ } else if (req instanceof SetRequest) {
+ return getSetCommand((SetRequest) req);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getConfigureCommand(ConfigureRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req) {
+ 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;
+ }
+
+ // RS: add code for extended types
+ /**
+ * @generated
+ */
+ protected Command getExtendedTypeCreationCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(request.getContainer());
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(request);
+ return getGEFWrapper(createGMFCommand);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getExtendedStartCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(request);
+ return getGEFWrapper(createGMFCommand);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getExtendedCompleteCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
+ if (provider == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ // Retrieve create command from the Element Edit service
+ ICommand createGMFCommand = provider.getEditCommand(request);
+ return getGEFWrapper(createGMFCommand);
+ }
+
+ // RS: End of add code for extended types
+ /**
+ * @generated
+ */
+ protected Command getSetCommand(SetRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getEditContextCommand(GetEditContextRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDuplicateCommand(DuplicateElementsRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getMoveCommand(MoveRequest req) {
+ EObject targetCEObject = req.getTargetContainer();
+ if (targetCEObject != null) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
+ if (provider != null) {
+ ICommand moveCommand = provider.getEditCommand(req);
+ if (moveCommand != null) {
+ return new ICommandProxy(moveCommand);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ } else {
+ return getGEFWrapper(new MoveElementsCommand(req));
+ }
+
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ protected final Command getGEFWrapper(ICommand cmd) {
+ return new ICommandProxy(cmd);
+ }
+
+ /**
+ * Returns editing domain from the host edit part.
+ *
+ * @generated
+ */
+ protected TransactionalEditingDomain getEditingDomain() {
+ return ((IGraphicalEditPart) getHost()).getEditingDomain();
+ }
+
+ /**
+ * Clean all shortcuts to the host element from the same diagram
+ *
+ * @generated
+ */
+ protected void addDestroyShortcutsCommand(ICompositeCommand cmd, View view) {
+ assert view.getEAnnotation("Shortcut") == null; //$NON-NLS-1$
+ for (Iterator<?> it = view.getDiagram().getChildren().iterator(); it.hasNext();) {
+ View nextView = (View) it.next();
+ if (nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) { //$NON-NLS-1$
+ continue;
+ }
+ cmd.add(new DeleteCommand(getEditingDomain(), nextView));
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public static LinkConstraints getLinkConstraints() {
+ LinkConstraints cached = UMLDiagramEditorPlugin.getInstance().getLinkConstraints();
+ if (cached == null) {
+ UMLDiagramEditorPlugin.getInstance().setLinkConstraints(cached = new LinkConstraints());
+ }
+ return cached;
+ }
+
+ /**
+ * @generated
+ */
+ public static class LinkConstraints {
+
+ /**
+ * @generated
+ */
+ public LinkConstraints() { // use static method #getLinkConstraints() to access instance
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateLink_4005() {
+ return canExistLink_4005();
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateCommentAnnotatedElement_4008(Comment source, Element target) {
+ if (source != null) {
+ if (source.getAnnotatedElements()
+ .contains(target)) {
+ return false;
+ }
+ }
+
+ return canExistCommentAnnotatedElement_4008(
+ source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateConstraintConstrainedElement_4009(Constraint source, Element target) {
+ if (source != null) {
+ if (source.getConstrainedElements()
+ .contains(target)) {
+ return false;
+ }
+ }
+
+ return canExistConstraintConstrainedElement_4009(
+ source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateDeployment_4001(DeploymentTarget container, NamedElement source, NamedElement target) {
+ return canExistDeployment_4001(
+ container, null, source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateManifestation_4002(Artifact container, NamedElement source, NamedElement target) {
+ return canExistManifestation_4002(
+ container, null, source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateGeneralization_4003(Classifier container, Classifier source, Classifier target) {
+ return canExistGeneralization_4003(
+ container, null, source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateDependency_4004(Package container, NamedElement source, NamedElement target) {
+ return canExistDependency_4004(
+ container, null, source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canCreateDependency_4010(Package container, NamedElement source, NamedElement target) {
+ return canExistDependency_4010(
+ container, null, source, target);
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistLink_4005() {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistCommentAnnotatedElement_4008(Comment source, Element target) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistConstraintConstrainedElement_4009(Constraint source, Element target) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistDeployment_4001(DeploymentTarget container, Deployment linkInstance, NamedElement source, NamedElement target) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistManifestation_4002(Artifact container, Manifestation linkInstance, NamedElement source, NamedElement target) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistGeneralization_4003(Classifier container, Generalization linkInstance, Classifier source, Classifier target) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistDependency_4004(Package container, Dependency linkInstance, NamedElement source, NamedElement target) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExistDependency_4010(Package container, Dependency linkInstance, NamedElement source, NamedElement target) {
+ return true;
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLTextNonResizableEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLTextNonResizableEditPolicy.java
index 4fd3a82bdcd..b90a4803e34 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLTextNonResizableEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLTextNonResizableEditPolicy.java
@@ -1,244 +1,244 @@
-/**
- * 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.deployment.edit.policies;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Figure;
-import org.eclipse.draw2d.FigureListener;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableEditPolicyEx;
-import org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.tooling.runtime.edit.policies.labels.IRefreshableFeedbackEditPolicy;
-
-/**
- * @generated
- */
-public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx implements IRefreshableFeedbackEditPolicy {
-
- /**
- * @generated
- */
- private IFigure selectionFeedbackFigure;
-
- /**
- * @generated
- */
- private IFigure focusFeedbackFigure;
-
- /**
- * @generated
- */
- private FigureListener hostPositionListener;
-
- /**
- * @generated
- */
- @Override
- protected void showPrimarySelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(true);
- ((WrappingLabel) getHostFigure()).setFocus(true);
- } else {
- showSelection();
- showFocus();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void showSelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(true);
- ((WrappingLabel) getHostFigure()).setFocus(false);
- } else {
- hideSelection();
- addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
- getHostFigure().addFigureListener(getHostPositionListener());
- refreshSelectionFeedback();
- hideFocus();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void hideSelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(false);
- ((WrappingLabel) getHostFigure()).setFocus(false);
- } else {
- if (selectionFeedbackFigure != null) {
- removeFeedback(selectionFeedbackFigure);
- getHostFigure().removeFigureListener(getHostPositionListener());
- selectionFeedbackFigure = null;
- }
- hideFocus();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void showFocus() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setFocus(true);
- } else {
- hideFocus();
- addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
- refreshFocusFeedback();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void hideFocus() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setFocus(false);
- } else {
- if (focusFeedbackFigure != null) {
- removeFeedback(focusFeedbackFigure);
- focusFeedbackFigure = null;
- }
- }
- }
-
- /**
- * @generated
- */
- protected Rectangle getFeedbackBounds() {
- Rectangle bounds;
- if (getHostFigure() instanceof Label) {
- bounds = ((Label) getHostFigure()).getTextBounds();
- bounds.intersect(getHostFigure().getBounds());
- } else {
- bounds = getHostFigure().getBounds().getCopy();
- }
- getHostFigure().getParent().translateToAbsolute(bounds);
- getFeedbackLayer().translateToRelative(bounds);
- return bounds;
- }
-
- /**
- * @generated
- */
- protected IFigure createSelectionFeedbackFigure() {
- if (getHostFigure() instanceof Label) {
- Label feedbackFigure = new Label();
- feedbackFigure.setOpaque(true);
- feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
- feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
- return feedbackFigure;
- } else {
- RectangleFigure feedbackFigure = new RectangleFigure();
- feedbackFigure.setFill(false);
- return feedbackFigure;
- }
- }
-
- /**
- * @generated
- */
- protected IFigure createFocusFeedbackFigure() {
- return new Figure() {
-
- @Override
- protected void paintFigure(Graphics graphics) {
- graphics.drawFocus(getBounds().getResized(-1, -1));
- }
- };
- }
-
- /**
- * @generated
- */
- protected void updateLabel(Label target) {
- Label source = (Label) getHostFigure();
- target.setText(source.getText());
- target.setTextAlignment(source.getTextAlignment());
- target.setFont(source.getFont());
- }
-
- /**
- * @generated
- */
- protected void refreshSelectionFeedback() {
- if (selectionFeedbackFigure != null) {
- if (selectionFeedbackFigure instanceof Label) {
- updateLabel((Label) selectionFeedbackFigure);
- selectionFeedbackFigure.setBounds(getFeedbackBounds());
- } else {
- selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
- }
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFocusFeedback() {
- if (focusFeedbackFigure != null) {
- focusFeedbackFigure.setBounds(getFeedbackBounds());
- }
- }
-
- /**
- * @generated
- */
- @Override
- public void refreshFeedback() {
- refreshSelectionFeedback();
- refreshFocusFeedback();
- }
-
- /**
- * @generated
- */
- private FigureListener getHostPositionListener() {
- if (hostPositionListener == null) {
- hostPositionListener = new FigureListener() {
- @Override
- public void figureMoved(IFigure source) {
- refreshFeedback();
- }
- };
- }
- return hostPositionListener;
- }
-
- /**
- * @generated
- */
- @Override
- protected List<?> createSelectionHandles() {
- MoveHandle moveHandle =
- new MoveHandle((GraphicalEditPart) getHost());
- moveHandle.setBorder(null);
- moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
- return Collections.singletonList(moveHandle);
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.FigureListener;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableEditPolicyEx;
+import org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.tooling.runtime.edit.policies.labels.IRefreshableFeedbackEditPolicy;
+
+/**
+ * @generated
+ */
+public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx implements IRefreshableFeedbackEditPolicy {
+
+ /**
+ * @generated
+ */
+ private IFigure selectionFeedbackFigure;
+
+ /**
+ * @generated
+ */
+ private IFigure focusFeedbackFigure;
+
+ /**
+ * @generated
+ */
+ private FigureListener hostPositionListener;
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void showPrimarySelection() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setSelected(true);
+ ((WrappingLabel) getHostFigure()).setFocus(true);
+ } else {
+ showSelection();
+ showFocus();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void showSelection() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setSelected(true);
+ ((WrappingLabel) getHostFigure()).setFocus(false);
+ } else {
+ hideSelection();
+ addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
+ getHostFigure().addFigureListener(getHostPositionListener());
+ refreshSelectionFeedback();
+ hideFocus();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void hideSelection() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setSelected(false);
+ ((WrappingLabel) getHostFigure()).setFocus(false);
+ } else {
+ if (selectionFeedbackFigure != null) {
+ removeFeedback(selectionFeedbackFigure);
+ getHostFigure().removeFigureListener(getHostPositionListener());
+ selectionFeedbackFigure = null;
+ }
+ hideFocus();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void showFocus() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setFocus(true);
+ } else {
+ hideFocus();
+ addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
+ refreshFocusFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void hideFocus() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setFocus(false);
+ } else {
+ if (focusFeedbackFigure != null) {
+ removeFeedback(focusFeedbackFigure);
+ focusFeedbackFigure = null;
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Rectangle getFeedbackBounds() {
+ Rectangle bounds;
+ if (getHostFigure() instanceof Label) {
+ bounds = ((Label) getHostFigure()).getTextBounds();
+ bounds.intersect(getHostFigure().getBounds());
+ } else {
+ bounds = getHostFigure().getBounds().getCopy();
+ }
+ getHostFigure().getParent().translateToAbsolute(bounds);
+ getFeedbackLayer().translateToRelative(bounds);
+ return bounds;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createSelectionFeedbackFigure() {
+ if (getHostFigure() instanceof Label) {
+ Label feedbackFigure = new Label();
+ feedbackFigure.setOpaque(true);
+ feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
+ feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
+ return feedbackFigure;
+ } else {
+ RectangleFigure feedbackFigure = new RectangleFigure();
+ feedbackFigure.setFill(false);
+ return feedbackFigure;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFocusFeedbackFigure() {
+ return new Figure() {
+
+ @Override
+ protected void paintFigure(Graphics graphics) {
+ graphics.drawFocus(getBounds().getResized(-1, -1));
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ protected void updateLabel(Label target) {
+ Label source = (Label) getHostFigure();
+ target.setText(source.getText());
+ target.setTextAlignment(source.getTextAlignment());
+ target.setFont(source.getFont());
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshSelectionFeedback() {
+ if (selectionFeedbackFigure != null) {
+ if (selectionFeedbackFigure instanceof Label) {
+ updateLabel((Label) selectionFeedbackFigure);
+ selectionFeedbackFigure.setBounds(getFeedbackBounds());
+ } else {
+ selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshFocusFeedback() {
+ if (focusFeedbackFigure != null) {
+ focusFeedbackFigure.setBounds(getFeedbackBounds());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshFeedback() {
+ refreshSelectionFeedback();
+ refreshFocusFeedback();
+ }
+
+ /**
+ * @generated
+ */
+ private FigureListener getHostPositionListener() {
+ if (hostPositionListener == null) {
+ hostPositionListener = new FigureListener() {
+ @Override
+ public void figureMoved(IFigure source) {
+ refreshFeedback();
+ }
+ };
+ }
+ return hostPositionListener;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle moveHandle =
+ new MoveHandle((GraphicalEditPart) getHost());
+ moveHandle.setBorder(null);
+ moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
+ return Collections.singletonList(moveHandle);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLTextSelectionEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLTextSelectionEditPolicy.java
index ee6174ff3d8..f33b8ff9e16 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLTextSelectionEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLTextSelectionEditPolicy.java
@@ -1,226 +1,226 @@
-/**
- * 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.deployment.edit.policies;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Figure;
-import org.eclipse.draw2d.FigureListener;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.editpolicies.SelectionEditPolicy;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.tooling.runtime.edit.policies.labels.IRefreshableFeedbackEditPolicy;
-
-/**
- * @generated
- */
-public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements IRefreshableFeedbackEditPolicy {
-
- /**
- * @generated
- */
- private IFigure selectionFeedbackFigure;
-
- /**
- * @generated
- */
- private IFigure focusFeedbackFigure;
-
- /**
- * @generated
- */
- private FigureListener hostPositionListener;
-
- /**
- * @generated
- */
- @Override
- protected void showPrimarySelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(true);
- ((WrappingLabel) getHostFigure()).setFocus(true);
- } else {
- showSelection();
- showFocus();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void showSelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(true);
- ((WrappingLabel) getHostFigure()).setFocus(false);
- } else {
- hideSelection();
- addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
- getHostFigure().addFigureListener(getHostPositionListener());
- refreshSelectionFeedback();
- hideFocus();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void hideSelection() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setSelected(false);
- ((WrappingLabel) getHostFigure()).setFocus(false);
- } else {
- if (selectionFeedbackFigure != null) {
- removeFeedback(selectionFeedbackFigure);
- getHostFigure().removeFigureListener(getHostPositionListener());
- selectionFeedbackFigure = null;
- }
- hideFocus();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void showFocus() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setFocus(true);
- } else {
- hideFocus();
- addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
- refreshFocusFeedback();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void hideFocus() {
- if (getHostFigure() instanceof WrappingLabel) {
- ((WrappingLabel) getHostFigure()).setFocus(false);
- } else {
- if (focusFeedbackFigure != null) {
- removeFeedback(focusFeedbackFigure);
- focusFeedbackFigure = null;
- }
- }
- }
-
- /**
- * @generated
- */
- protected Rectangle getFeedbackBounds() {
- Rectangle bounds;
- if (getHostFigure() instanceof Label) {
- bounds = ((Label) getHostFigure()).getTextBounds();
- bounds.intersect(getHostFigure().getBounds());
- } else {
- bounds = getHostFigure().getBounds().getCopy();
- }
- getHostFigure().getParent().translateToAbsolute(bounds);
- getFeedbackLayer().translateToRelative(bounds);
- return bounds;
- }
-
- /**
- * @generated
- */
- protected IFigure createSelectionFeedbackFigure() {
- if (getHostFigure() instanceof Label) {
- Label feedbackFigure = new Label();
- feedbackFigure.setOpaque(true);
- feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
- feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
- return feedbackFigure;
- } else {
- RectangleFigure feedbackFigure = new RectangleFigure();
- feedbackFigure.setFill(false);
- return feedbackFigure;
- }
- }
-
- /**
- * @generated
- */
- protected IFigure createFocusFeedbackFigure() {
- return new Figure() {
-
- @Override
- protected void paintFigure(Graphics graphics) {
- graphics.drawFocus(getBounds().getResized(-1, -1));
- }
- };
- }
-
- /**
- * @generated
- */
- protected void updateLabel(Label target) {
- Label source = (Label) getHostFigure();
- target.setText(source.getText());
- target.setTextAlignment(source.getTextAlignment());
- target.setFont(source.getFont());
- }
-
- /**
- * @generated
- */
- protected void refreshSelectionFeedback() {
- if (selectionFeedbackFigure != null) {
- if (selectionFeedbackFigure instanceof Label) {
- updateLabel((Label) selectionFeedbackFigure);
- selectionFeedbackFigure.setBounds(getFeedbackBounds());
- } else {
- selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
- }
- }
- }
-
- /**
- * @generated
- */
- protected void refreshFocusFeedback() {
- if (focusFeedbackFigure != null) {
- focusFeedbackFigure.setBounds(getFeedbackBounds());
- }
- }
-
- /**
- * @generated
- */
- @Override
- public void refreshFeedback() {
- refreshSelectionFeedback();
- refreshFocusFeedback();
- }
-
- /**
- * @generated
- */
- private FigureListener getHostPositionListener() {
- if (hostPositionListener == null) {
- hostPositionListener = new FigureListener() {
- @Override
- public void figureMoved(IFigure source) {
- refreshFeedback();
- }
- };
- }
- return hostPositionListener;
- }
-}
+/**
+ * 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.deployment.edit.policies;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.FigureListener;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.editpolicies.SelectionEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.tooling.runtime.edit.policies.labels.IRefreshableFeedbackEditPolicy;
+
+/**
+ * @generated
+ */
+public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements IRefreshableFeedbackEditPolicy {
+
+ /**
+ * @generated
+ */
+ private IFigure selectionFeedbackFigure;
+
+ /**
+ * @generated
+ */
+ private IFigure focusFeedbackFigure;
+
+ /**
+ * @generated
+ */
+ private FigureListener hostPositionListener;
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void showPrimarySelection() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setSelected(true);
+ ((WrappingLabel) getHostFigure()).setFocus(true);
+ } else {
+ showSelection();
+ showFocus();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void showSelection() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setSelected(true);
+ ((WrappingLabel) getHostFigure()).setFocus(false);
+ } else {
+ hideSelection();
+ addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
+ getHostFigure().addFigureListener(getHostPositionListener());
+ refreshSelectionFeedback();
+ hideFocus();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void hideSelection() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setSelected(false);
+ ((WrappingLabel) getHostFigure()).setFocus(false);
+ } else {
+ if (selectionFeedbackFigure != null) {
+ removeFeedback(selectionFeedbackFigure);
+ getHostFigure().removeFigureListener(getHostPositionListener());
+ selectionFeedbackFigure = null;
+ }
+ hideFocus();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void showFocus() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setFocus(true);
+ } else {
+ hideFocus();
+ addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
+ refreshFocusFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void hideFocus() {
+ if (getHostFigure() instanceof WrappingLabel) {
+ ((WrappingLabel) getHostFigure()).setFocus(false);
+ } else {
+ if (focusFeedbackFigure != null) {
+ removeFeedback(focusFeedbackFigure);
+ focusFeedbackFigure = null;
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Rectangle getFeedbackBounds() {
+ Rectangle bounds;
+ if (getHostFigure() instanceof Label) {
+ bounds = ((Label) getHostFigure()).getTextBounds();
+ bounds.intersect(getHostFigure().getBounds());
+ } else {
+ bounds = getHostFigure().getBounds().getCopy();
+ }
+ getHostFigure().getParent().translateToAbsolute(bounds);
+ getFeedbackLayer().translateToRelative(bounds);
+ return bounds;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createSelectionFeedbackFigure() {
+ if (getHostFigure() instanceof Label) {
+ Label feedbackFigure = new Label();
+ feedbackFigure.setOpaque(true);
+ feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
+ feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
+ return feedbackFigure;
+ } else {
+ RectangleFigure feedbackFigure = new RectangleFigure();
+ feedbackFigure.setFill(false);
+ return feedbackFigure;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFocusFeedbackFigure() {
+ return new Figure() {
+
+ @Override
+ protected void paintFigure(Graphics graphics) {
+ graphics.drawFocus(getBounds().getResized(-1, -1));
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ protected void updateLabel(Label target) {
+ Label source = (Label) getHostFigure();
+ target.setText(source.getText());
+ target.setTextAlignment(source.getTextAlignment());
+ target.setFont(source.getFont());
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshSelectionFeedback() {
+ if (selectionFeedbackFigure != null) {
+ if (selectionFeedbackFigure instanceof Label) {
+ updateLabel((Label) selectionFeedbackFigure);
+ selectionFeedbackFigure.setBounds(getFeedbackBounds());
+ } else {
+ selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshFocusFeedback() {
+ if (focusFeedbackFigure != null) {
+ focusFeedbackFigure.setBounds(getFeedbackBounds());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshFeedback() {
+ refreshSelectionFeedback();
+ refreshFocusFeedback();
+ }
+
+ /**
+ * @generated
+ */
+ private FigureListener getHostPositionListener() {
+ if (hostPositionListener == null) {
+ hostPositionListener = new FigureListener() {
+ @Override
+ public void figureMoved(IFigure source) {
+ refreshFeedback();
+ }
+ };
+ }
+ return hostPositionListener;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/parsers/MessageFormatParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/parsers/MessageFormatParser.java
index b51f2a15553..513310633da 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/parsers/MessageFormatParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/parsers/MessageFormatParser.java
@@ -1,212 +1,212 @@
-/**
- * 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.deployment.parsers;
-
-import java.text.FieldPosition;
-import java.text.MessageFormat;
-import java.text.ParsePosition;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.tooling.runtime.parsers.AbstractAttributeParser;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class MessageFormatParser extends AbstractAttributeParser {
-
- /**
- * @generated
- */
- private String defaultPattern;
-
- /**
- * @generated
- */
- private String defaultEditablePattern;
-
- /**
- * @generated
- */
- private MessageFormat viewProcessor;
-
- /**
- * @generated
- */
- private MessageFormat editorProcessor;
-
- /**
- * @generated
- */
- private MessageFormat editProcessor;
-
- /**
- * @generated
- */
- public MessageFormatParser(EAttribute[] features) {
- super(features);
- }
-
- /**
- * @generated
- */
- public MessageFormatParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- /**
- * @generated
- */
- protected String getDefaultPattern() {
- if (defaultPattern == null) {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < features.length; i++) {
- if (i > 0) {
- sb.append(' ');
- }
- sb.append('{');
- sb.append(i);
- sb.append('}');
- }
- defaultPattern = sb.toString();
- }
- return defaultPattern;
- }
-
- /**
- * @generated
- */
- @Override
- public void setViewPattern(String viewPattern) {
- super.setViewPattern(viewPattern);
- viewProcessor = null;
- }
-
- /**
- * @generated
- */
- @Override
- public void setEditorPattern(String editorPattern) {
- super.setEditorPattern(editorPattern);
- editorProcessor = null;
- }
-
- /**
- * @generated
- */
- protected MessageFormat getViewProcessor() {
- if (viewProcessor == null) {
- viewProcessor = new MessageFormat(getViewPattern() == null ? getDefaultPattern() : getViewPattern());
- }
- return viewProcessor;
- }
-
- /**
- * @generated
- */
- protected MessageFormat getEditorProcessor() {
- if (editorProcessor == null) {
- editorProcessor = new MessageFormat(getEditorPattern() == null ? getDefaultEditablePattern() : getEditorPattern());
- }
- return editorProcessor;
- }
-
- /**
- * @generated
- */
- protected String getDefaultEditablePattern() {
- if (defaultEditablePattern == null) {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < editableFeatures.length; i++) {
- if (i > 0) {
- sb.append(' ');
- }
- sb.append('{');
- sb.append(i);
- sb.append('}');
- }
- defaultEditablePattern = sb.toString();
- }
- return defaultEditablePattern;
- }
-
- /**
- * @generated
- */
- @Override
- public void setEditPattern(String editPattern) {
- super.setEditPattern(editPattern);
- editProcessor = null;
- }
-
- /**
- * @generated
- */
- protected MessageFormat getEditProcessor() {
- if (editProcessor == null) {
- editProcessor = new MessageFormat(getEditPattern() == null ? getDefaultEditablePattern() : getEditPattern());
- }
- return editProcessor;
- }
-
- /**
- * @generated
- */
- @Override
- public String getEditString(IAdaptable adapter, int flags) {
- EObject element = (EObject) adapter.getAdapter(EObject.class);
- return getEditorProcessor().format(getEditableValues(element), new StringBuffer(), new FieldPosition(0)).toString();
- }
-
- /**
- * @generated
- */
- @Override
- public IParserEditStatus isValidEditString(IAdaptable adapter, String editString) {
- ParsePosition pos = new ParsePosition(0);
- Object[] values = getEditProcessor().parse(editString, pos);
- if (values == null) {
- return new ParserEditStatus(
- UMLDiagramEditorPlugin.ID,
- IParserEditStatus.UNEDITABLE,
- NLS.bind(
- Messages.MessageFormatParser_InvalidInputError,
- new Integer(pos.getErrorIndex())));
- }
- return validateNewValues(values);
- }
-
- /**
- * @generated
- */
- @Override
- public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
- Object[] values = getEditProcessor().parse(newString, new ParsePosition(0));
- return getParseCommand(adapter, values, flags);
- }
-
- /**
- * @generated
- */
- @Override
- public String getPrintString(IAdaptable adapter, int flags) {
- EObject element = (EObject) adapter.getAdapter(EObject.class);
- return getViewProcessor().format(getValues(element), new StringBuffer(), new FieldPosition(0)).toString();
- }
-}
+/**
+ * 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.deployment.parsers;
+
+import java.text.FieldPosition;
+import java.text.MessageFormat;
+import java.text.ParsePosition;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.tooling.runtime.parsers.AbstractAttributeParser;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.uml.diagram.deployment.part.Messages;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin;
+
+/**
+ * @generated
+ */
+public class MessageFormatParser extends AbstractAttributeParser {
+
+ /**
+ * @generated
+ */
+ private String defaultPattern;
+
+ /**
+ * @generated
+ */
+ private String defaultEditablePattern;
+
+ /**
+ * @generated
+ */
+ private MessageFormat viewProcessor;
+
+ /**
+ * @generated
+ */
+ private MessageFormat editorProcessor;
+
+ /**
+ * @generated
+ */
+ private MessageFormat editProcessor;
+
+ /**
+ * @generated
+ */
+ public MessageFormatParser(EAttribute[] features) {
+ super(features);
+ }
+
+ /**
+ * @generated
+ */
+ public MessageFormatParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ /**
+ * @generated
+ */
+ protected String getDefaultPattern() {
+ if (defaultPattern == null) {
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < features.length; i++) {
+ if (i > 0) {
+ sb.append(' ');
+ }
+ sb.append('{');
+ sb.append(i);
+ sb.append('}');
+ }
+ defaultPattern = sb.toString();
+ }
+ return defaultPattern;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void setViewPattern(String viewPattern) {
+ super.setViewPattern(viewPattern);
+ viewProcessor = null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void setEditorPattern(String editorPattern) {
+ super.setEditorPattern(editorPattern);
+ editorProcessor = null;
+ }
+
+ /**
+ * @generated
+ */
+ protected MessageFormat getViewProcessor() {
+ if (viewProcessor == null) {
+ viewProcessor = new MessageFormat(getViewPattern() == null ? getDefaultPattern() : getViewPattern());
+ }
+ return viewProcessor;
+ }
+
+ /**
+ * @generated
+ */
+ protected MessageFormat getEditorProcessor() {
+ if (editorProcessor == null) {
+ editorProcessor = new MessageFormat(getEditorPattern() == null ? getDefaultEditablePattern() : getEditorPattern());
+ }
+ return editorProcessor;
+ }
+
+ /**
+ * @generated
+ */
+ protected String getDefaultEditablePattern() {
+ if (defaultEditablePattern == null) {
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < editableFeatures.length; i++) {
+ if (i > 0) {
+ sb.append(' ');
+ }
+ sb.append('{');
+ sb.append(i);
+ sb.append('}');
+ }
+ defaultEditablePattern = sb.toString();
+ }
+ return defaultEditablePattern;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void setEditPattern(String editPattern) {
+ super.setEditPattern(editPattern);
+ editProcessor = null;
+ }
+
+ /**
+ * @generated
+ */
+ protected MessageFormat getEditProcessor() {
+ if (editProcessor == null) {
+ editProcessor = new MessageFormat(getEditPattern() == null ? getDefaultEditablePattern() : getEditPattern());
+ }
+ return editProcessor;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getEditString(IAdaptable adapter, int flags) {
+ EObject element = (EObject) adapter.getAdapter(EObject.class);
+ return getEditorProcessor().format(getEditableValues(element), new StringBuffer(), new FieldPosition(0)).toString();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParserEditStatus isValidEditString(IAdaptable adapter, String editString) {
+ ParsePosition pos = new ParsePosition(0);
+ Object[] values = getEditProcessor().parse(editString, pos);
+ if (values == null) {
+ return new ParserEditStatus(
+ UMLDiagramEditorPlugin.ID,
+ IParserEditStatus.UNEDITABLE,
+ NLS.bind(
+ Messages.MessageFormatParser_InvalidInputError,
+ new Integer(pos.getErrorIndex())));
+ }
+ return validateNewValues(values);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
+ Object[] values = getEditProcessor().parse(newString, new ParsePosition(0));
+ return getParseCommand(adapter, values, flags);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getPrintString(IAdaptable adapter, int flags) {
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/DiagramEditorContextMenuProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/DiagramEditorContextMenuProvider.java
index e4fba0d4eb9..d21b41f5972 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/DiagramEditorContextMenuProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/DiagramEditorContextMenuProvider.java
@@ -1,62 +1,62 @@
-/**
- * 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.deployment.part;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gef.EditPartViewer;
-import org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.ContributionItemService;
-import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
-import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * @generated
- */
-public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider {
-
- /**
- * @generated
- */
- private IWorkbenchPart part;
-
- /**
- * @generated
- */
- public DiagramEditorContextMenuProvider(IWorkbenchPart part, EditPartViewer viewer) {
- super(part, viewer);
- this.part = part;
- }
-
- /**
- * @generated
- */
- @Override
- public void buildContextMenu(final IMenuManager menu) {
- getViewer().flush();
- try {
- TransactionUtil.getEditingDomain(
- (EObject) getViewer().getContents().getModel()).runExclusive(new Runnable() {
-
- @Override
- public void run() {
- ContributionItemService.getInstance().contributeToPopupMenu(
- DiagramEditorContextMenuProvider.this, part);
- menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL);
- }
- });
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Error building context menu", e);
- }
- }
-}
+/**
+ * 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.deployment.part;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.ContributionItemService;
+import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
+import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * @generated
+ */
+public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider {
+
+ /**
+ * @generated
+ */
+ private IWorkbenchPart part;
+
+ /**
+ * @generated
+ */
+ public DiagramEditorContextMenuProvider(IWorkbenchPart part, EditPartViewer viewer) {
+ super(part, viewer);
+ this.part = part;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void buildContextMenu(final IMenuManager menu) {
+ getViewer().flush();
+ try {
+ TransactionUtil.getEditingDomain(
+ (EObject) getViewer().getContents().getModel()).runExclusive(new Runnable() {
+
+ @Override
+ public void run() {
+ ContributionItemService.getInstance().contributeToPopupMenu(
+ DiagramEditorContextMenuProvider.this, part);
+ menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL);
+ }
+ });
+ } catch (Exception e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Error building context menu", e);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLCreationWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLCreationWizard.java
index 35bd9635198..d9127727cc2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLCreationWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLCreationWizard.java
@@ -1,178 +1,178 @@
-/**
- * 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.deployment.part;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * @generated
- */
-public class UMLCreationWizard extends Wizard implements INewWizard {
-
- /**
- * @generated
- */
- private IWorkbench workbench;
-
- /**
- * @generated
- */
- protected IStructuredSelection selection;
-
- /**
- * @generated
- */
- protected UMLCreationWizardPage diagramModelFilePage;
-
- /**
- * @generated
- */
- protected UMLCreationWizardPage domainModelFilePage;
-
- /**
- * @generated
- */
- protected Resource diagram;
-
- /**
- * @generated
- */
- private boolean openNewlyCreatedDiagramEditor = true;
-
- /**
- * @generated
- */
- public IWorkbench getWorkbench() {
- return workbench;
- }
-
- /**
- * @generated
- */
- public IStructuredSelection getSelection() {
- return selection;
- }
-
- /**
- * @generated
- */
- public final Resource getDiagram() {
- return diagram;
- }
-
- /**
- * @generated
- */
- public final boolean isOpenNewlyCreatedDiagramEditor() {
- return openNewlyCreatedDiagramEditor;
- }
-
- /**
- * @generated
- */
- public void setOpenNewlyCreatedDiagramEditor(boolean openNewlyCreatedDiagramEditor) {
- this.openNewlyCreatedDiagramEditor = openNewlyCreatedDiagramEditor;
- }
-
- /**
- * @generated
- */
- @Override
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.workbench = workbench;
- this.selection = selection;
- setWindowTitle(Messages.UMLCreationWizardTitle);
- setDefaultPageImageDescriptor(UMLDiagramEditorPlugin.getBundledImageDescriptor("icons/wizban/NewUMLWizard.gif")); //$NON-NLS-1$
- setNeedsProgressMonitor(true);
- }
-
- /**
- * @generated
- */
- @Override
- public void addPages() {
- diagramModelFilePage = new UMLCreationWizardPage("DiagramModelFile", getSelection(), "PapyrusUMLDeployment_diagram"); //$NON-NLS-1$ //$NON-NLS-2$
- diagramModelFilePage.setTitle(Messages.UMLCreationWizard_DiagramModelFilePageTitle);
- diagramModelFilePage.setDescription(Messages.UMLCreationWizard_DiagramModelFilePageDescription);
- addPage(diagramModelFilePage);
-
- domainModelFilePage = new UMLCreationWizardPage("DomainModelFile", getSelection(), "umlDeployment") { //$NON-NLS-1$ //$NON-NLS-2$
-
- @Override
- public void setVisible(boolean visible) {
- if (visible) {
- String fileName = diagramModelFilePage.getFileName();
- fileName = fileName.substring(0, fileName.length() - ".PapyrusUMLDeployment_diagram".length()); //$NON-NLS-1$
- setFileName(UMLDiagramEditorUtil.getUniqueFileName(
- getContainerFullPath(), fileName, "umlDeployment")); //$NON-NLS-1$
- }
- super.setVisible(visible);
- }
- };
- domainModelFilePage.setTitle(Messages.UMLCreationWizard_DomainModelFilePageTitle);
- domainModelFilePage.setDescription(Messages.UMLCreationWizard_DomainModelFilePageDescription);
- addPage(domainModelFilePage);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean performFinish() {
- IRunnableWithProgress op =
- new WorkspaceModifyOperation(null) {
-
- @Override
- protected void execute(IProgressMonitor monitor)
- throws CoreException, InterruptedException {
- diagram = UMLDiagramEditorUtil.createDiagram(diagramModelFilePage.getURI(),
- domainModelFilePage.getURI(),
- monitor);
- if (isOpenNewlyCreatedDiagramEditor() && diagram != null) {
- try {
- UMLDiagramEditorUtil.openDiagram(diagram);
- } catch (PartInitException e) {
- ErrorDialog.openError(getContainer().getShell(),
- Messages.UMLCreationWizardOpenEditorError, null, e.getStatus());
- }
- }
- }
- };
- try {
- getContainer().run(false, true, op);
- } catch (InterruptedException e) {
- return false;
- } catch (InvocationTargetException e) {
- if (e.getTargetException() instanceof CoreException) {
- ErrorDialog.openError(getContainer().getShell(),
- Messages.UMLCreationWizardCreationError, null,
- ((CoreException) e.getTargetException()).getStatus());
- } else {
- UMLDiagramEditorPlugin.getInstance().logError("Error creating diagram", e.getTargetException()); //$NON-NLS-1$
- }
- return false;
- }
- return diagram != null;
- }
-}
+/**
+ * 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.deployment.part;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+/**
+ * @generated
+ */
+public class UMLCreationWizard extends Wizard implements INewWizard {
+
+ /**
+ * @generated
+ */
+ private IWorkbench workbench;
+
+ /**
+ * @generated
+ */
+ protected IStructuredSelection selection;
+
+ /**
+ * @generated
+ */
+ protected UMLCreationWizardPage diagramModelFilePage;
+
+ /**
+ * @generated
+ */
+ protected UMLCreationWizardPage domainModelFilePage;
+
+ /**
+ * @generated
+ */
+ protected Resource diagram;
+
+ /**
+ * @generated
+ */
+ private boolean openNewlyCreatedDiagramEditor = true;
+
+ /**
+ * @generated
+ */
+ public IWorkbench getWorkbench() {
+ return workbench;
+ }
+
+ /**
+ * @generated
+ */
+ public IStructuredSelection getSelection() {
+ return selection;
+ }
+
+ /**
+ * @generated
+ */
+ public final Resource getDiagram() {
+ return diagram;
+ }
+
+ /**
+ * @generated
+ */
+ public final boolean isOpenNewlyCreatedDiagramEditor() {
+ return openNewlyCreatedDiagramEditor;
+ }
+
+ /**
+ * @generated
+ */
+ public void setOpenNewlyCreatedDiagramEditor(boolean openNewlyCreatedDiagramEditor) {
+ this.openNewlyCreatedDiagramEditor = openNewlyCreatedDiagramEditor;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+ this.selection = selection;
+ setWindowTitle(Messages.UMLCreationWizardTitle);
+ setDefaultPageImageDescriptor(UMLDiagramEditorPlugin.getBundledImageDescriptor("icons/wizban/NewUMLWizard.gif")); //$NON-NLS-1$
+ setNeedsProgressMonitor(true);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void addPages() {
+ diagramModelFilePage = new UMLCreationWizardPage("DiagramModelFile", getSelection(), "PapyrusUMLDeployment_diagram"); //$NON-NLS-1$ //$NON-NLS-2$
+ diagramModelFilePage.setTitle(Messages.UMLCreationWizard_DiagramModelFilePageTitle);
+ diagramModelFilePage.setDescription(Messages.UMLCreationWizard_DiagramModelFilePageDescription);
+ addPage(diagramModelFilePage);
+
+ domainModelFilePage = new UMLCreationWizardPage("DomainModelFile", getSelection(), "umlDeployment") { //$NON-NLS-1$ //$NON-NLS-2$
+
+ @Override
+ public void setVisible(boolean visible) {
+ if (visible) {
+ String fileName = diagramModelFilePage.getFileName();
+ fileName = fileName.substring(0, fileName.length() - ".PapyrusUMLDeployment_diagram".length()); //$NON-NLS-1$
+ setFileName(UMLDiagramEditorUtil.getUniqueFileName(
+ getContainerFullPath(), fileName, "umlDeployment")); //$NON-NLS-1$
+ }
+ super.setVisible(visible);
+ }
+ };
+ domainModelFilePage.setTitle(Messages.UMLCreationWizard_DomainModelFilePageTitle);
+ domainModelFilePage.setDescription(Messages.UMLCreationWizard_DomainModelFilePageDescription);
+ addPage(domainModelFilePage);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean performFinish() {
+ IRunnableWithProgress op =
+ new WorkspaceModifyOperation(null) {
+
+ @Override
+ protected void execute(IProgressMonitor monitor)
+ throws CoreException, InterruptedException {
+ diagram = UMLDiagramEditorUtil.createDiagram(diagramModelFilePage.getURI(),
+ domainModelFilePage.getURI(),
+ monitor);
+ if (isOpenNewlyCreatedDiagramEditor() && diagram != null) {
+ try {
+ UMLDiagramEditorUtil.openDiagram(diagram);
+ } catch (PartInitException e) {
+ ErrorDialog.openError(getContainer().getShell(),
+ Messages.UMLCreationWizardOpenEditorError, null, e.getStatus());
+ }
+ }
+ }
+ };
+ try {
+ getContainer().run(false, true, op);
+ } catch (InterruptedException e) {
+ return false;
+ } catch (InvocationTargetException e) {
+ if (e.getTargetException() instanceof CoreException) {
+ ErrorDialog.openError(getContainer().getShell(),
+ Messages.UMLCreationWizardCreationError, null,
+ ((CoreException) e.getTargetException()).getStatus());
+ } else {
+ UMLDiagramEditorPlugin.getInstance().logError("Error creating diagram", e.getTargetException()); //$NON-NLS-1$
+ }
+ return false;
+ }
+ return diagram != null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLCreationWizardPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLCreationWizardPage.java
index cafc02a3a3e..923815d0069 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLCreationWizardPage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLCreationWizardPage.java
@@ -1,98 +1,98 @@
-/**
- * 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.deployment.part;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-
-/**
- * @generated
- */
-public class UMLCreationWizardPage extends WizardNewFileCreationPage {
-
- /**
- * @generated
- */
- private final String fileExtension;
-
- /**
- * @generated
- */
- public UMLCreationWizardPage(String pageName, IStructuredSelection selection, String fileExtension) {
- super(pageName, selection);
- this.fileExtension = fileExtension;
- }
-
- /**
- * Override to create files with this extension.
- *
- * @generated
- */
- protected String getExtension() {
- return fileExtension;
- }
-
- /**
- * @generated
- */
- public URI getURI() {
- return URI.createPlatformResourceURI(getFilePath().toString(), false);
- }
-
- /**
- * @generated
- */
- protected IPath getFilePath() {
- IPath path = getContainerFullPath();
- if (path == null) {
- path = new Path(""); //$NON-NLS-1$
- }
- String fileName = getFileName();
- if (fileName != null) {
- path = path.append(fileName);
- }
- return path;
- }
-
- /**
- * @generated
- */
- @Override
- public void createControl(Composite parent) {
- super.createControl(parent);
- setFileName(UMLDiagramEditorUtil.getUniqueFileName(
- getContainerFullPath(), getFileName(), getExtension()));
- setPageComplete(validatePage());
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean validatePage() {
- if (!super.validatePage()) {
- return false;
- }
- String extension = getExtension();
- if (extension != null && !getFilePath().toString().endsWith("." + extension)) {
- setErrorMessage(NLS.bind(
- Messages.UMLCreationWizardPageExtensionError, extension));
- return false;
- }
- return true;
- }
-}
+/**
+ * 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.deployment.part;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+
+/**
+ * @generated
+ */
+public class UMLCreationWizardPage extends WizardNewFileCreationPage {
+
+ /**
+ * @generated
+ */
+ private final String fileExtension;
+
+ /**
+ * @generated
+ */
+ public UMLCreationWizardPage(String pageName, IStructuredSelection selection, String fileExtension) {
+ super(pageName, selection);
+ this.fileExtension = fileExtension;
+ }
+
+ /**
+ * Override to create files with this extension.
+ *
+ * @generated
+ */
+ protected String getExtension() {
+ return fileExtension;
+ }
+
+ /**
+ * @generated
+ */
+ public URI getURI() {
+ return URI.createPlatformResourceURI(getFilePath().toString(), false);
+ }
+
+ /**
+ * @generated
+ */
+ protected IPath getFilePath() {
+ IPath path = getContainerFullPath();
+ if (path == null) {
+ path = new Path(""); //$NON-NLS-1$
+ }
+ String fileName = getFileName();
+ if (fileName != null) {
+ path = path.append(fileName);
+ }
+ return path;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ setFileName(UMLDiagramEditorUtil.getUniqueFileName(
+ getContainerFullPath(), getFileName(), getExtension()));
+ setPageComplete(validatePage());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean validatePage() {
+ if (!super.validatePage()) {
+ return false;
+ }
+ String extension = getExtension();
+ if (extension != null && !getFilePath().toString().endsWith("." + extension)) {
+ setErrorMessage(NLS.bind(
+ Messages.UMLCreationWizardPageExtensionError, extension));
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditor.java
index 08af84898c7..4281d209393 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditor.java
@@ -1,550 +1,550 @@
-/**
- * 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.deployment.part;
-
-import java.util.EventObject;
-
-import org.eclipse.core.commands.operations.IUndoContext;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gef.KeyHandler;
-import org.eclipse.gef.Tool;
-import org.eclipse.gef.commands.CommandStackListener;
-import org.eclipse.gef.palette.PaletteRoot;
-import org.eclipse.gef.ui.palette.PaletteViewer;
-import org.eclipse.gef.ui.palette.PaletteViewerProvider;
-import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
-import org.eclipse.gmf.runtime.common.core.service.ProviderChangeEvent;
-import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
-import org.eclipse.gmf.runtime.diagram.ui.internal.parts.PaletteToolTransferDragSourceListener;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.papyrus.commands.util.OperationHistoryDirtyState;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfMultiDiagramDocumentProvider;
-import org.eclipse.papyrus.uml.diagram.common.listeners.DropTargetListener;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteContextMenuProvider;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteViewer;
-import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.ide.IGotoMarker;
-import org.eclipse.ui.part.ShowInContext;
-
-/**
- * @generated
- */
-public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderChangeListener, IGotoMarker {
-
- /**
- * @generated
- */
- public static final String ID = "org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorID"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static final String CONTEXT_ID = "org.eclipse.papyrus.uml.diagram.deployment.ui.diagramContext"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private KeyHandler paletteKeyHandler = null;
-
- /**
- * @generated
- */
- private MouseListener paletteMouseListener = null;
-
- /**
- * @generated
- */
- private OperationHistoryDirtyState dirtyState;
-
- /**
- * @generated
- */
- private TransactionalEditingDomain editingDomain;
-
- /**
- * @generated
- */
- private IDocumentProvider documentProvider;
-
- /**
- * @generated
- */
- 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);
-
- }
-
- /**
- * @generated
- */
- @Override
- protected String getContextID() {
- return CONTEXT_ID;
- }
-
- /**
- * @generated
- */
- @Override
- protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
- PaletteRoot paletteRoot;
- if (existingPaletteRoot == null) {
- paletteRoot = PapyrusPaletteService.getInstance().createPalette(this, getDefaultPaletteContent());
- } else {
- PapyrusPaletteService.getInstance().updatePalette(existingPaletteRoot, this, getDefaultPaletteContent());
- paletteRoot = existingPaletteRoot;
- }
- applyCustomizationsToPalette(paletteRoot);
- return paletteRoot;
- }
-
- /**
- * @generated
- */
- @Override
- protected PreferencesHint getPreferencesHint() {
- return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
- }
-
- /**
- * @generated
- */
- @Override
- public String getContributorId() {
- return UMLDiagramEditorPlugin.ID;
- }
-
- /**
- * @generated
- */
- @Override
- protected final IDocumentProvider getDocumentProvider(IEditorInput input) {
- return documentProvider;
- }
-
- /**
- * @generated
- */
- @Override
- public TransactionalEditingDomain getEditingDomain() {
- return editingDomain;
- }
-
- /**
- * @generated
- */
- @Override
- protected final void setDocumentProvider(IEditorInput input) {
- // Already set in the constructor
- }
-
- /**
- * @generated
- */
- @Override
- public void gotoMarker(IMarker marker) {
- MarkerNavigationService.getInstance().gotoMarker(this, marker);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean isSaveAsAllowed() {
- return true;
- }
-
- /**
- * @generated
- */
- @Override
- public void doSaveAs() {
- performSaveAs(new NullProgressMonitor());
- }
-
- /**
- * @generated
- */
- @Override
- protected void performSaveAs(IProgressMonitor progressMonitor) {
- // Nothing
- }
-
- /**
- * @generated
- */
- @Override
- public ShowInContext getShowInContext() {
- return new ShowInContext(getEditorInput(), getGraphicalViewer().getSelection());
- }
-
- /**
- * @generated
- */
- @Override
- protected void configureGraphicalViewer() {
- super.configureGraphicalViewer();
- DiagramEditorContextMenuProvider provider =
- new DiagramEditorContextMenuProvider(this, getDiagramGraphicalViewer());
- getDiagramGraphicalViewer().setContextMenu(provider);
- getSite().registerContextMenu(ActionIds.DIAGRAM_EDITOR_CONTEXT_MENU, provider, getDiagramGraphicalViewer());
- }
-
- /**
- * @generated
- */
- @Override
- protected TransactionalEditingDomain createEditingDomain() {
- // Already configured
- return editingDomain;
- }
-
- /**
- * @generated
- */
- @Override
- protected void configureDiagramEditDomain() {
- super.configureDiagramEditDomain();
- getDiagramEditDomain().getDiagramCommandStack().addCommandStackListener(new CommandStackListener() {
-
- @Override
- public void commandStackChanged(EventObject event) {
- firePropertyChange(IEditorPart.PROP_DIRTY);
- }
- });
- }
-
- /**
- * @generated
- */
- @Override
- public void doSave(IProgressMonitor progressMonitor) {
- // The saving of the resource is done by the CoreMultiDiagramEditor
- getDirtyState().saved();
- }
-
- /**
- * @generated
- */
- protected OperationHistoryDirtyState getDirtyState() {
- if (dirtyState == null) {
- dirtyState = OperationHistoryDirtyState.newInstance(getUndoContext(), getOperationHistory());
- }
- return dirtyState;
- }
-
- /**
- * @generated
- */
- @Override
- protected void setUndoContext(IUndoContext context) {
- if (dirtyState != null) {
- dirtyState.dispose();
- dirtyState = null;
- }
-
- super.setUndoContext(context);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean isDirty() {
- return getDirtyState().isDirty();
- }
-
- /**
- * @generated
- */
- @Override
- public void providerChanged(ProviderChangeEvent event) {
- // update the palette if the palette service has changed
- if (PapyrusPaletteService.getInstance().equals(event.getSource())) {
- PapyrusPaletteService.getInstance().updatePalette(getPaletteViewer().getPaletteRoot(), this,
- getDefaultPaletteContent());
- }
- }
-
- /**
- * @generated
- */
- @Override
- public void dispose() {
- // remove palette service listener
- // remove preference listener
- PapyrusPaletteService.getInstance().removeProviderChangeListener(this);
-
- if (dirtyState != null) {
- dirtyState.dispose();
- dirtyState = null;
- }
-
- super.dispose();
- }
-
- /**
- * @generated
- */
- protected PaletteViewer getPaletteViewer() {
- return getEditDomain().getPaletteViewer();
- }
-
- /**
- * @generated
- */
- @Override
- protected PaletteViewer constructPaletteViewer() {
- return new PapyrusPaletteViewer();
- }
-
- /**
- * @generated
- */
- @Override
- protected PaletteViewerProvider createPaletteViewerProvider() {
- getEditDomain().setPaletteRoot(createPaletteRoot(null));
- return new PaletteViewerProvider(getEditDomain()) {
-
- /**
- * Override to provide the additional behavior for the tools. Will intialize with a
- * PaletteEditPartFactory that has a TrackDragger that understand how to handle the
- * mouseDoubleClick event for shape creation tools. Also will initialize the palette
- * with a defaultTool that is the SelectToolEx that undestands how to handle the enter
- * key which will result in the creation of the shape also.
- */
- @Override
- 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
- // tools.
- viewer.addDragSourceListener(new PaletteToolTransferDragSourceListener(viewer));
- viewer.setCustomizer(createPaletteCustomizer());
- }
-
- @Override
- public PaletteViewer createPaletteViewer(Composite parent) {
- PaletteViewer pViewer = constructPaletteViewer();
- pViewer.createControl(parent);
- configurePaletteViewer(pViewer);
- hookPaletteViewer(pViewer);
- return pViewer;
- }
-
- /**
- * @return Palette Key Handler for the palette
- */
- private KeyHandler getPaletteKeyHandler() {
-
- if (paletteKeyHandler == null) {
-
- paletteKeyHandler = new KeyHandler() {
-
- /**
- * Processes a <i>key released </i> event. This method is called by the Tool
- * whenever a key is released, and the Tool is in the proper state. Override
- * to support pressing the enter key to create a shape or connection
- * (between two selected shapes)
- *
- * @param event
- * the KeyEvent
- * @return <code>true</code> if KeyEvent was handled in some way
- */
- @Override
- 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;
- }
-
- /**
- * @return Palette Mouse listener for the palette
- */
- private MouseListener getPaletteMouseListener() {
-
- if (paletteMouseListener == null) {
-
- paletteMouseListener = new MouseListener() {
-
- /**
- * Flag to indicate that the current active tool should be cleared after a
- * mouse double-click event.
- */
- private boolean clearActiveTool = false;
-
- /**
- * Override to support double-clicking a palette tool entry to create a
- * shape or connection (between two selected shapes).
- *
- * @see MouseListener#mouseDoubleClick(MouseEvent)
- */
- @Override
- 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
- // receiving mouse up events.
- clearActiveTool = true;
- }
- }
-
- @Override
- public void mouseDown(MouseEvent e) {
- // do nothing
- }
-
- @Override
- public void mouseUp(MouseEvent e) {
- // Deactivate current active tool here if a
- // double-click was handled.
- if (clearActiveTool) {
- getPaletteViewer().setActiveTool(null);
- clearActiveTool = false;
- }
-
- }
- };
-
- }
- return paletteMouseListener;
- }
-
- };
- }
-
- /**
- * @generated
- */
- @Override
- public GraphicalViewer getGraphicalViewer() {
- return super.getGraphicalViewer();
- }
-
- /**
- * @generated
- */
- @Override
- protected void initializeGraphicalViewer() {
- super.initializeGraphicalViewer();
-
- // Enable Drop
- getDiagramGraphicalViewer().addDropTargetListener(
- new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
-
- @Override
- protected Object getJavaObject(TransferData data) {
- // It is usual for the transfer data not to be set because it is available locally
- return LocalSelectionTransfer.getTransfer().getSelection();
- }
-
- @Override
- protected TransactionalEditingDomain getTransactionalEditingDomain() {
- return getEditingDomain();
- }
- });
-
- }
-
- /**
- * @generated
- */
- @Override
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if (getSite().getPage().getActiveEditor() instanceof IMultiDiagramEditor) {
- IMultiDiagramEditor editor = (IMultiDiagramEditor) getSite().getPage().getActiveEditor();
- // If not the active editor, ignore selection changed.
- if (this.equals(editor.getActiveEditor())) {
- updateActions(getSelectionActions());
- super.selectionChanged(part, selection);
- } else {
- super.selectionChanged(part, selection);
- }
- } else {
- super.selectionChanged(part, selection);
- }
- // from
- // org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.selectionChanged(IWorkbenchPart,
- // ISelection)
- if (part == this) {
- rebuildStatusLine();
- }
- }
-}
+/**
+ * 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.deployment.part;
+
+import java.util.EventObject;
+
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.KeyHandler;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.commands.CommandStackListener;
+import org.eclipse.gef.palette.PaletteRoot;
+import org.eclipse.gef.ui.palette.PaletteViewer;
+import org.eclipse.gef.ui.palette.PaletteViewerProvider;
+import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
+import org.eclipse.gmf.runtime.common.core.service.ProviderChangeEvent;
+import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
+import org.eclipse.gmf.runtime.diagram.ui.internal.parts.PaletteToolTransferDragSourceListener;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.papyrus.commands.util.OperationHistoryDirtyState;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.GmfMultiDiagramDocumentProvider;
+import org.eclipse.papyrus.uml.diagram.common.listeners.DropTargetListener;
+import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteContextMenuProvider;
+import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteViewer;
+import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
+import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.ide.IGotoMarker;
+import org.eclipse.ui.part.ShowInContext;
+
+/**
+ * @generated
+ */
+public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderChangeListener, IGotoMarker {
+
+ /**
+ * @generated
+ */
+ public static final String ID = "org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorID"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final String CONTEXT_ID = "org.eclipse.papyrus.uml.diagram.deployment.ui.diagramContext"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private KeyHandler paletteKeyHandler = null;
+
+ /**
+ * @generated
+ */
+ private MouseListener paletteMouseListener = null;
+
+ /**
+ * @generated
+ */
+ private OperationHistoryDirtyState dirtyState;
+
+ /**
+ * @generated
+ */
+ private TransactionalEditingDomain editingDomain;
+
+ /**
+ * @generated
+ */
+ private IDocumentProvider documentProvider;
+
+ /**
+ * @generated
+ */
+ 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);
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected String getContextID() {
+ return CONTEXT_ID;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
+ PaletteRoot paletteRoot;
+ if (existingPaletteRoot == null) {
+ paletteRoot = PapyrusPaletteService.getInstance().createPalette(this, getDefaultPaletteContent());
+ } else {
+ PapyrusPaletteService.getInstance().updatePalette(existingPaletteRoot, this, getDefaultPaletteContent());
+ paletteRoot = existingPaletteRoot;
+ }
+ applyCustomizationsToPalette(paletteRoot);
+ return paletteRoot;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected PreferencesHint getPreferencesHint() {
+ return UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getContributorId() {
+ return UMLDiagramEditorPlugin.ID;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected final IDocumentProvider getDocumentProvider(IEditorInput input) {
+ return documentProvider;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public TransactionalEditingDomain getEditingDomain() {
+ return editingDomain;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected final void setDocumentProvider(IEditorInput input) {
+ // Already set in the constructor
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void gotoMarker(IMarker marker) {
+ MarkerNavigationService.getInstance().gotoMarker(this, marker);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void doSaveAs() {
+ performSaveAs(new NullProgressMonitor());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void performSaveAs(IProgressMonitor progressMonitor) {
+ // Nothing
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ShowInContext getShowInContext() {
+ return new ShowInContext(getEditorInput(), getGraphicalViewer().getSelection());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void configureGraphicalViewer() {
+ super.configureGraphicalViewer();
+ DiagramEditorContextMenuProvider provider =
+ new DiagramEditorContextMenuProvider(this, getDiagramGraphicalViewer());
+ getDiagramGraphicalViewer().setContextMenu(provider);
+ getSite().registerContextMenu(ActionIds.DIAGRAM_EDITOR_CONTEXT_MENU, provider, getDiagramGraphicalViewer());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected TransactionalEditingDomain createEditingDomain() {
+ // Already configured
+ return editingDomain;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void configureDiagramEditDomain() {
+ super.configureDiagramEditDomain();
+ getDiagramEditDomain().getDiagramCommandStack().addCommandStackListener(new CommandStackListener() {
+
+ @Override
+ public void commandStackChanged(EventObject event) {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ });
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void doSave(IProgressMonitor progressMonitor) {
+ // The saving of the resource is done by the CoreMultiDiagramEditor
+ getDirtyState().saved();
+ }
+
+ /**
+ * @generated
+ */
+ protected OperationHistoryDirtyState getDirtyState() {
+ if (dirtyState == null) {
+ dirtyState = OperationHistoryDirtyState.newInstance(getUndoContext(), getOperationHistory());
+ }
+ return dirtyState;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setUndoContext(IUndoContext context) {
+ if (dirtyState != null) {
+ dirtyState.dispose();
+ dirtyState = null;
+ }
+
+ super.setUndoContext(context);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isDirty() {
+ return getDirtyState().isDirty();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void providerChanged(ProviderChangeEvent event) {
+ // update the palette if the palette service has changed
+ if (PapyrusPaletteService.getInstance().equals(event.getSource())) {
+ PapyrusPaletteService.getInstance().updatePalette(getPaletteViewer().getPaletteRoot(), this,
+ getDefaultPaletteContent());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ // remove palette service listener
+ // remove preference listener
+ PapyrusPaletteService.getInstance().removeProviderChangeListener(this);
+
+ if (dirtyState != null) {
+ dirtyState.dispose();
+ dirtyState = null;
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * @generated
+ */
+ protected PaletteViewer getPaletteViewer() {
+ return getEditDomain().getPaletteViewer();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected PaletteViewer constructPaletteViewer() {
+ return new PapyrusPaletteViewer();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected PaletteViewerProvider createPaletteViewerProvider() {
+ getEditDomain().setPaletteRoot(createPaletteRoot(null));
+ return new PaletteViewerProvider(getEditDomain()) {
+
+ /**
+ * Override to provide the additional behavior for the tools. Will intialize with a
+ * PaletteEditPartFactory that has a TrackDragger that understand how to handle the
+ * mouseDoubleClick event for shape creation tools. Also will initialize the palette
+ * with a defaultTool that is the SelectToolEx that undestands how to handle the enter
+ * key which will result in the creation of the shape also.
+ */
+ @Override
+ 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
+ // tools.
+ viewer.addDragSourceListener(new PaletteToolTransferDragSourceListener(viewer));
+ viewer.setCustomizer(createPaletteCustomizer());
+ }
+
+ @Override
+ public PaletteViewer createPaletteViewer(Composite parent) {
+ PaletteViewer pViewer = constructPaletteViewer();
+ pViewer.createControl(parent);
+ configurePaletteViewer(pViewer);
+ hookPaletteViewer(pViewer);
+ return pViewer;
+ }
+
+ /**
+ * @return Palette Key Handler for the palette
+ */
+ private KeyHandler getPaletteKeyHandler() {
+
+ if (paletteKeyHandler == null) {
+
+ paletteKeyHandler = new KeyHandler() {
+
+ /**
+ * Processes a <i>key released </i> event. This method is called by the Tool
+ * whenever a key is released, and the Tool is in the proper state. Override
+ * to support pressing the enter key to create a shape or connection
+ * (between two selected shapes)
+ *
+ * @param event
+ * the KeyEvent
+ * @return <code>true</code> if KeyEvent was handled in some way
+ */
+ @Override
+ 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;
+ }
+
+ /**
+ * @return Palette Mouse listener for the palette
+ */
+ private MouseListener getPaletteMouseListener() {
+
+ if (paletteMouseListener == null) {
+
+ paletteMouseListener = new MouseListener() {
+
+ /**
+ * Flag to indicate that the current active tool should be cleared after a
+ * mouse double-click event.
+ */
+ private boolean clearActiveTool = false;
+
+ /**
+ * Override to support double-clicking a palette tool entry to create a
+ * shape or connection (between two selected shapes).
+ *
+ * @see MouseListener#mouseDoubleClick(MouseEvent)
+ */
+ @Override
+ 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
+ // receiving mouse up events.
+ clearActiveTool = true;
+ }
+ }
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+ // do nothing
+ }
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ // Deactivate current active tool here if a
+ // double-click was handled.
+ if (clearActiveTool) {
+ getPaletteViewer().setActiveTool(null);
+ clearActiveTool = false;
+ }
+
+ }
+ };
+
+ }
+ return paletteMouseListener;
+ }
+
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public GraphicalViewer getGraphicalViewer() {
+ return super.getGraphicalViewer();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void initializeGraphicalViewer() {
+ super.initializeGraphicalViewer();
+
+ // Enable Drop
+ getDiagramGraphicalViewer().addDropTargetListener(
+ new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
+
+ @Override
+ protected Object getJavaObject(TransferData data) {
+ // It is usual for the transfer data not to be set because it is available locally
+ return LocalSelectionTransfer.getTransfer().getSelection();
+ }
+
+ @Override
+ protected TransactionalEditingDomain getTransactionalEditingDomain() {
+ return getEditingDomain();
+ }
+ });
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+ if (getSite().getPage().getActiveEditor() instanceof IMultiDiagramEditor) {
+ IMultiDiagramEditor editor = (IMultiDiagramEditor) getSite().getPage().getActiveEditor();
+ // If not the active editor, ignore selection changed.
+ if (this.equals(editor.getActiveEditor())) {
+ updateActions(getSelectionActions());
+ super.selectionChanged(part, selection);
+ } else {
+ super.selectionChanged(part, selection);
+ }
+ } else {
+ super.selectionChanged(part, selection);
+ }
+ // from
+ // org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.selectionChanged(IWorkbenchPart,
+ // ISelection)
+ if (part == this) {
+ rebuildStatusLine();
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditorPlugin.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditorPlugin.java
index d18fb5f108a..36cad0d14c0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditorPlugin.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditorPlugin.java
@@ -1,302 +1,302 @@
-/**
- * Copyright (c) 2014 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- * Christian W. Damus (CEA) - bug 410346
- */
-package org.eclipse.papyrus.uml.diagram.deployment.part;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.Activator;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.deployment.expressions.UMLOCLFactory;
-import org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramPreferenceInitializer;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * @generated
- */
-public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
-
- /**
- * @generated
- */
- public static final String ID = "org.eclipse.papyrus.uml.diagram.deployment"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private LogHelper myLogHelper;
-
- /**
- * @generated
- */
- public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(ID);
-
- /**
- * @generated
- */
- private static UMLDiagramEditorPlugin instance;
-
- /**
- * @generated
- */
- private AdapterFactory adapterFactory;
-
- /**
- * @generated
- */
- private UMLDocumentProvider documentProvider;
-
- /**
- * @generated
- */
- private UMLBaseItemSemanticEditPolicy.LinkConstraints linkConstraints;
-
- /**
- * @generated
- */
- private ElementInitializers initializers;
-
- /**
- * @generated
- */
- private UMLOCLFactory oclFactory;
-
- /**
- * @generated
- */
- public UMLDiagramEditorPlugin() {
- }
-
- /**
- * @generated
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- instance = this;
- myLogHelper = new LogHelper(this);
- PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
- adapterFactory = org.eclipse.papyrus.infra.gmfdiag.common.Activator.getInstance().getItemProvidersAdapterFactory();
- DiagramPreferenceInitializer diagramPreferenceInitializer = new DiagramPreferenceInitializer();
- diagramPreferenceInitializer.initializeDefaultPreferences();
-
- }
-
- /**
- * @generated
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- adapterFactory = null;
- linkConstraints = null;
- initializers = null;
- oclFactory = null;
- instance = null;
- super.stop(context);
- }
-
- /**
- * @generated
- */
- public static UMLDiagramEditorPlugin getInstance() {
- return instance;
- }
-
- /**
- * @generated
- */
- @Override
- public IPreferenceStore getPreferenceStore() {
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- return store;
- }
-
- /**
- * @generated
- */
- public AdapterFactory getItemProvidersAdapterFactory() {
- return adapterFactory;
- }
-
- /**
- * @generated
- */
- public ImageDescriptor getItemImageDescriptor(Object item) {
- IItemLabelProvider labelProvider =
- (IItemLabelProvider) adapterFactory.adapt(
- item, IItemLabelProvider.class);
- if (labelProvider != null) {
- return ExtendedImageRegistry.getInstance().getImageDescriptor(
- labelProvider.getImage(item));
- }
- return null;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @generated
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getBundledImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(ID, path);
- }
-
- /**
- * Respects images residing in any plug-in. If path is relative,
- * then this bundle is looked up for the image, otherwise, for absolute
- * path, first segment is taken as id of plug-in with image
- *
- * @generated
- * @param path
- * the path to image, either absolute (with plug-in id as first segment), or relative for bundled images
- * @return the image descriptor
- */
- public static ImageDescriptor findImageDescriptor(String path) {
- final IPath p = new Path(path);
- if (p.isAbsolute() && p.segmentCount() > 1) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(
- p.segment(0), p.removeFirstSegments(1).makeAbsolute().toString());
- } else {
- return getBundledImageDescriptor(p.makeAbsolute().toString());
- }
- }
-
- /**
- * Returns an image for the image file at the given plugin relative path.
- * Client do not need to dispose this image. Images will be disposed automatically.
- *
- * @generated
- * @param path
- * the path
- * @return image instance
- */
- public Image getBundledImage(String path) {
- Image image = getImageRegistry().get(path);
- if (image == null) {
- getImageRegistry().put(path, getBundledImageDescriptor(path));
- image = getImageRegistry().get(path);
- }
- return image;
- }
-
- /**
- * Returns string from plug-in's resource bundle
- *
- * @generated
- */
- public static String getString(String key) {
- return Platform.getResourceString(
- getInstance().getBundle(), "%" + key); //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- public UMLDocumentProvider getDocumentProvider() {
- if (documentProvider == null) {
- documentProvider = new UMLDocumentProvider();
- }
- return documentProvider;
- }
-
- /**
- * @generated
- */
- public UMLBaseItemSemanticEditPolicy.LinkConstraints getLinkConstraints() {
- return linkConstraints;
- }
-
- /**
- * @generated
- */
- public void setLinkConstraints(UMLBaseItemSemanticEditPolicy.LinkConstraints lc) {
- this.linkConstraints = lc;
- }
-
- /**
- * @generated
- */
- public ElementInitializers getElementInitializers() {
- return initializers;
- }
-
- /**
- * @generated
- */
- public void setElementInitializers(ElementInitializers i) {
- this.initializers = i;
- }
-
- /**
- * @generated
- */
- public UMLOCLFactory getUMLOCLFactory() {
- return oclFactory;
- }
-
- /**
- * @generated
- */
- public void setUMLOCLFactory(UMLOCLFactory f) {
- this.oclFactory = f;
- }
-
- /**
- * @generated
- */
- public void logError(String error) {
- getLogHelper().warn(error);
- }
-
- /**
- * @generated
- */
- public void logError(String error, Throwable throwable) {
- getLogHelper().error(error, throwable);
- }
-
- /**
- * @generated
- */
- public void logInfo(String message) {
- getLogHelper().info(message);
- }
-
- /**
- * @generated
- */
- public void logInfo(String message, Throwable throwable) {
- getLogHelper().error(message, throwable);
- }
-
- /**
- * @generated
- */
- public LogHelper getLogHelper() {
- return myLogHelper;
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 410346
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.part;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.Activator;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.policies.UMLBaseItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.deployment.expressions.UMLOCLFactory;
+import org.eclipse.papyrus.uml.diagram.deployment.preferences.DiagramPreferenceInitializer;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @generated
+ */
+public class UMLDiagramEditorPlugin extends AbstractUIPlugin {
+
+ /**
+ * @generated
+ */
+ public static final String ID = "org.eclipse.papyrus.uml.diagram.deployment"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private LogHelper myLogHelper;
+
+ /**
+ * @generated
+ */
+ public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(ID);
+
+ /**
+ * @generated
+ */
+ private static UMLDiagramEditorPlugin instance;
+
+ /**
+ * @generated
+ */
+ private AdapterFactory adapterFactory;
+
+ /**
+ * @generated
+ */
+ private UMLDocumentProvider documentProvider;
+
+ /**
+ * @generated
+ */
+ private UMLBaseItemSemanticEditPolicy.LinkConstraints linkConstraints;
+
+ /**
+ * @generated
+ */
+ private ElementInitializers initializers;
+
+ /**
+ * @generated
+ */
+ private UMLOCLFactory oclFactory;
+
+ /**
+ * @generated
+ */
+ public UMLDiagramEditorPlugin() {
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ instance = this;
+ myLogHelper = new LogHelper(this);
+ PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
+ adapterFactory = org.eclipse.papyrus.infra.gmfdiag.common.Activator.getInstance().getItemProvidersAdapterFactory();
+ DiagramPreferenceInitializer diagramPreferenceInitializer = new DiagramPreferenceInitializer();
+ diagramPreferenceInitializer.initializeDefaultPreferences();
+
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ adapterFactory = null;
+ linkConstraints = null;
+ initializers = null;
+ oclFactory = null;
+ instance = null;
+ super.stop(context);
+ }
+
+ /**
+ * @generated
+ */
+ public static UMLDiagramEditorPlugin getInstance() {
+ return instance;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IPreferenceStore getPreferenceStore() {
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ return store;
+ }
+
+ /**
+ * @generated
+ */
+ public AdapterFactory getItemProvidersAdapterFactory() {
+ return adapterFactory;
+ }
+
+ /**
+ * @generated
+ */
+ public ImageDescriptor getItemImageDescriptor(Object item) {
+ IItemLabelProvider labelProvider =
+ (IItemLabelProvider) adapterFactory.adapt(
+ item, IItemLabelProvider.class);
+ if (labelProvider != null) {
+ return ExtendedImageRegistry.getInstance().getImageDescriptor(
+ labelProvider.getImage(item));
+ }
+ return null;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path.
+ *
+ * @generated
+ * @param path
+ * the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getBundledImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(ID, path);
+ }
+
+ /**
+ * Respects images residing in any plug-in. If path is relative,
+ * then this bundle is looked up for the image, otherwise, for absolute
+ * path, first segment is taken as id of plug-in with image
+ *
+ * @generated
+ * @param path
+ * the path to image, either absolute (with plug-in id as first segment), or relative for bundled images
+ * @return the image descriptor
+ */
+ public static ImageDescriptor findImageDescriptor(String path) {
+ final IPath p = new Path(path);
+ if (p.isAbsolute() && p.segmentCount() > 1) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(
+ p.segment(0), p.removeFirstSegments(1).makeAbsolute().toString());
+ } else {
+ return getBundledImageDescriptor(p.makeAbsolute().toString());
+ }
+ }
+
+ /**
+ * Returns an image for the image file at the given plugin relative path.
+ * Client do not need to dispose this image. Images will be disposed automatically.
+ *
+ * @generated
+ * @param path
+ * the path
+ * @return image instance
+ */
+ public Image getBundledImage(String path) {
+ Image image = getImageRegistry().get(path);
+ if (image == null) {
+ getImageRegistry().put(path, getBundledImageDescriptor(path));
+ image = getImageRegistry().get(path);
+ }
+ return image;
+ }
+
+ /**
+ * Returns string from plug-in's resource bundle
+ *
+ * @generated
+ */
+ public static String getString(String key) {
+ return Platform.getResourceString(
+ getInstance().getBundle(), "%" + key); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ public UMLDocumentProvider getDocumentProvider() {
+ if (documentProvider == null) {
+ documentProvider = new UMLDocumentProvider();
+ }
+ return documentProvider;
+ }
+
+ /**
+ * @generated
+ */
+ public UMLBaseItemSemanticEditPolicy.LinkConstraints getLinkConstraints() {
+ return linkConstraints;
+ }
+
+ /**
+ * @generated
+ */
+ public void setLinkConstraints(UMLBaseItemSemanticEditPolicy.LinkConstraints lc) {
+ this.linkConstraints = lc;
+ }
+
+ /**
+ * @generated
+ */
+ public ElementInitializers getElementInitializers() {
+ return initializers;
+ }
+
+ /**
+ * @generated
+ */
+ public void setElementInitializers(ElementInitializers i) {
+ this.initializers = i;
+ }
+
+ /**
+ * @generated
+ */
+ public UMLOCLFactory getUMLOCLFactory() {
+ return oclFactory;
+ }
+
+ /**
+ * @generated
+ */
+ public void setUMLOCLFactory(UMLOCLFactory f) {
+ this.oclFactory = f;
+ }
+
+ /**
+ * @generated
+ */
+ public void logError(String error) {
+ getLogHelper().warn(error);
+ }
+
+ /**
+ * @generated
+ */
+ public void logError(String error, Throwable throwable) {
+ getLogHelper().error(error, throwable);
+ }
+
+ /**
+ * @generated
+ */
+ public void logInfo(String message) {
+ getLogHelper().info(message);
+ }
+
+ /**
+ * @generated
+ */
+ public void logInfo(String message, Throwable throwable) {
+ getLogHelper().error(message, throwable);
+ }
+
+ /**
+ * @generated
+ */
+ public LogHelper getLogHelper() {
+ return myLogHelper;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditorUtil.java
index 59a13b606fc..3e7ade10033 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditorUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramEditorUtil.java
@@ -1,360 +1,362 @@
-/**
- * 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.deployment.part;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.OperationHistoryFactory;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalViewer;
-import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.part.DefaultDiagramEditorUtil;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @generated
- */
-public class UMLDiagramEditorUtil {
-
- /**
- * @generated
- */
- public static Map<?, ?> getSaveOptions() {
- HashMap<String, Object> saveOptions = new HashMap<String, Object>();
- saveOptions.put(XMLResource.OPTION_ENCODING, "UTF-8"); //$NON-NLS-1$
- saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
- return saveOptions;
- }
-
- /**
- * @generated
- */
- public static boolean openDiagram(Resource diagram) throws PartInitException {
- String path = diagram.getURI().toPlatformString(true);
- IResource workspaceResource = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(path));
- if (workspaceResource instanceof IFile) {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- return null != page.openEditor(new FileEditorInput((IFile) workspaceResource), UMLDiagramEditor.ID);
- }
- return false;
- }
-
- /**
- * @generated
- */
- public static void setCharset(IFile file) {
- if (file == null) {
- return;
- }
- try {
- file.setCharset("UTF-8", new NullProgressMonitor()); //$NON-NLS-1$
- } catch (CoreException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to set charset for file " + file.getFullPath(), e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public static String getUniqueFileName(IPath containerFullPath, String fileName, String extension) {
- return DefaultDiagramEditorUtil.getUniqueFileName(containerFullPath, fileName, extension,
- DefaultDiagramEditorUtil.EXISTS_IN_WORKSPACE);
- }
-
- /**
- * Runs the wizard in a dialog.
- *
- * @generated
- */
- public static void runWizard(Shell shell, Wizard wizard, String settingsKey) {
- IDialogSettings pluginDialogSettings = UMLDiagramEditorPlugin.getInstance().getDialogSettings();
- IDialogSettings wizardDialogSettings = pluginDialogSettings.getSection(settingsKey);
- if (wizardDialogSettings == null) {
- wizardDialogSettings = pluginDialogSettings.addNewSection(settingsKey);
- }
- wizard.setDialogSettings(wizardDialogSettings);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500);
- dialog.open();
- }
-
- /**
- * This method should be called within a workspace modify operation since it creates resources.
- *
- * @generated
- */
- public static Resource createDiagram(URI diagramURI, URI modelURI, IProgressMonitor progressMonitor) {
- TransactionalEditingDomain editingDomain = WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain();
- progressMonitor.beginTask(Messages.UMLDiagramEditorUtil_CreateDiagramProgressTask, 3);
- final Resource diagramResource = editingDomain.getResourceSet().createResource(diagramURI);
- final Resource modelResource = editingDomain.getResourceSet().createResource(modelURI);
- final String diagramName = diagramURI.lastSegment();
- AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain, Messages.UMLDiagramEditorUtil_CreateDiagramCommandLabel, Collections.EMPTY_LIST) {
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- Package model = createInitialModel();
- attachModelToResource(model, modelResource);
-
- Diagram diagram = ViewService.createDiagram(
- model,
- DeploymentDiagramEditPart.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.deployment.part.UMLDiagramEditorUtil.getSaveOptions());
- diagramResource.save(org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorUtil.getSaveOptions());
- } catch (IOException e) {
-
- UMLDiagramEditorPlugin.getInstance().logError("Unable to store model and diagram resources", e); //$NON-NLS-1$
- }
- return CommandResult.newOKCommandResult();
- }
- };
- try {
- OperationHistoryFactory.getOperationHistory().execute(command, new SubProgressMonitor(progressMonitor, 1), null);
- } catch (ExecutionException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$
- }
- setCharset(WorkspaceSynchronizer.getFile(modelResource));
- setCharset(WorkspaceSynchronizer.getFile(diagramResource));
- return diagramResource;
- }
-
- /**
- * Create a new instance of domain element associated with canvas.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static Package createInitialModel() {
- return UMLFactory.eINSTANCE.createPackage();
- }
-
- /**
- * Store model element in the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static void attachModelToResource(Package model, Resource resource) {
- resource.getContents().add(model);
- }
-
- /**
- * @generated
- */
- public static void selectElementsInDiagram(IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
- diagramPart.getDiagramGraphicalViewer().deselectAll();
-
- EditPart firstPrimary = null;
- for (EditPart nextPart : editParts) {
- diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
- if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
- firstPrimary = nextPart;
- }
- }
-
- if (!editParts.isEmpty()) {
- diagramPart.getDiagramGraphicalViewer().reveal(firstPrimary != null ? firstPrimary : (EditPart) editParts.get(0));
- }
- }
-
- /**
- * @generated
- */
- 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) {
- editPartCollector.add(editPart);
- return 1;
- }
- }
-
- String elementID = EMFCoreUtil.getProxyID(element);
- @SuppressWarnings("unchecked")
- List<EditPart> associatedParts = viewer.findEditPartsForElement(elementID, IGraphicalEditPart.class);
- // perform the possible hierarchy disjoint -> take the top-most parts only
- for (EditPart nextPart : associatedParts) {
- EditPart parentPart = nextPart.getParent();
- while (parentPart != null && !associatedParts.contains(parentPart)) {
- parentPart = parentPart.getParent();
- }
- if (parentPart == null) {
- editPartCollector.add(nextPart);
- }
- }
-
- if (intialNumOfEditParts == editPartCollector.size()) {
- if (!associatedParts.isEmpty()) {
- editPartCollector.add(associatedParts.get(0));
- } else {
- if (element.eContainer() != null) {
- return findElementsInDiagramByID(diagramPart, element.eContainer(), editPartCollector);
- }
- }
- }
- return editPartCollector.size() - intialNumOfEditParts;
- }
-
- /**
- * @generated
- */
- public static View findView(DiagramEditPart diagramEditPart, EObject targetElement, LazyElement2ViewMap lazyElement2ViewMap) {
- boolean hasStructuralURI = false;
- 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()) {
- view = lazyElement2ViewMap.getElement2ViewMap().get(targetElement);
- } else if (findElementsInDiagramByID(diagramEditPart, targetElement, editPartHolder) > 0) {
- EditPart editPart = editPartHolder.get(0);
- view = editPart.getModel() instanceof View ? (View) editPart.getModel() : null;
- }
-
- return (view == null) ? diagramEditPart.getDiagramView() : view;
- }
-
- /**
- * XXX This is quite suspicious code (especially editPartTmpHolder) and likely to be removed soon
- *
- * @generated
- */
- public static class LazyElement2ViewMap {
-
- /**
- * @generated
- */
- private Map<EObject, View> element2ViewMap;
-
- /**
- * @generated
- */
- private View scope;
-
- /**
- * @generated
- */
- private Set<? extends EObject> elementSet;
-
- /**
- * @generated
- */
- public LazyElement2ViewMap(View scope, Set<? extends EObject> elements) {
- this.scope = scope;
- this.elementSet = elements;
- }
-
- /**
- * @generated
- */
- public final Map<EObject, View> getElement2ViewMap() {
- if (element2ViewMap == null) {
- element2ViewMap = new HashMap<EObject, View>();
- // map possible notation elements to itself as these can't be found by view.getElement()
- for (EObject element : elementSet) {
- if (element instanceof View) {
- View view = (View) element;
- if (view.getDiagram() == scope.getDiagram()) {
- element2ViewMap.put(element, view); // take only those that part of our diagram
- }
- }
- }
-
- buildElement2ViewMap(scope, element2ViewMap, elementSet);
- }
- return element2ViewMap;
- }
-
- /**
- * @generated
- */
- private static boolean buildElement2ViewMap(View parentView, Map<EObject, View> element2ViewMap, Set<? extends EObject> elements) {
- 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()) {
- return true;
- }
- }
- boolean complete = false;
- for (Iterator<?> it = parentView.getChildren().iterator(); it.hasNext() && !complete;) {
- complete = buildElement2ViewMap((View) it.next(), element2ViewMap, elements);
- }
- for (Iterator<?> it = parentView.getSourceEdges().iterator(); it.hasNext() && !complete;) {
- complete = buildElement2ViewMap((View) it.next(), element2ViewMap, elements);
- }
- for (Iterator<?> it = parentView.getTargetEdges().iterator(); it.hasNext() && !complete;) {
- complete = buildElement2ViewMap((View) it.next(), element2ViewMap, elements);
- }
- return complete;
- }
- } // LazyElement2ViewMap
-}
+/**
+ * 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.deployment.part;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.OperationHistoryFactory;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalViewer;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.part.DefaultDiagramEditorUtil;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * @generated
+ */
+public class UMLDiagramEditorUtil {
+
+ /**
+ * @generated
+ */
+ public static Map<?, ?> getSaveOptions() {
+ HashMap<String, Object> saveOptions = new HashMap<String, Object>();
+ saveOptions.put(XMLResource.OPTION_ENCODING, "UTF-8"); //$NON-NLS-1$
+ saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ return saveOptions;
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean openDiagram(Resource diagram) throws PartInitException {
+ String path = diagram.getURI().toPlatformString(true);
+ IResource workspaceResource = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(path));
+ if (workspaceResource instanceof IFile) {
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ return null != page.openEditor(new FileEditorInput((IFile) workspaceResource), UMLDiagramEditor.ID);
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public static void setCharset(IFile file) {
+ if (file == null) {
+ return;
+ }
+ try {
+ file.setCharset("UTF-8", new NullProgressMonitor()); //$NON-NLS-1$
+ } catch (CoreException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Unable to set charset for file " + file.getFullPath(), e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public static String getUniqueFileName(IPath containerFullPath, String fileName, String extension) {
+ return DefaultDiagramEditorUtil.getUniqueFileName(containerFullPath, fileName, extension,
+ DefaultDiagramEditorUtil.EXISTS_IN_WORKSPACE);
+ }
+
+ /**
+ * Runs the wizard in a dialog.
+ *
+ * @generated
+ */
+ public static void runWizard(Shell shell, Wizard wizard, String settingsKey) {
+ IDialogSettings pluginDialogSettings = UMLDiagramEditorPlugin.getInstance().getDialogSettings();
+ IDialogSettings wizardDialogSettings = pluginDialogSettings.getSection(settingsKey);
+ if (wizardDialogSettings == null) {
+ wizardDialogSettings = pluginDialogSettings.addNewSection(settingsKey);
+ }
+ wizard.setDialogSettings(wizardDialogSettings);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.create();
+ dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500);
+ dialog.open();
+ }
+
+ /**
+ * This method should be called within a workspace modify operation since it creates resources.
+ *
+ * @generated
+ */
+ public static Resource createDiagram(URI diagramURI, URI modelURI, IProgressMonitor progressMonitor) {
+ TransactionalEditingDomain editingDomain = WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain();
+ progressMonitor.beginTask(Messages.UMLDiagramEditorUtil_CreateDiagramProgressTask, 3);
+ final Resource diagramResource = editingDomain.getResourceSet().createResource(diagramURI);
+ final Resource modelResource = editingDomain.getResourceSet().createResource(modelURI);
+ final String diagramName = diagramURI.lastSegment();
+ AbstractTransactionalCommand command = new AbstractTransactionalCommand(editingDomain, Messages.UMLDiagramEditorUtil_CreateDiagramCommandLabel, Collections.EMPTY_LIST) {
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Package model = createInitialModel();
+ attachModelToResource(model, modelResource);
+
+ Diagram diagram = ViewService.createDiagram(
+ model,
+ DeploymentDiagramEditPart.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.deployment.part.UMLDiagramEditorUtil.getSaveOptions());
+ diagramResource.save(org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorUtil.getSaveOptions());
+ } catch (IOException e) {
+
+ UMLDiagramEditorPlugin.getInstance().logError("Unable to store model and diagram resources", e); //$NON-NLS-1$
+ }
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ try {
+ OperationHistoryFactory.getOperationHistory().execute(command, new SubProgressMonitor(progressMonitor, 1), null);
+ } catch (ExecutionException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$
+ }
+ setCharset(WorkspaceSynchronizer.getFile(modelResource));
+ setCharset(WorkspaceSynchronizer.getFile(diagramResource));
+ return diagramResource;
+ }
+
+ /**
+ * Create a new instance of domain element associated with canvas.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static Package createInitialModel() {
+ return UMLFactory.eINSTANCE.createPackage();
+ }
+
+ /**
+ * Store model element in the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static void attachModelToResource(Package model, Resource resource) {
+ resource.getContents().add(model);
+ }
+
+ /**
+ * @generated
+ */
+ public static void selectElementsInDiagram(IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
+ diagramPart.getDiagramGraphicalViewer().deselectAll();
+
+ EditPart firstPrimary = null;
+ for (EditPart nextPart : editParts) {
+ diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
+ if (firstPrimary == null && nextPart instanceof IPrimaryEditPart) {
+ firstPrimary = nextPart;
+ }
+ }
+
+ if (!editParts.isEmpty()) {
+ diagramPart.getDiagramGraphicalViewer().reveal(firstPrimary != null ? firstPrimary : (EditPart) editParts.get(0));
+ }
+ }
+
+ /**
+ * @generated
+ */
+ 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) {
+ editPartCollector.add(editPart);
+ return 1;
+ }
+ }
+
+ String elementID = EMFCoreUtil.getProxyID(element);
+ @SuppressWarnings("unchecked")
+ List<EditPart> associatedParts = viewer.findEditPartsForElement(elementID, IGraphicalEditPart.class);
+ // perform the possible hierarchy disjoint -> take the top-most parts only
+ for (EditPart nextPart : associatedParts) {
+ EditPart parentPart = nextPart.getParent();
+ while (parentPart != null && !associatedParts.contains(parentPart)) {
+ parentPart = parentPart.getParent();
+ }
+ if (parentPart == null) {
+ editPartCollector.add(nextPart);
+ }
+ }
+
+ if (intialNumOfEditParts == editPartCollector.size()) {
+ if (!associatedParts.isEmpty()) {
+ editPartCollector.add(associatedParts.get(0));
+ } else {
+ if (element.eContainer() != null) {
+ return findElementsInDiagramByID(diagramPart, element.eContainer(), editPartCollector);
+ }
+ }
+ }
+ return editPartCollector.size() - intialNumOfEditParts;
+ }
+
+ /**
+ * @generated
+ */
+ public static View findView(DiagramEditPart diagramEditPart, EObject targetElement, LazyElement2ViewMap lazyElement2ViewMap) {
+ boolean hasStructuralURI = false;
+ 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()) {
+ view = lazyElement2ViewMap.getElement2ViewMap().get(targetElement);
+ } else if (findElementsInDiagramByID(diagramEditPart, targetElement, editPartHolder) > 0) {
+ EditPart editPart = editPartHolder.get(0);
+ view = editPart.getModel() instanceof View ? (View) editPart.getModel() : null;
+ }
+
+ return (view == null) ? diagramEditPart.getDiagramView() : view;
+ }
+
+ /**
+ * XXX This is quite suspicious code (especially editPartTmpHolder) and likely to be removed soon
+ *
+ * @generated
+ */
+ public static class LazyElement2ViewMap {
+
+ /**
+ * @generated
+ */
+ private Map<EObject, View> element2ViewMap;
+
+ /**
+ * @generated
+ */
+ private View scope;
+
+ /**
+ * @generated
+ */
+ private Set<? extends EObject> elementSet;
+
+ /**
+ * @generated
+ */
+ public LazyElement2ViewMap(View scope, Set<? extends EObject> elements) {
+ this.scope = scope;
+ this.elementSet = elements;
+ }
+
+ /**
+ * @generated
+ */
+ public final Map<EObject, View> getElement2ViewMap() {
+ if (element2ViewMap == null) {
+ element2ViewMap = new HashMap<EObject, View>();
+ // map possible notation elements to itself as these can't be found by view.getElement()
+ for (EObject element : elementSet) {
+ if (element instanceof View) {
+ View view = (View) element;
+ if (view.getDiagram() == scope.getDiagram()) {
+ element2ViewMap.put(element, view); // take only those that part of our diagram
+ }
+ }
+ }
+
+ buildElement2ViewMap(scope, element2ViewMap, elementSet);
+ }
+ return element2ViewMap;
+ }
+
+ /**
+ * @generated
+ */
+ private static boolean buildElement2ViewMap(View parentView, Map<EObject, View> element2ViewMap, Set<? extends EObject> elements) {
+ 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()) {
+ return true;
+ }
+ }
+ boolean complete = false;
+ for (Iterator<?> it = parentView.getChildren().iterator(); it.hasNext() && !complete;) {
+ complete = buildElement2ViewMap((View) it.next(), element2ViewMap, elements);
+ }
+ for (Iterator<?> it = parentView.getSourceEdges().iterator(); it.hasNext() && !complete;) {
+ complete = buildElement2ViewMap((View) it.next(), element2ViewMap, elements);
+ }
+ for (Iterator<?> it = parentView.getTargetEdges().iterator(); it.hasNext() && !complete;) {
+ complete = buildElement2ViewMap((View) it.next(), element2ViewMap, elements);
+ }
+ return complete;
+ }
+ } // LazyElement2ViewMap
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramUpdater.java
index 7f61708e27a..564722f3461 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDiagramUpdater.java
@@ -1,2929 +1,2929 @@
-/**
- * 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.deployment.part;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.core.util.CrossReferenceAdapter;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackagePackageableElementCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackagePackageableElementCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.uml2.uml.Artifact;
-import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Dependency;
-import org.eclipse.uml2.uml.Deployment;
-import org.eclipse.uml2.uml.DeploymentTarget;
-import org.eclipse.uml2.uml.Device;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExecutionEnvironment;
-import org.eclipse.uml2.uml.Generalization;
-import org.eclipse.uml2.uml.Manifestation;
-import org.eclipse.uml2.uml.Model;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Node;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.PackageableElement;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class UMLDiagramUpdater implements DiagramUpdater {
-
- /**
- * @generated
- */
- public static final org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater INSTANCE = new UMLDiagramUpdater();
-
- /**
- * @generated
- */
- protected UMLDiagramUpdater() {
- //to prevent instantiation allowing the override
- }
-
- /**
- * @generated
- */
- @Override
- public List<UMLNodeDescriptor> getSemanticChildren(View view) {
- switch (UMLVisualIDRegistry.getVisualID(view)) {
- case DeploymentDiagramEditPart.VISUAL_ID:
- return getPackage_1000SemanticChildren(view);
- case ModelPackageableElementCompartmentEditPart.VISUAL_ID:
- return getModelModelCompartment_51SemanticChildren(view);
- case PackagePackageableElementCompartmentEditPart.VISUAL_ID:
- return getPackagePackageableElementCompartment_38SemanticChildren(view);
- case DeviceCompositeCompartmentEditPart.VISUAL_ID:
- return getDeviceDeviceCompositeCompartment_17SemanticChildren(view);
- case ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID:
- return getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_18SemanticChildren(view);
- case NodeCompositeCompartmentEditPart.VISUAL_ID:
- return getNodeCompositeCompartment_19SemanticChildren(view);
- case ArtifactCompositeCompartmentEditPart.VISUAL_ID:
- return getArtifactArtifactCompositeCompartment_26SemanticChildren(view);
- case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
- return getModelModelCompartment_52SemanticChildren(view);
- case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
- return getPackagePackageableElementCompartment_39SemanticChildren(view);
- case DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
- return getDeviceDeviceCompositeCompartment_30SemanticChildren(view);
- case ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
- return getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_31SemanticChildren(view);
- case NodeCompositeCompartmentEditPartCN.VISUAL_ID:
- return getNodeCompositeCompartment_32SemanticChildren(view);
- case ArtifactCompositeCompartmentEditPartCN.VISUAL_ID:
- return getArtifactArtifactCompositeCompartment_33SemanticChildren(view);
- case ArtifactCompositeCompartmentEditPartACN.VISUAL_ID:
- return getArtifactArtifactCompositeCompartment_34SemanticChildren(view);
- }
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getPackage_1000SemanticChildren(View view) {
- if (!view.isSetElement()) {
- return Collections.emptyList();
- }
- Package modelElement = (Package) view.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getPackagedElements()
- .iterator(); it.hasNext();) {
- PackageableElement childElement = (PackageableElement) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DependencyNodeEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == ModelEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == PackageEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == ExecutionEnvironmentEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == DeviceEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == ArtifactEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NodeEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == DefaultNamedElementEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ConstraintEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPart.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getModelModelCompartment_51SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Model modelElement = (Model) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getPackagedElements()
- .iterator(); it.hasNext();) {
- PackageableElement childElement = (PackageableElement) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ModelEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == PackageEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedDeviceEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedExecutionEnvironmentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedNodeEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedArtifactNodeEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getPackagePackageableElementCompartment_38SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Package modelElement = (Package) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getPackagedElements()
- .iterator(); it.hasNext();) {
- PackageableElement childElement = (PackageableElement) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ModelEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == PackageEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedArtifactNodeEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedDeviceEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedExecutionEnvironmentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedNodeEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getDeviceDeviceCompositeCompartment_17SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Device modelElement = (Device) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getNestedNodes()
- .iterator(); it.hasNext();) {
- Node childElement = (Node) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == DeviceEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NodeEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_18SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- ExecutionEnvironment modelElement = (ExecutionEnvironment) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getNestedNodes()
- .iterator(); it.hasNext();) {
- Node childElement = (Node) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getNodeCompositeCompartment_19SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Node modelElement = (Node) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getNestedNodes()
- .iterator(); it.hasNext();) {
- Node childElement = (Node) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DeviceEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NodeEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getArtifactArtifactCompositeCompartment_26SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Artifact modelElement = (Artifact) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getNestedArtifacts()
- .iterator(); it.hasNext();) {
- Artifact childElement = (Artifact) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ArtifactEditPartACN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getModelModelCompartment_52SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Model modelElement = (Model) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getPackagedElements()
- .iterator(); it.hasNext();) {
- PackageableElement childElement = (PackageableElement) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ModelEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == PackageEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedDeviceEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedExecutionEnvironmentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedNodeEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedArtifactNodeEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getPackagePackageableElementCompartment_39SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Package modelElement = (Package) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getPackagedElements()
- .iterator(); it.hasNext();) {
- PackageableElement childElement = (PackageableElement) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == PackageEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedArtifactNodeEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedDeviceEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedExecutionEnvironmentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NestedNodeEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedComments()
- .iterator(); it.hasNext();) {
- Comment childElement = (Comment) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == CommentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getOwnedRules()
- .iterator(); it.hasNext();) {
- Constraint childElement = (Constraint) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ConstraintEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getDeviceDeviceCompositeCompartment_30SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Device modelElement = (Device) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getNestedNodes()
- .iterator(); it.hasNext();) {
- Node childElement = (Node) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == DeviceEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NodeEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_31SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- ExecutionEnvironment modelElement = (ExecutionEnvironment) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getNestedNodes()
- .iterator(); it.hasNext();) {
- Node childElement = (Node) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getNodeCompositeCompartment_32SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Node modelElement = (Node) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getNestedNodes()
- .iterator(); it.hasNext();) {
- Node childElement = (Node) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == DeviceEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- if (visualID == NodeEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- for (Iterator<?> it = modelElement.getNestedClassifiers()
- .iterator(); it.hasNext();) {
- Classifier childElement = (Classifier) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ArtifactEditPartCN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getArtifactArtifactCompositeCompartment_33SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Artifact modelElement = (Artifact) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getNestedArtifacts()
- .iterator(); it.hasNext();) {
- Artifact childElement = (Artifact) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ArtifactEditPartACN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLNodeDescriptor> getArtifactArtifactCompositeCompartment_34SemanticChildren(View view) {
- if (false == view.eContainer() instanceof View) {
- return Collections.emptyList();
- }
- View containerView = (View) view.eContainer();
- if (!containerView.isSetElement()) {
- return Collections.emptyList();
- }
- Artifact modelElement = (Artifact) containerView.getElement();
- LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
- for (Iterator<?> it = modelElement.getNestedArtifacts()
- .iterator(); it.hasNext();) {
- Artifact childElement = (Artifact) it.next();
- int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
- if (visualID == ArtifactEditPartACN.VISUAL_ID) {
- result.add(new UMLNodeDescriptor(childElement, visualID));
- continue;
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- public List<UMLLinkDescriptor> getContainedLinks(View view) {
- switch (UMLVisualIDRegistry.getVisualID(view)) {
- case DeploymentDiagramEditPart.VISUAL_ID:
- return getPackage_1000ContainedLinks(view);
- case DependencyNodeEditPart.VISUAL_ID:
- return getDependency_2011ContainedLinks(view);
- case ModelEditPart.VISUAL_ID:
- return getModel_2010ContainedLinks(view);
- case PackageEditPart.VISUAL_ID:
- return getPackage_2009ContainedLinks(view);
- case ConstraintEditPart.VISUAL_ID:
- return getConstraint_2005ContainedLinks(view);
- case CommentEditPart.VISUAL_ID:
- return getComment_2001ContainedLinks(view);
- case ExecutionEnvironmentEditPart.VISUAL_ID:
- return getExecutionEnvironment_2002ContainedLinks(view);
- case DeviceEditPart.VISUAL_ID:
- return getDevice_2003ContainedLinks(view);
- case ArtifactEditPart.VISUAL_ID:
- return getArtifact_2006ContainedLinks(view);
- case NodeEditPart.VISUAL_ID:
- return getNode_2008ContainedLinks(view);
- case DefaultNamedElementEditPart.VISUAL_ID:
- return getNamedElement_2012ContainedLinks(view);
- case ModelEditPartCN.VISUAL_ID:
- return getModel_49ContainedLinks(view);
- case PackageEditPartCN.VISUAL_ID:
- return getPackage_36ContainedLinks(view);
- case DeviceEditPartCN.VISUAL_ID:
- return getDevice_16ContainedLinks(view);
- case NestedDeviceEditPartCN.VISUAL_ID:
- return getDevice_44ContainedLinks(view);
- case ExecutionEnvironmentEditPartCN.VISUAL_ID:
- return getExecutionEnvironment_21ContainedLinks(view);
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
- return getExecutionEnvironment_46ContainedLinks(view);
- case NodeEditPartCN.VISUAL_ID:
- return getNode_23ContainedLinks(view);
- case NestedNodeEditPartCN.VISUAL_ID:
- return getNode_42ContainedLinks(view);
- case ArtifactEditPartCN.VISUAL_ID:
- return getArtifact_25ContainedLinks(view);
- case ArtifactEditPartACN.VISUAL_ID:
- return getArtifact_28ContainedLinks(view);
- case NestedArtifactNodeEditPartCN.VISUAL_ID:
- return getArtifact_40ContainedLinks(view);
- case CommentEditPartCN.VISUAL_ID:
- return getComment_54ContainedLinks(view);
- case ConstraintEditPartCN.VISUAL_ID:
- return getConstraint_56ContainedLinks(view);
- case DeploymentEditPart.VISUAL_ID:
- return getDeployment_4001ContainedLinks(view);
- case ManifestationEditPart.VISUAL_ID:
- return getManifestation_4002ContainedLinks(view);
- case GeneralizationEditPart.VISUAL_ID:
- return getGeneralization_4003ContainedLinks(view);
- case DependencyEditPart.VISUAL_ID:
- return getDependency_4004ContainedLinks(view);
- case DependencyBranchEditPart.VISUAL_ID:
- return getDependency_4010ContainedLinks(view);
- }
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- @Override
- public List<UMLLinkDescriptor> getIncomingLinks(View view) {
- switch (UMLVisualIDRegistry.getVisualID(view)) {
- case DependencyNodeEditPart.VISUAL_ID:
- return getDependency_2011IncomingLinks(view);
- case ModelEditPart.VISUAL_ID:
- return getModel_2010IncomingLinks(view);
- case PackageEditPart.VISUAL_ID:
- return getPackage_2009IncomingLinks(view);
- case ConstraintEditPart.VISUAL_ID:
- return getConstraint_2005IncomingLinks(view);
- case CommentEditPart.VISUAL_ID:
- return getComment_2001IncomingLinks(view);
- case ExecutionEnvironmentEditPart.VISUAL_ID:
- return getExecutionEnvironment_2002IncomingLinks(view);
- case DeviceEditPart.VISUAL_ID:
- return getDevice_2003IncomingLinks(view);
- case ArtifactEditPart.VISUAL_ID:
- return getArtifact_2006IncomingLinks(view);
- case NodeEditPart.VISUAL_ID:
- return getNode_2008IncomingLinks(view);
- case DefaultNamedElementEditPart.VISUAL_ID:
- return getNamedElement_2012IncomingLinks(view);
- case ModelEditPartCN.VISUAL_ID:
- return getModel_49IncomingLinks(view);
- case PackageEditPartCN.VISUAL_ID:
- return getPackage_36IncomingLinks(view);
- case DeviceEditPartCN.VISUAL_ID:
- return getDevice_16IncomingLinks(view);
- case NestedDeviceEditPartCN.VISUAL_ID:
- return getDevice_44IncomingLinks(view);
- case ExecutionEnvironmentEditPartCN.VISUAL_ID:
- return getExecutionEnvironment_21IncomingLinks(view);
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
- return getExecutionEnvironment_46IncomingLinks(view);
- case NodeEditPartCN.VISUAL_ID:
- return getNode_23IncomingLinks(view);
- case NestedNodeEditPartCN.VISUAL_ID:
- return getNode_42IncomingLinks(view);
- case ArtifactEditPartCN.VISUAL_ID:
- return getArtifact_25IncomingLinks(view);
- case ArtifactEditPartACN.VISUAL_ID:
- return getArtifact_28IncomingLinks(view);
- case NestedArtifactNodeEditPartCN.VISUAL_ID:
- return getArtifact_40IncomingLinks(view);
- case CommentEditPartCN.VISUAL_ID:
- return getComment_54IncomingLinks(view);
- case ConstraintEditPartCN.VISUAL_ID:
- return getConstraint_56IncomingLinks(view);
- case DeploymentEditPart.VISUAL_ID:
- return getDeployment_4001IncomingLinks(view);
- case ManifestationEditPart.VISUAL_ID:
- return getManifestation_4002IncomingLinks(view);
- case GeneralizationEditPart.VISUAL_ID:
- return getGeneralization_4003IncomingLinks(view);
- case DependencyEditPart.VISUAL_ID:
- return getDependency_4004IncomingLinks(view);
- case DependencyBranchEditPart.VISUAL_ID:
- return getDependency_4010IncomingLinks(view);
- }
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- @Override
- public List<UMLLinkDescriptor> getOutgoingLinks(View view) {
- switch (UMLVisualIDRegistry.getVisualID(view)) {
- case DependencyNodeEditPart.VISUAL_ID:
- return getDependency_2011OutgoingLinks(view);
- case ModelEditPart.VISUAL_ID:
- return getModel_2010OutgoingLinks(view);
- case PackageEditPart.VISUAL_ID:
- return getPackage_2009OutgoingLinks(view);
- case ConstraintEditPart.VISUAL_ID:
- return getConstraint_2005OutgoingLinks(view);
- case CommentEditPart.VISUAL_ID:
- return getComment_2001OutgoingLinks(view);
- case ExecutionEnvironmentEditPart.VISUAL_ID:
- return getExecutionEnvironment_2002OutgoingLinks(view);
- case DeviceEditPart.VISUAL_ID:
- return getDevice_2003OutgoingLinks(view);
- case ArtifactEditPart.VISUAL_ID:
- return getArtifact_2006OutgoingLinks(view);
- case NodeEditPart.VISUAL_ID:
- return getNode_2008OutgoingLinks(view);
- case DefaultNamedElementEditPart.VISUAL_ID:
- return getNamedElement_2012OutgoingLinks(view);
- case ModelEditPartCN.VISUAL_ID:
- return getModel_49OutgoingLinks(view);
- case PackageEditPartCN.VISUAL_ID:
- return getPackage_36OutgoingLinks(view);
- case DeviceEditPartCN.VISUAL_ID:
- return getDevice_16OutgoingLinks(view);
- case NestedDeviceEditPartCN.VISUAL_ID:
- return getDevice_44OutgoingLinks(view);
- case ExecutionEnvironmentEditPartCN.VISUAL_ID:
- return getExecutionEnvironment_21OutgoingLinks(view);
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
- return getExecutionEnvironment_46OutgoingLinks(view);
- case NodeEditPartCN.VISUAL_ID:
- return getNode_23OutgoingLinks(view);
- case NestedNodeEditPartCN.VISUAL_ID:
- return getNode_42OutgoingLinks(view);
- case ArtifactEditPartCN.VISUAL_ID:
- return getArtifact_25OutgoingLinks(view);
- case ArtifactEditPartACN.VISUAL_ID:
- return getArtifact_28OutgoingLinks(view);
- case NestedArtifactNodeEditPartCN.VISUAL_ID:
- return getArtifact_40OutgoingLinks(view);
- case CommentEditPartCN.VISUAL_ID:
- return getComment_54OutgoingLinks(view);
- case ConstraintEditPartCN.VISUAL_ID:
- return getConstraint_56OutgoingLinks(view);
- case DeploymentEditPart.VISUAL_ID:
- return getDeployment_4001OutgoingLinks(view);
- case ManifestationEditPart.VISUAL_ID:
- return getManifestation_4002OutgoingLinks(view);
- case GeneralizationEditPart.VISUAL_ID:
- return getGeneralization_4003OutgoingLinks(view);
- case DependencyEditPart.VISUAL_ID:
- return getDependency_4004OutgoingLinks(view);
- case DependencyBranchEditPart.VISUAL_ID:
- return getDependency_4010OutgoingLinks(view);
- }
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getPackage_1000ContainedLinks(View view) {
- Package modelElement = (Package) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDependency_2011ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getModel_2010ContainedLinks(View view) {
- Model modelElement = (Model) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getPackage_2009ContainedLinks(View view) {
- Package modelElement = (Package) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getConstraint_2005ContainedLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getComment_2001ContainedLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getExecutionEnvironment_2002ContainedLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDevice_2003ContainedLinks(View view) {
- Device modelElement = (Device) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getArtifact_2006ContainedLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getNode_2008ContainedLinks(View view) {
- Node modelElement = (Node) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getNamedElement_2012ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getModel_49ContainedLinks(View view) {
- Model modelElement = (Model) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getPackage_36ContainedLinks(View view) {
- Package modelElement = (Package) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDevice_16ContainedLinks(View view) {
- Device modelElement = (Device) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDevice_44ContainedLinks(View view) {
- Device modelElement = (Device) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getExecutionEnvironment_21ContainedLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getExecutionEnvironment_46ContainedLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getNode_23ContainedLinks(View view) {
- Node modelElement = (Node) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getNode_42ContainedLinks(View view) {
- Node modelElement = (Node) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getArtifact_25ContainedLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getArtifact_28ContainedLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getArtifact_40ContainedLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getComment_54ContainedLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getConstraint_56ContainedLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDeployment_4001ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getManifestation_4002ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getGeneralization_4003ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDependency_4004ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDependency_4010ContainedLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDependency_2011IncomingLinks(View view) {
- Dependency modelElement = (Dependency) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getModel_2010IncomingLinks(View view) {
- Model modelElement = (Model) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getPackage_2009IncomingLinks(View view) {
- Package modelElement = (Package) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getConstraint_2005IncomingLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getComment_2001IncomingLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getExecutionEnvironment_2002IncomingLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDevice_2003IncomingLinks(View view) {
- Device modelElement = (Device) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getArtifact_2006IncomingLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getNode_2008IncomingLinks(View view) {
- Node modelElement = (Node) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getNamedElement_2012IncomingLinks(View view) {
- NamedElement modelElement = (NamedElement) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getModel_49IncomingLinks(View view) {
- Model modelElement = (Model) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getPackage_36IncomingLinks(View view) {
- Package modelElement = (Package) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDevice_16IncomingLinks(View view) {
- Device modelElement = (Device) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDevice_44IncomingLinks(View view) {
- Device modelElement = (Device) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getExecutionEnvironment_21IncomingLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getExecutionEnvironment_46IncomingLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getNode_23IncomingLinks(View view) {
- Node modelElement = (Node) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getNode_42IncomingLinks(View view) {
- Node modelElement = (Node) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getArtifact_25IncomingLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getArtifact_28IncomingLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getArtifact_40IncomingLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getComment_54IncomingLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getConstraint_56IncomingLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDeployment_4001IncomingLinks(View view) {
- Deployment modelElement = (Deployment) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getManifestation_4002IncomingLinks(View view) {
- Manifestation modelElement = (Manifestation) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getGeneralization_4003IncomingLinks(View view) {
- Generalization modelElement = (Generalization) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDependency_4004IncomingLinks(View view) {
- Dependency modelElement = (Dependency) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDependency_4010IncomingLinks(View view) {
- Dependency modelElement = (Dependency) view.getElement();
- CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
- (modelElement, crossReferencer));
- result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
- (modelElement, crossReferencer));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDependency_2011OutgoingLinks(View view) {
- Dependency modelElement = (Dependency) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getModel_2010OutgoingLinks(View view) {
- Model modelElement = (Model) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getPackage_2009OutgoingLinks(View view) {
- Package modelElement = (Package) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getConstraint_2005OutgoingLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getComment_2001OutgoingLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getExecutionEnvironment_2002OutgoingLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDevice_2003OutgoingLinks(View view) {
- Device modelElement = (Device) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getArtifact_2006OutgoingLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getNode_2008OutgoingLinks(View view) {
- Node modelElement = (Node) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getNamedElement_2012OutgoingLinks(View view) {
- NamedElement modelElement = (NamedElement) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getModel_49OutgoingLinks(View view) {
- Model modelElement = (Model) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getPackage_36OutgoingLinks(View view) {
- Package modelElement = (Package) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDevice_16OutgoingLinks(View view) {
- Device modelElement = (Device) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDevice_44OutgoingLinks(View view) {
- Device modelElement = (Device) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getExecutionEnvironment_21OutgoingLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getExecutionEnvironment_46OutgoingLinks(View view) {
- ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getNode_23OutgoingLinks(View view) {
- Node modelElement = (Node) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getNode_42OutgoingLinks(View view) {
- Node modelElement = (Node) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getArtifact_25OutgoingLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getArtifact_28OutgoingLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getArtifact_40OutgoingLinks(View view) {
- Artifact modelElement = (Artifact) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getComment_54OutgoingLinks(View view) {
- Comment modelElement = (Comment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getConstraint_56OutgoingLinks(View view) {
- Constraint modelElement = (Constraint) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDeployment_4001OutgoingLinks(View view) {
- Deployment modelElement = (Deployment) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getManifestation_4002OutgoingLinks(View view) {
- Manifestation modelElement = (Manifestation) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getGeneralization_4003OutgoingLinks(View view) {
- return Collections.emptyList();
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDependency_4004OutgoingLinks(View view) {
- Dependency modelElement = (Dependency) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- public List<UMLLinkDescriptor> getDependency_4010OutgoingLinks(View view) {
- Dependency modelElement = (Dependency) view.getElement();
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
- (modelElement));
- result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
- (modelElement));
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Deployment_4001(DeploymentTarget container) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> links = container.getDeployments()
- .iterator(); links.hasNext();) {
- EObject linkObject = (EObject) links.next();
- if (false == linkObject instanceof Deployment) {
- continue;
- }
- Deployment link = (Deployment) linkObject;
- if (DeploymentEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- 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();
- Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
- continue;
- }
- NamedElement src = (NamedElement) theSource;
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Deployment_4001, DeploymentEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Manifestation_4002(Artifact container) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> links = container.getManifestations()
- .iterator(); links.hasNext();) {
- EObject linkObject = (EObject) links.next();
- if (false == linkObject instanceof Manifestation) {
- continue;
- }
- Manifestation link = (Manifestation) linkObject;
- if (ManifestationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- 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();
- Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
- continue;
- }
- NamedElement src = (NamedElement) theSource;
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Manifestation_4002, ManifestationEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Generalization_4003(Classifier container) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> links = container.getGeneralizations()
- .iterator(); links.hasNext();) {
- EObject linkObject = (EObject) links.next();
- if (false == linkObject instanceof Generalization) {
- continue;
- }
- Generalization link = (Generalization) linkObject;
- if (GeneralizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- Classifier dst = link.getGeneral();
- Classifier src = link.getSpecific();
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Generalization_4003, GeneralizationEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Dependency_4004(Package container) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> links = container.getPackagedElements()
- .iterator(); links.hasNext();) {
- EObject linkObject = (EObject) links.next();
- if (false == linkObject instanceof Dependency) {
- continue;
- }
- Dependency link = (Dependency) linkObject;
- if (DependencyEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- 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();
- Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
- continue;
- }
- NamedElement src = (NamedElement) theSource;
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Dependency_4004, DependencyEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Dependency_4010(Package container) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> links = container.getPackagedElements()
- .iterator(); links.hasNext();) {
- EObject linkObject = (EObject) links.next();
- if (false == linkObject instanceof Dependency) {
- continue;
- }
- Dependency link = (Dependency) linkObject;
- if (DependencyBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- 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();
- Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
- continue;
- }
- NamedElement src = (NamedElement) theSource;
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Dependency_4010, DependencyBranchEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008(Element target, CrossReferenceAdapter crossReferencer) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
- for (EStructuralFeature.Setting setting : settings) {
- if (setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getComment_AnnotatedElement()) {
- result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.CommentAnnotatedElement_4008, CommentAnnotatedElementEditPart.VISUAL_ID));
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009(Element target, CrossReferenceAdapter crossReferencer) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
- for (EStructuralFeature.Setting setting : settings) {
- if (setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getConstraint_ConstrainedElement()) {
- result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.ConstraintConstrainedElement_4009, ConstraintConstrainedElementEditPart.VISUAL_ID));
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Deployment_4001(NamedElement target, CrossReferenceAdapter crossReferencer) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
- for (EStructuralFeature.Setting setting : settings) {
- if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Deployment) {
- continue;
- }
- Deployment link = (Deployment) setting.getEObject();
- if (DeploymentEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- List<?> sources = link.getClients();
- Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
- continue;
- }
- NamedElement src = (NamedElement) theSource;
- result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Deployment_4001, DeploymentEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Manifestation_4002(NamedElement target, CrossReferenceAdapter crossReferencer) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
- for (EStructuralFeature.Setting setting : settings) {
- if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Manifestation) {
- continue;
- }
- Manifestation link = (Manifestation) setting.getEObject();
- if (ManifestationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- List<?> sources = link.getClients();
- Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
- continue;
- }
- NamedElement src = (NamedElement) theSource;
- result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Manifestation_4002, ManifestationEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Generalization_4003(Classifier target, CrossReferenceAdapter crossReferencer) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
- for (EStructuralFeature.Setting setting : settings) {
- if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getGeneralization_General() || false == setting.getEObject() instanceof Generalization) {
- continue;
- }
- Generalization link = (Generalization) setting.getEObject();
- if (GeneralizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- Classifier src = link.getSpecific();
- result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Generalization_4003, GeneralizationEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Dependency_4004(NamedElement target, CrossReferenceAdapter crossReferencer) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
- for (EStructuralFeature.Setting setting : settings) {
- if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Dependency) {
- continue;
- }
- Dependency link = (Dependency) setting.getEObject();
- if (DependencyEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- List<?> sources = link.getClients();
- Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
- continue;
- }
- NamedElement src = (NamedElement) theSource;
- result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Dependency_4004, DependencyEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Dependency_4010(NamedElement target, CrossReferenceAdapter crossReferencer) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
- for (EStructuralFeature.Setting setting : settings) {
- if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Dependency) {
- continue;
- }
- Dependency link = (Dependency) setting.getEObject();
- if (DependencyBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- List<?> sources = link.getClients();
- Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
- continue;
- }
- NamedElement src = (NamedElement) theSource;
- result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Dependency_4010, DependencyBranchEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4008(Comment source) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> destinations = source.getAnnotatedElements()
- .iterator(); destinations.hasNext();) {
- Element destination = (Element) destinations.next();
- result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.CommentAnnotatedElement_4008, CommentAnnotatedElementEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009(Constraint source) {
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> destinations = source.getConstrainedElements()
- .iterator(); destinations.hasNext();) {
- Element destination = (Element) destinations.next();
- result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.ConstraintConstrainedElement_4009, ConstraintConstrainedElementEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Deployment_4001(NamedElement source) {
- DeploymentTarget container = null;
- // Find container element for the link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for (EObject element = source; element != null && container == null; element = element.eContainer()) {
- if (element instanceof DeploymentTarget) {
- container = (DeploymentTarget) element;
- }
- }
- if (container == null) {
- return Collections.emptyList();
- }
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> links = container.getDeployments()
- .iterator(); links.hasNext();) {
- EObject linkObject = (EObject) links.next();
- if (false == linkObject instanceof Deployment) {
- continue;
- }
- Deployment link = (Deployment) linkObject;
- if (DeploymentEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- 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();
- Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
- continue;
- }
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
- continue;
- }
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Deployment_4001, DeploymentEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Manifestation_4002(NamedElement source) {
- Artifact container = null;
- // Find container element for the link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for (EObject element = source; element != null && container == null; element = element.eContainer()) {
- if (element instanceof Artifact) {
- container = (Artifact) element;
- }
- }
- if (container == null) {
- return Collections.emptyList();
- }
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> links = container.getManifestations()
- .iterator(); links.hasNext();) {
- EObject linkObject = (EObject) links.next();
- if (false == linkObject instanceof Manifestation) {
- continue;
- }
- Manifestation link = (Manifestation) linkObject;
- if (ManifestationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- 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();
- Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
- continue;
- }
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
- continue;
- }
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Manifestation_4002, ManifestationEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Generalization_4003(Classifier source) {
- Classifier container = null;
- // Find container element for the link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for (EObject element = source; element != null && container == null; element = element.eContainer()) {
- if (element instanceof Classifier) {
- container = (Classifier) element;
- }
- }
- if (container == null) {
- return Collections.emptyList();
- }
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> links = container.getGeneralizations()
- .iterator(); links.hasNext();) {
- EObject linkObject = (EObject) links.next();
- if (false == linkObject instanceof Generalization) {
- continue;
- }
- Generalization link = (Generalization) linkObject;
- if (GeneralizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- Classifier dst = link.getGeneral();
- Classifier src = link.getSpecific();
- if (src != source) {
- continue;
- }
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Generalization_4003, GeneralizationEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Dependency_4004(NamedElement source) {
- Package container = null;
- // Find container element for the link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for (EObject element = source; element != null && container == null; element = element.eContainer()) {
- if (element instanceof Package) {
- container = (Package) element;
- }
- }
- if (container == null) {
- return Collections.emptyList();
- }
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> links = container.getPackagedElements()
- .iterator(); links.hasNext();) {
- EObject linkObject = (EObject) links.next();
- if (false == linkObject instanceof Dependency) {
- continue;
- }
- Dependency link = (Dependency) linkObject;
- if (DependencyEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- 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();
- Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
- continue;
- }
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
- continue;
- }
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Dependency_4004, DependencyEditPart.VISUAL_ID));
- }
- return result;
- }
-
- /**
- * @generated
- */
- protected Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Dependency_4010(NamedElement source) {
- Package container = null;
- // Find container element for the link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for (EObject element = source; element != null && container == null; element = element.eContainer()) {
- if (element instanceof Package) {
- container = (Package) element;
- }
- }
- if (container == null) {
- return Collections.emptyList();
- }
- LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- for (Iterator<?> links = container.getPackagedElements()
- .iterator(); links.hasNext();) {
- EObject linkObject = (EObject) links.next();
- if (false == linkObject instanceof Dependency) {
- continue;
- }
- Dependency link = (Dependency) linkObject;
- if (DependencyBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
- continue;
- }
- 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();
- Object theSource = sources.size() == 1 ? sources.get(0) : null;
- if (false == theSource instanceof NamedElement) {
- continue;
- }
- NamedElement src = (NamedElement) theSource;
- if (src != source) {
- continue;
- }
- result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Dependency_4010, DependencyBranchEditPart.VISUAL_ID));
- }
- return result;
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.part;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.core.util.CrossReferenceAdapter;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackagePackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.uml2.uml.Artifact;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Deployment;
+import org.eclipse.uml2.uml.DeploymentTarget;
+import org.eclipse.uml2.uml.Device;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExecutionEnvironment;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.Manifestation;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Node;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class UMLDiagramUpdater implements DiagramUpdater {
+
+ /**
+ * @generated
+ */
+ public static final org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramUpdater INSTANCE = new UMLDiagramUpdater();
+
+ /**
+ * @generated
+ */
+ protected UMLDiagramUpdater() {
+ // to prevent instantiation allowing the override
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public List<UMLNodeDescriptor> getSemanticChildren(View view) {
+ switch (UMLVisualIDRegistry.getVisualID(view)) {
+ case DeploymentDiagramEditPart.VISUAL_ID:
+ return getPackage_1000SemanticChildren(view);
+ case ModelPackageableElementCompartmentEditPart.VISUAL_ID:
+ return getModelModelCompartment_51SemanticChildren(view);
+ case PackagePackageableElementCompartmentEditPart.VISUAL_ID:
+ return getPackagePackageableElementCompartment_38SemanticChildren(view);
+ case DeviceCompositeCompartmentEditPart.VISUAL_ID:
+ return getDeviceDeviceCompositeCompartment_17SemanticChildren(view);
+ case ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID:
+ return getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_18SemanticChildren(view);
+ case NodeCompositeCompartmentEditPart.VISUAL_ID:
+ return getNodeCompositeCompartment_19SemanticChildren(view);
+ case ArtifactCompositeCompartmentEditPart.VISUAL_ID:
+ return getArtifactArtifactCompositeCompartment_26SemanticChildren(view);
+ case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
+ return getModelModelCompartment_52SemanticChildren(view);
+ case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
+ return getPackagePackageableElementCompartment_39SemanticChildren(view);
+ case DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
+ return getDeviceDeviceCompositeCompartment_30SemanticChildren(view);
+ case ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
+ return getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_31SemanticChildren(view);
+ case NodeCompositeCompartmentEditPartCN.VISUAL_ID:
+ return getNodeCompositeCompartment_32SemanticChildren(view);
+ case ArtifactCompositeCompartmentEditPartCN.VISUAL_ID:
+ return getArtifactArtifactCompositeCompartment_33SemanticChildren(view);
+ case ArtifactCompositeCompartmentEditPartACN.VISUAL_ID:
+ return getArtifactArtifactCompositeCompartment_34SemanticChildren(view);
+ }
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getPackage_1000SemanticChildren(View view) {
+ if (!view.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Package modelElement = (Package) view.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getPackagedElements()
+ .iterator(); it.hasNext();) {
+ PackageableElement childElement = (PackageableElement) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == DependencyNodeEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == ModelEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == PackageEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == ExecutionEnvironmentEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == DeviceEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == ArtifactEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NodeEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == DefaultNamedElementEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getOwnedRules()
+ .iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ConstraintEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getOwnedComments()
+ .iterator(); it.hasNext();) {
+ Comment childElement = (Comment) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == CommentEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getModelModelCompartment_51SemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Model modelElement = (Model) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getPackagedElements()
+ .iterator(); it.hasNext();) {
+ PackageableElement childElement = (PackageableElement) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ModelEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == PackageEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedDeviceEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedExecutionEnvironmentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedNodeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedArtifactNodeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getOwnedComments()
+ .iterator(); it.hasNext();) {
+ Comment childElement = (Comment) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == CommentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getOwnedRules()
+ .iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getPackagePackageableElementCompartment_38SemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Package modelElement = (Package) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getPackagedElements()
+ .iterator(); it.hasNext();) {
+ PackageableElement childElement = (PackageableElement) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ModelEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == PackageEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedArtifactNodeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedDeviceEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedExecutionEnvironmentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedNodeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getOwnedComments()
+ .iterator(); it.hasNext();) {
+ Comment childElement = (Comment) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == CommentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getOwnedRules()
+ .iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getDeviceDeviceCompositeCompartment_17SemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Device modelElement = (Device) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getNestedNodes()
+ .iterator(); it.hasNext();) {
+ Node childElement = (Node) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == DeviceEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NodeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_18SemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ ExecutionEnvironment modelElement = (ExecutionEnvironment) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getNestedNodes()
+ .iterator(); it.hasNext();) {
+ Node childElement = (Node) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getNestedClassifiers()
+ .iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getNodeCompositeCompartment_19SemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Node modelElement = (Node) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getNestedNodes()
+ .iterator(); it.hasNext();) {
+ Node childElement = (Node) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == DeviceEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NodeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getNestedClassifiers()
+ .iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getArtifactArtifactCompositeCompartment_26SemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Artifact modelElement = (Artifact) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getNestedArtifacts()
+ .iterator(); it.hasNext();) {
+ Artifact childElement = (Artifact) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ArtifactEditPartACN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getModelModelCompartment_52SemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Model modelElement = (Model) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getPackagedElements()
+ .iterator(); it.hasNext();) {
+ PackageableElement childElement = (PackageableElement) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ModelEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == PackageEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedDeviceEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedExecutionEnvironmentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedNodeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedArtifactNodeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getOwnedComments()
+ .iterator(); it.hasNext();) {
+ Comment childElement = (Comment) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == CommentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getOwnedRules()
+ .iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getPackagePackageableElementCompartment_39SemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Package modelElement = (Package) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getPackagedElements()
+ .iterator(); it.hasNext();) {
+ PackageableElement childElement = (PackageableElement) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == PackageEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedArtifactNodeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedDeviceEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedExecutionEnvironmentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NestedNodeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getOwnedComments()
+ .iterator(); it.hasNext();) {
+ Comment childElement = (Comment) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == CommentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getOwnedRules()
+ .iterator(); it.hasNext();) {
+ Constraint childElement = (Constraint) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ConstraintEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getDeviceDeviceCompositeCompartment_30SemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Device modelElement = (Device) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getNestedNodes()
+ .iterator(); it.hasNext();) {
+ Node childElement = (Node) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == DeviceEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NodeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getExecutionEnvironmentExecutionEnvironmentCompositeCompartment_31SemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ ExecutionEnvironment modelElement = (ExecutionEnvironment) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getNestedClassifiers()
+ .iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getNestedNodes()
+ .iterator(); it.hasNext();) {
+ Node childElement = (Node) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getNodeCompositeCompartment_32SemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Node modelElement = (Node) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getNestedNodes()
+ .iterator(); it.hasNext();) {
+ Node childElement = (Node) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == DeviceEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == ExecutionEnvironmentEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ if (visualID == NodeEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ for (Iterator<?> it = modelElement.getNestedClassifiers()
+ .iterator(); it.hasNext();) {
+ Classifier childElement = (Classifier) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ArtifactEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getArtifactArtifactCompositeCompartment_33SemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Artifact modelElement = (Artifact) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getNestedArtifacts()
+ .iterator(); it.hasNext();) {
+ Artifact childElement = (Artifact) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ArtifactEditPartACN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLNodeDescriptor> getArtifactArtifactCompositeCompartment_34SemanticChildren(View view) {
+ if (false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View) view.eContainer();
+ if (!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Artifact modelElement = (Artifact) containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for (Iterator<?> it = modelElement.getNestedArtifacts()
+ .iterator(); it.hasNext();) {
+ Artifact childElement = (Artifact) it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if (visualID == ArtifactEditPartACN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public List<UMLLinkDescriptor> getContainedLinks(View view) {
+ switch (UMLVisualIDRegistry.getVisualID(view)) {
+ case DeploymentDiagramEditPart.VISUAL_ID:
+ return getPackage_1000ContainedLinks(view);
+ case DependencyNodeEditPart.VISUAL_ID:
+ return getDependency_2011ContainedLinks(view);
+ case ModelEditPart.VISUAL_ID:
+ return getModel_2010ContainedLinks(view);
+ case PackageEditPart.VISUAL_ID:
+ return getPackage_2009ContainedLinks(view);
+ case ConstraintEditPart.VISUAL_ID:
+ return getConstraint_2005ContainedLinks(view);
+ case CommentEditPart.VISUAL_ID:
+ return getComment_2001ContainedLinks(view);
+ case ExecutionEnvironmentEditPart.VISUAL_ID:
+ return getExecutionEnvironment_2002ContainedLinks(view);
+ case DeviceEditPart.VISUAL_ID:
+ return getDevice_2003ContainedLinks(view);
+ case ArtifactEditPart.VISUAL_ID:
+ return getArtifact_2006ContainedLinks(view);
+ case NodeEditPart.VISUAL_ID:
+ return getNode_2008ContainedLinks(view);
+ case DefaultNamedElementEditPart.VISUAL_ID:
+ return getNamedElement_2012ContainedLinks(view);
+ case ModelEditPartCN.VISUAL_ID:
+ return getModel_49ContainedLinks(view);
+ case PackageEditPartCN.VISUAL_ID:
+ return getPackage_36ContainedLinks(view);
+ case DeviceEditPartCN.VISUAL_ID:
+ return getDevice_16ContainedLinks(view);
+ case NestedDeviceEditPartCN.VISUAL_ID:
+ return getDevice_44ContainedLinks(view);
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID:
+ return getExecutionEnvironment_21ContainedLinks(view);
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
+ return getExecutionEnvironment_46ContainedLinks(view);
+ case NodeEditPartCN.VISUAL_ID:
+ return getNode_23ContainedLinks(view);
+ case NestedNodeEditPartCN.VISUAL_ID:
+ return getNode_42ContainedLinks(view);
+ case ArtifactEditPartCN.VISUAL_ID:
+ return getArtifact_25ContainedLinks(view);
+ case ArtifactEditPartACN.VISUAL_ID:
+ return getArtifact_28ContainedLinks(view);
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+ return getArtifact_40ContainedLinks(view);
+ case CommentEditPartCN.VISUAL_ID:
+ return getComment_54ContainedLinks(view);
+ case ConstraintEditPartCN.VISUAL_ID:
+ return getConstraint_56ContainedLinks(view);
+ case DeploymentEditPart.VISUAL_ID:
+ return getDeployment_4001ContainedLinks(view);
+ case ManifestationEditPart.VISUAL_ID:
+ return getManifestation_4002ContainedLinks(view);
+ case GeneralizationEditPart.VISUAL_ID:
+ return getGeneralization_4003ContainedLinks(view);
+ case DependencyEditPart.VISUAL_ID:
+ return getDependency_4004ContainedLinks(view);
+ case DependencyBranchEditPart.VISUAL_ID:
+ return getDependency_4010ContainedLinks(view);
+ }
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public List<UMLLinkDescriptor> getIncomingLinks(View view) {
+ switch (UMLVisualIDRegistry.getVisualID(view)) {
+ case DependencyNodeEditPart.VISUAL_ID:
+ return getDependency_2011IncomingLinks(view);
+ case ModelEditPart.VISUAL_ID:
+ return getModel_2010IncomingLinks(view);
+ case PackageEditPart.VISUAL_ID:
+ return getPackage_2009IncomingLinks(view);
+ case ConstraintEditPart.VISUAL_ID:
+ return getConstraint_2005IncomingLinks(view);
+ case CommentEditPart.VISUAL_ID:
+ return getComment_2001IncomingLinks(view);
+ case ExecutionEnvironmentEditPart.VISUAL_ID:
+ return getExecutionEnvironment_2002IncomingLinks(view);
+ case DeviceEditPart.VISUAL_ID:
+ return getDevice_2003IncomingLinks(view);
+ case ArtifactEditPart.VISUAL_ID:
+ return getArtifact_2006IncomingLinks(view);
+ case NodeEditPart.VISUAL_ID:
+ return getNode_2008IncomingLinks(view);
+ case DefaultNamedElementEditPart.VISUAL_ID:
+ return getNamedElement_2012IncomingLinks(view);
+ case ModelEditPartCN.VISUAL_ID:
+ return getModel_49IncomingLinks(view);
+ case PackageEditPartCN.VISUAL_ID:
+ return getPackage_36IncomingLinks(view);
+ case DeviceEditPartCN.VISUAL_ID:
+ return getDevice_16IncomingLinks(view);
+ case NestedDeviceEditPartCN.VISUAL_ID:
+ return getDevice_44IncomingLinks(view);
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID:
+ return getExecutionEnvironment_21IncomingLinks(view);
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
+ return getExecutionEnvironment_46IncomingLinks(view);
+ case NodeEditPartCN.VISUAL_ID:
+ return getNode_23IncomingLinks(view);
+ case NestedNodeEditPartCN.VISUAL_ID:
+ return getNode_42IncomingLinks(view);
+ case ArtifactEditPartCN.VISUAL_ID:
+ return getArtifact_25IncomingLinks(view);
+ case ArtifactEditPartACN.VISUAL_ID:
+ return getArtifact_28IncomingLinks(view);
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+ return getArtifact_40IncomingLinks(view);
+ case CommentEditPartCN.VISUAL_ID:
+ return getComment_54IncomingLinks(view);
+ case ConstraintEditPartCN.VISUAL_ID:
+ return getConstraint_56IncomingLinks(view);
+ case DeploymentEditPart.VISUAL_ID:
+ return getDeployment_4001IncomingLinks(view);
+ case ManifestationEditPart.VISUAL_ID:
+ return getManifestation_4002IncomingLinks(view);
+ case GeneralizationEditPart.VISUAL_ID:
+ return getGeneralization_4003IncomingLinks(view);
+ case DependencyEditPart.VISUAL_ID:
+ return getDependency_4004IncomingLinks(view);
+ case DependencyBranchEditPart.VISUAL_ID:
+ return getDependency_4010IncomingLinks(view);
+ }
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public List<UMLLinkDescriptor> getOutgoingLinks(View view) {
+ switch (UMLVisualIDRegistry.getVisualID(view)) {
+ case DependencyNodeEditPart.VISUAL_ID:
+ return getDependency_2011OutgoingLinks(view);
+ case ModelEditPart.VISUAL_ID:
+ return getModel_2010OutgoingLinks(view);
+ case PackageEditPart.VISUAL_ID:
+ return getPackage_2009OutgoingLinks(view);
+ case ConstraintEditPart.VISUAL_ID:
+ return getConstraint_2005OutgoingLinks(view);
+ case CommentEditPart.VISUAL_ID:
+ return getComment_2001OutgoingLinks(view);
+ case ExecutionEnvironmentEditPart.VISUAL_ID:
+ return getExecutionEnvironment_2002OutgoingLinks(view);
+ case DeviceEditPart.VISUAL_ID:
+ return getDevice_2003OutgoingLinks(view);
+ case ArtifactEditPart.VISUAL_ID:
+ return getArtifact_2006OutgoingLinks(view);
+ case NodeEditPart.VISUAL_ID:
+ return getNode_2008OutgoingLinks(view);
+ case DefaultNamedElementEditPart.VISUAL_ID:
+ return getNamedElement_2012OutgoingLinks(view);
+ case ModelEditPartCN.VISUAL_ID:
+ return getModel_49OutgoingLinks(view);
+ case PackageEditPartCN.VISUAL_ID:
+ return getPackage_36OutgoingLinks(view);
+ case DeviceEditPartCN.VISUAL_ID:
+ return getDevice_16OutgoingLinks(view);
+ case NestedDeviceEditPartCN.VISUAL_ID:
+ return getDevice_44OutgoingLinks(view);
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID:
+ return getExecutionEnvironment_21OutgoingLinks(view);
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
+ return getExecutionEnvironment_46OutgoingLinks(view);
+ case NodeEditPartCN.VISUAL_ID:
+ return getNode_23OutgoingLinks(view);
+ case NestedNodeEditPartCN.VISUAL_ID:
+ return getNode_42OutgoingLinks(view);
+ case ArtifactEditPartCN.VISUAL_ID:
+ return getArtifact_25OutgoingLinks(view);
+ case ArtifactEditPartACN.VISUAL_ID:
+ return getArtifact_28OutgoingLinks(view);
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+ return getArtifact_40OutgoingLinks(view);
+ case CommentEditPartCN.VISUAL_ID:
+ return getComment_54OutgoingLinks(view);
+ case ConstraintEditPartCN.VISUAL_ID:
+ return getConstraint_56OutgoingLinks(view);
+ case DeploymentEditPart.VISUAL_ID:
+ return getDeployment_4001OutgoingLinks(view);
+ case ManifestationEditPart.VISUAL_ID:
+ return getManifestation_4002OutgoingLinks(view);
+ case GeneralizationEditPart.VISUAL_ID:
+ return getGeneralization_4003OutgoingLinks(view);
+ case DependencyEditPart.VISUAL_ID:
+ return getDependency_4004OutgoingLinks(view);
+ case DependencyBranchEditPart.VISUAL_ID:
+ return getDependency_4010OutgoingLinks(view);
+ }
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getPackage_1000ContainedLinks(View view) {
+ Package modelElement = (Package) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDependency_2011ContainedLinks(View view) {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getModel_2010ContainedLinks(View view) {
+ Model modelElement = (Model) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getPackage_2009ContainedLinks(View view) {
+ Package modelElement = (Package) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getConstraint_2005ContainedLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getComment_2001ContainedLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getExecutionEnvironment_2002ContainedLinks(View view) {
+ ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDevice_2003ContainedLinks(View view) {
+ Device modelElement = (Device) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getArtifact_2006ContainedLinks(View view) {
+ Artifact modelElement = (Artifact) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getNode_2008ContainedLinks(View view) {
+ Node modelElement = (Node) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getNamedElement_2012ContainedLinks(View view) {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getModel_49ContainedLinks(View view) {
+ Model modelElement = (Model) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getPackage_36ContainedLinks(View view) {
+ Package modelElement = (Package) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDevice_16ContainedLinks(View view) {
+ Device modelElement = (Device) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDevice_44ContainedLinks(View view) {
+ Device modelElement = (Device) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getExecutionEnvironment_21ContainedLinks(View view) {
+ ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getExecutionEnvironment_46ContainedLinks(View view) {
+ ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getNode_23ContainedLinks(View view) {
+ Node modelElement = (Node) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getNode_42ContainedLinks(View view) {
+ Node modelElement = (Node) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getArtifact_25ContainedLinks(View view) {
+ Artifact modelElement = (Artifact) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getArtifact_28ContainedLinks(View view) {
+ Artifact modelElement = (Artifact) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getArtifact_40ContainedLinks(View view) {
+ Artifact modelElement = (Artifact) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getComment_54ContainedLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getConstraint_56ContainedLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDeployment_4001ContainedLinks(View view) {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getManifestation_4002ContainedLinks(View view) {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getGeneralization_4003ContainedLinks(View view) {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDependency_4004ContainedLinks(View view) {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDependency_4010ContainedLinks(View view) {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDependency_2011IncomingLinks(View view) {
+ Dependency modelElement = (Dependency) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getModel_2010IncomingLinks(View view) {
+ Model modelElement = (Model) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getPackage_2009IncomingLinks(View view) {
+ Package modelElement = (Package) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getConstraint_2005IncomingLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getComment_2001IncomingLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getExecutionEnvironment_2002IncomingLinks(View view) {
+ ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDevice_2003IncomingLinks(View view) {
+ Device modelElement = (Device) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getArtifact_2006IncomingLinks(View view) {
+ Artifact modelElement = (Artifact) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getNode_2008IncomingLinks(View view) {
+ Node modelElement = (Node) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getNamedElement_2012IncomingLinks(View view) {
+ NamedElement modelElement = (NamedElement) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getModel_49IncomingLinks(View view) {
+ Model modelElement = (Model) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getPackage_36IncomingLinks(View view) {
+ Package modelElement = (Package) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDevice_16IncomingLinks(View view) {
+ Device modelElement = (Device) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDevice_44IncomingLinks(View view) {
+ Device modelElement = (Device) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getExecutionEnvironment_21IncomingLinks(View view) {
+ ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getExecutionEnvironment_46IncomingLinks(View view) {
+ ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getNode_23IncomingLinks(View view) {
+ Node modelElement = (Node) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getNode_42IncomingLinks(View view) {
+ Node modelElement = (Node) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getArtifact_25IncomingLinks(View view) {
+ Artifact modelElement = (Artifact) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getArtifact_28IncomingLinks(View view) {
+ Artifact modelElement = (Artifact) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getArtifact_40IncomingLinks(View view) {
+ Artifact modelElement = (Artifact) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4003
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getComment_54IncomingLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getConstraint_56IncomingLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDeployment_4001IncomingLinks(View view) {
+ Deployment modelElement = (Deployment) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getManifestation_4002IncomingLinks(View view) {
+ Manifestation modelElement = (Manifestation) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getGeneralization_4003IncomingLinks(View view) {
+ Generalization modelElement = (Generalization) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDependency_4004IncomingLinks(View view) {
+ Dependency modelElement = (Dependency) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDependency_4010IncomingLinks(View view) {
+ Dependency modelElement = (Dependency) view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Deployment_4001
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Manifestation_4002
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4004
+ (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4010
+ (modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDependency_2011OutgoingLinks(View view) {
+ Dependency modelElement = (Dependency) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getModel_2010OutgoingLinks(View view) {
+ Model modelElement = (Model) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getPackage_2009OutgoingLinks(View view) {
+ Package modelElement = (Package) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getConstraint_2005OutgoingLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getComment_2001OutgoingLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getExecutionEnvironment_2002OutgoingLinks(View view) {
+ ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDevice_2003OutgoingLinks(View view) {
+ Device modelElement = (Device) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getArtifact_2006OutgoingLinks(View view) {
+ Artifact modelElement = (Artifact) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getNode_2008OutgoingLinks(View view) {
+ Node modelElement = (Node) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getNamedElement_2012OutgoingLinks(View view) {
+ NamedElement modelElement = (NamedElement) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getModel_49OutgoingLinks(View view) {
+ Model modelElement = (Model) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getPackage_36OutgoingLinks(View view) {
+ Package modelElement = (Package) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDevice_16OutgoingLinks(View view) {
+ Device modelElement = (Device) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDevice_44OutgoingLinks(View view) {
+ Device modelElement = (Device) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getExecutionEnvironment_21OutgoingLinks(View view) {
+ ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getExecutionEnvironment_46OutgoingLinks(View view) {
+ ExecutionEnvironment modelElement = (ExecutionEnvironment) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getNode_23OutgoingLinks(View view) {
+ Node modelElement = (Node) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getNode_42OutgoingLinks(View view) {
+ Node modelElement = (Node) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getArtifact_25OutgoingLinks(View view) {
+ Artifact modelElement = (Artifact) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getArtifact_28OutgoingLinks(View view) {
+ Artifact modelElement = (Artifact) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getArtifact_40OutgoingLinks(View view) {
+ Artifact modelElement = (Artifact) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Generalization_4003
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getComment_54OutgoingLinks(View view) {
+ Comment modelElement = (Comment) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4008
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getConstraint_56OutgoingLinks(View view) {
+ Constraint modelElement = (Constraint) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDeployment_4001OutgoingLinks(View view) {
+ Deployment modelElement = (Deployment) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getManifestation_4002OutgoingLinks(View view) {
+ Manifestation modelElement = (Manifestation) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getGeneralization_4003OutgoingLinks(View view) {
+ return Collections.emptyList();
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDependency_4004OutgoingLinks(View view) {
+ Dependency modelElement = (Dependency) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public List<UMLLinkDescriptor> getDependency_4010OutgoingLinks(View view) {
+ Dependency modelElement = (Dependency) view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Deployment_4001
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Manifestation_4002
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4004
+ (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4010
+ (modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Deployment_4001(DeploymentTarget container) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> links = container.getDeployments()
+ .iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof Deployment) {
+ continue;
+ }
+ Deployment link = (Deployment) linkObject;
+ if (DeploymentEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ 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();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Deployment_4001, DeploymentEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Manifestation_4002(Artifact container) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> links = container.getManifestations()
+ .iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof Manifestation) {
+ continue;
+ }
+ Manifestation link = (Manifestation) linkObject;
+ if (ManifestationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ 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();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Manifestation_4002, ManifestationEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Generalization_4003(Classifier container) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> links = container.getGeneralizations()
+ .iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof Generalization) {
+ continue;
+ }
+ Generalization link = (Generalization) linkObject;
+ if (GeneralizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ Classifier dst = link.getGeneral();
+ Classifier src = link.getSpecific();
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Generalization_4003, GeneralizationEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Dependency_4004(Package container) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> links = container.getPackagedElements()
+ .iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof Dependency) {
+ continue;
+ }
+ Dependency link = (Dependency) linkObject;
+ if (DependencyEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ 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();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Dependency_4004, DependencyEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getContainedTypeModelFacetLinks_Dependency_4010(Package container) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> links = container.getPackagedElements()
+ .iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof Dependency) {
+ continue;
+ }
+ Dependency link = (Dependency) linkObject;
+ if (DependencyBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ 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();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Dependency_4010, DependencyBranchEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_4008(Element target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getComment_AnnotatedElement()) {
+ result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.CommentAnnotatedElement_4008, CommentAnnotatedElementEditPart.VISUAL_ID));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009(Element target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() == UMLPackage.eINSTANCE.getConstraint_ConstrainedElement()) {
+ result.add(new UMLLinkDescriptor(setting.getEObject(), target, UMLElementTypes.ConstraintConstrainedElement_4009, ConstraintConstrainedElementEditPart.VISUAL_ID));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Deployment_4001(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Deployment) {
+ continue;
+ }
+ Deployment link = (Deployment) setting.getEObject();
+ if (DeploymentEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ List<?> sources = link.getClients();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Deployment_4001, DeploymentEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Manifestation_4002(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Manifestation) {
+ continue;
+ }
+ Manifestation link = (Manifestation) setting.getEObject();
+ if (ManifestationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ List<?> sources = link.getClients();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Manifestation_4002, ManifestationEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Generalization_4003(Classifier target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getGeneralization_General() || false == setting.getEObject() instanceof Generalization) {
+ continue;
+ }
+ Generalization link = (Generalization) setting.getEObject();
+ if (GeneralizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ Classifier src = link.getSpecific();
+ result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Generalization_4003, GeneralizationEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Dependency_4004(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Dependency) {
+ continue;
+ }
+ Dependency link = (Dependency) setting.getEObject();
+ if (DependencyEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ List<?> sources = link.getClients();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Dependency_4004, DependencyEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getIncomingTypeModelFacetLinks_Dependency_4010(NamedElement target, CrossReferenceAdapter crossReferencer) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ Collection<EStructuralFeature.Setting> settings = crossReferencer.getInverseReferences(target);
+ for (EStructuralFeature.Setting setting : settings) {
+ if (setting.getEStructuralFeature() != UMLPackage.eINSTANCE.getDependency_Supplier() || false == setting.getEObject() instanceof Dependency) {
+ continue;
+ }
+ Dependency link = (Dependency) setting.getEObject();
+ if (DependencyBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ List<?> sources = link.getClients();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ result.add(new UMLLinkDescriptor(src, target, link, UMLElementTypes.Dependency_4010, DependencyBranchEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_4008(Comment source) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> destinations = source.getAnnotatedElements()
+ .iterator(); destinations.hasNext();) {
+ Element destination = (Element) destinations.next();
+ result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.CommentAnnotatedElement_4008, CommentAnnotatedElementEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_4009(Constraint source) {
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> destinations = source.getConstrainedElements()
+ .iterator(); destinations.hasNext();) {
+ Element destination = (Element) destinations.next();
+ result.add(new UMLLinkDescriptor(source, destination, UMLElementTypes.ConstraintConstrainedElement_4009, ConstraintConstrainedElementEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Deployment_4001(NamedElement source) {
+ DeploymentTarget container = null;
+ // Find container element for the link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if (element instanceof DeploymentTarget) {
+ container = (DeploymentTarget) element;
+ }
+ }
+ if (container == null) {
+ return Collections.emptyList();
+ }
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> links = container.getDeployments()
+ .iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof Deployment) {
+ continue;
+ }
+ Deployment link = (Deployment) linkObject;
+ if (DeploymentEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ 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();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ if (src != source) {
+ continue;
+ }
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Deployment_4001, DeploymentEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Manifestation_4002(NamedElement source) {
+ Artifact container = null;
+ // Find container element for the link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if (element instanceof Artifact) {
+ container = (Artifact) element;
+ }
+ }
+ if (container == null) {
+ return Collections.emptyList();
+ }
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> links = container.getManifestations()
+ .iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof Manifestation) {
+ continue;
+ }
+ Manifestation link = (Manifestation) linkObject;
+ if (ManifestationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ 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();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ if (src != source) {
+ continue;
+ }
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Manifestation_4002, ManifestationEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Generalization_4003(Classifier source) {
+ Classifier container = null;
+ // Find container element for the link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if (element instanceof Classifier) {
+ container = (Classifier) element;
+ }
+ }
+ if (container == null) {
+ return Collections.emptyList();
+ }
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> links = container.getGeneralizations()
+ .iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof Generalization) {
+ continue;
+ }
+ Generalization link = (Generalization) linkObject;
+ if (GeneralizationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ Classifier dst = link.getGeneral();
+ Classifier src = link.getSpecific();
+ if (src != source) {
+ continue;
+ }
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Generalization_4003, GeneralizationEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Dependency_4004(NamedElement source) {
+ Package container = null;
+ // Find container element for the link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if (element instanceof Package) {
+ container = (Package) element;
+ }
+ }
+ if (container == null) {
+ return Collections.emptyList();
+ }
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> links = container.getPackagedElements()
+ .iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof Dependency) {
+ continue;
+ }
+ Dependency link = (Dependency) linkObject;
+ if (DependencyEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ 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();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ if (src != source) {
+ continue;
+ }
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Dependency_4004, DependencyEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ protected Collection<UMLLinkDescriptor> getOutgoingTypeModelFacetLinks_Dependency_4010(NamedElement source) {
+ Package container = null;
+ // Find container element for the link.
+ // Climb up by containment hierarchy starting from the source
+ // and return the first element that is instance of the container class.
+ for (EObject element = source; element != null && container == null; element = element.eContainer()) {
+ if (element instanceof Package) {
+ container = (Package) element;
+ }
+ }
+ if (container == null) {
+ return Collections.emptyList();
+ }
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ for (Iterator<?> links = container.getPackagedElements()
+ .iterator(); links.hasNext();) {
+ EObject linkObject = (EObject) links.next();
+ if (false == linkObject instanceof Dependency) {
+ continue;
+ }
+ Dependency link = (Dependency) linkObject;
+ if (DependencyBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
+ continue;
+ }
+ 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();
+ Object theSource = sources.size() == 1 ? sources.get(0) : null;
+ if (false == theSource instanceof NamedElement) {
+ continue;
+ }
+ NamedElement src = (NamedElement) theSource;
+ if (src != source) {
+ continue;
+ }
+ result.add(new UMLLinkDescriptor(src, dst, link, UMLElementTypes.Dependency_4010, DependencyBranchEditPart.VISUAL_ID));
+ }
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDocumentProvider.java
index c8698c7e3d8..61b4f89041d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDocumentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLDocumentProvider.java
@@ -1,1034 +1,1034 @@
-/**
- * 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.deployment.part;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.EContentAdapter;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.transaction.NotificationFilter;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.DiagramEditingDomainFactory;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocumentProvider;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.EditorStatusCodes;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.util.DiagramIOUtil;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
-
-/**
- * @generated
- */
-public class UMLDocumentProvider extends AbstractDocumentProvider implements IDiagramDocumentProvider {
-
- /**
- * @generated
- */
- @Override
- protected ElementInfo createElementInfo(Object element) throws CoreException {
- if (false == element instanceof FileEditorInput && false == element instanceof URIEditorInput) {
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
- NLS.bind(
- Messages.UMLDocumentProvider_IncorrectInputError,
- new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- IEditorInput editorInput = (IEditorInput) element;
- IDiagramDocument document = (IDiagramDocument) createDocument(editorInput);
-
- ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
- info.setModificationStamp(computeModificationStamp(info));
- info.fStatus = null;
- return info;
- }
-
- /**
- * @generated
- */
- @Override
- protected IDocument createDocument(Object element) throws CoreException {
- if (false == element instanceof FileEditorInput && false == element instanceof URIEditorInput) {
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
- NLS.bind(
- Messages.UMLDocumentProvider_IncorrectInputError,
- new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- IDocument document = createEmptyDocument();
- setDocumentContent(document, (IEditorInput) element);
- setupDocument(element, document);
- return document;
- }
-
- /**
- * Sets up the given document as it would be provided for the given element. The
- * content of the document is not changed. This default implementation is empty.
- * Subclasses may reimplement.
- *
- * @param element
- * the blue-print element
- * @param document
- * the document to set up
- * @generated
- */
- protected void setupDocument(Object element, IDocument document) {
- // for subclasses
- }
-
- /**
- * @generated
- */
- private long computeModificationStamp(ResourceSetInfo info) {
- int result = 0;
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
- if (file.getLocation() != null) {
- result += file.getLocation().toFile().lastModified();
- } else {
- result += file.getModificationStamp();
- }
- }
- }
- return result;
- }
-
- /**
- * @generated
- */
- @Override
- protected IDocument createEmptyDocument() {
- DiagramDocument document = new DiagramDocument();
- document.setEditingDomain(createEditingDomain());
- return document;
- }
-
- /**
- * @generated
- */
- private TransactionalEditingDomain createEditingDomain() {
- TransactionalEditingDomain editingDomain = DiagramEditingDomainFactory.getInstance().createEditingDomain();
- editingDomain.setID("org.eclipse.papyrus.uml.diagram.deployment.EditingDomain"); //$NON-NLS-1$
- final NotificationFilter diagramResourceModifiedFilter = NotificationFilter.createNotifierFilter(editingDomain.getResourceSet()).and(NotificationFilter.createEventTypeFilter(Notification.ADD))
- .and(NotificationFilter.createFeatureFilter(ResourceSet.class, ResourceSet.RESOURCE_SET__RESOURCES));
- editingDomain.getResourceSet().eAdapters().add(new Adapter() {
-
- private Notifier myTarger;
-
- @Override
- public Notifier getTarget() {
- return myTarger;
- }
-
- @Override
- public boolean isAdapterForType(Object type) {
- return false;
- }
-
- @Override
- public void notifyChanged(Notification notification) {
- if (diagramResourceModifiedFilter.matches(notification)) {
- Object value = notification.getNewValue();
- if (value instanceof Resource) {
- ((Resource) value).setTrackingModification(true);
- }
- }
- }
-
- @Override
- public void setTarget(Notifier newTarget) {
- myTarger = newTarget;
- }
-
- });
-
- return editingDomain;
- }
-
- /**
- * @generated
- */
- protected void setDocumentContent(IDocument document, IEditorInput element) throws CoreException {
- IDiagramDocument diagramDocument = (IDiagramDocument) document;
- TransactionalEditingDomain domain = diagramDocument.getEditingDomain();
- if (element instanceof FileEditorInput) {
- IStorage storage = ((FileEditorInput) element).getStorage();
- Diagram diagram = DiagramIOUtil.load(domain, storage, true, getProgressMonitor());
- document.setContent(diagram);
- } else if (element instanceof URIEditorInput) {
- URI uri = ((URIEditorInput) element).getURI();
- Resource resource = null;
- try {
- resource = domain.getResourceSet().getResource(uri.trimFragment(), false);
- if (resource == null) {
- resource = domain.getResourceSet().createResource(uri.trimFragment());
- }
- if (!resource.isLoaded()) {
- try {
- @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);
- } catch (IOException e) {
- resource.unload();
- throw e;
- }
- }
- if (uri.fragment() != null) {
- EObject rootElement = resource.getEObject(uri.fragment());
- if (rootElement instanceof Diagram) {
- document.setContent(rootElement);
- return;
- }
- } else {
- for (Iterator<EObject> it = resource.getContents().iterator(); it.hasNext();) {
- Object rootElement = it.next();
- if (rootElement instanceof Diagram) {
- document.setContent(rootElement);
- return;
- }
- }
- }
- throw new RuntimeException(Messages.UMLDocumentProvider_NoDiagramInResourceError);
- } catch (Exception e) {
- CoreException thrownExcp = null;
- if (e instanceof CoreException) {
- thrownExcp = (CoreException) e;
- } else {
- String msg = e.getLocalizedMessage();
- thrownExcp = new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
- msg != null ? msg : Messages.UMLDocumentProvider_DiagramLoadingError, e));
- }
- throw thrownExcp;
- }
- } else {
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
- NLS.bind(
- Messages.UMLDocumentProvider_IncorrectInputError,
- new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- }
-
- /**
- * @generated
- */
- @Override
- public long getModificationStamp(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- return computeModificationStamp(info);
- }
- return super.getModificationStamp(element);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean isDeleted(Object element) {
- IDiagramDocument document = getDiagramDocument(element);
- if (document != null) {
- Resource diagramResource = document.getDiagram().eResource();
- if (diagramResource != null) {
- IFile file = WorkspaceSynchronizer.getFile(diagramResource);
- return file == null || file.getLocation() == null || !file.getLocation().toFile().exists();
- }
- }
- return super.isDeleted(element);
- }
-
- /**
- * @generated
- */
- public ResourceSetInfo getResourceSetInfo(Object editorInput) {
- return (ResourceSetInfo) super.getElementInfo(editorInput);
- }
-
- /**
- * @generated
- */
- @Override
- protected void disposeElementInfo(Object element, ElementInfo info) {
- if (info instanceof ResourceSetInfo) {
- ResourceSetInfo resourceSetInfo = (ResourceSetInfo) info;
- resourceSetInfo.dispose();
- }
- super.disposeElementInfo(element, info);
- }
-
- /**
- * @generated
- */
- @Override
- protected void doValidateState(Object element, Object computationContext) throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- LinkedList<IFile> files2Validate = new LinkedList<IFile>();
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null && file.isReadOnly()) {
- files2Validate.add(file);
- }
- }
- ResourcesPlugin.getWorkspace().validateEdit(files2Validate.toArray(new IFile[files2Validate.size()]), computationContext);
- }
-
- super.doValidateState(element, computationContext);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean isReadOnly(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- if (info.isUpdateCache()) {
- try {
- updateCache(element);
- } catch (CoreException ex) {
- UMLDiagramEditorPlugin.getInstance().logError(Messages.UMLDocumentProvider_isModifiable, ex);
- // Error message to log was initially taken from org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.StorageDocumentProvider_isModifiable
- }
- }
- return info.isReadOnly();
- }
- return super.isReadOnly(element);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean isModifiable(Object element) {
- if (!isStateValidated(element)) {
- if (element instanceof FileEditorInput || element instanceof URIEditorInput) {
- return true;
- }
- }
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- if (info.isUpdateCache()) {
- try {
- updateCache(element);
- } catch (CoreException ex) {
- UMLDiagramEditorPlugin.getInstance().logError(Messages.UMLDocumentProvider_isModifiable, ex);
- // Error message to log was initially taken from org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.StorageDocumentProvider_isModifiable
- }
- }
- return info.isModifiable();
- }
- return super.isModifiable(element);
- }
-
- /**
- * @generated
- */
- protected void updateCache(Object element) throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null && file.isReadOnly()) {
- info.setReadOnly(true);
- info.setModifiable(false);
- return;
- }
- }
- info.setReadOnly(false);
- info.setModifiable(true);
- return;
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected void doUpdateStateCache(Object element) throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- info.setUpdateCache(true);
- }
- super.doUpdateStateCache(element);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean isSynchronized(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- return info.isSynchronized();
- }
- return super.isSynchronized(element);
- }
-
- /**
- * @generated
- */
- @Override
- protected ISchedulingRule getResetRule(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
- rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(file));
- }
- }
- return new MultiRule(rules.toArray(new ISchedulingRule[rules.size()]));
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- protected ISchedulingRule getSaveRule(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
- rules.add(computeSchedulingRule(file));
- }
- }
- return new MultiRule(rules.toArray(new ISchedulingRule[rules.size()]));
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- protected ISchedulingRule getSynchronizeRule(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
- rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().refreshRule(file));
- }
- }
- return new MultiRule(rules.toArray(new ISchedulingRule[rules.size()]));
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- protected ISchedulingRule getValidateStateRule(Object element) {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- LinkedList<ISchedulingRule> files = new LinkedList<ISchedulingRule>();
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- IFile file = WorkspaceSynchronizer.getFile(nextResource);
- if (file != null) {
- files.add(file);
- }
- }
- return ResourcesPlugin.getWorkspace().getRuleFactory().validateEditRule(files.toArray(new IFile[files.size()]));
- }
- return null;
- }
-
- /**
- * @generated
- */
- private ISchedulingRule computeSchedulingRule(IResource toCreateOrModify) {
- if (toCreateOrModify.exists()) {
- return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(toCreateOrModify);
- }
-
- IResource parent = toCreateOrModify;
- do {
- /*
- * XXX This is a workaround for
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=67601
- * IResourceRuleFactory.createRule should iterate the hierarchy
- * itself.
- */
- toCreateOrModify = parent;
- parent = toCreateOrModify.getParent();
- } while (parent != null && !parent.exists());
-
- return ResourcesPlugin.getWorkspace().getRuleFactory().createRule(toCreateOrModify);
- }
-
- /**
- * @generated
- */
- @Override
- protected void doSynchronize(Object element, IProgressMonitor monitor) throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- handleElementChanged(info, nextResource, monitor);
- }
- return;
- }
- super.doSynchronize(element, monitor);
- }
-
- /**
- * @generated
- */
- @Override
- protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException {
- ResourceSetInfo info = getResourceSetInfo(element);
- if (info != null) {
- if (!overwrite && !info.isSynchronized()) {
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID,
- IResourceStatus.OUT_OF_SYNC_LOCAL,
- Messages.UMLDocumentProvider_UnsynchronizedFileSaveError,
- null));
- }
- info.stopResourceListening();
- fireElementStateChanging(element);
- try {
- monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); //"Saving diagram"
- for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
- Resource nextResource = it.next();
- monitor.setTaskName(NLS.bind(
- Messages.UMLDocumentProvider_SaveNextResourceTask,
- nextResource.getURI()));
- if (nextResource.isLoaded() && !info.getEditingDomain().isReadOnly(nextResource)) {
- try {
- nextResource.save(UMLDiagramEditorUtil.getSaveOptions());
- } catch (IOException e) {
- fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, EditorStatusCodes.RESOURCE_FAILURE, e.getLocalizedMessage(), null));
- }
- }
- monitor.worked(1);
- }
- monitor.done();
- info.setModificationStamp(computeModificationStamp(info));
- } catch (RuntimeException x) {
- fireElementStateChangeFailed(element);
- throw x;
- } finally {
- info.startResourceListening();
- }
- } else {
- URI newResoruceURI;
- List<IFile> affectedFiles = null;
- if (element instanceof FileEditorInput) {
- IFile newFile = ((FileEditorInput) element).getFile();
- affectedFiles = Collections.singletonList(newFile);
- newResoruceURI = URI.createPlatformResourceURI(newFile.getFullPath().toString(), true);
- } else if (element instanceof URIEditorInput) {
- newResoruceURI = ((URIEditorInput) element).getURI();
- } else {
- fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
- NLS.bind(
- Messages.UMLDocumentProvider_IncorrectInputError,
- new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
- null));
- }
- if (false == document instanceof IDiagramDocument) {
- fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
- "Incorrect document used: " + document + " instead of org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument", null)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- IDiagramDocument diagramDocument = (IDiagramDocument) document;
- final Resource newResource = diagramDocument.getEditingDomain().getResourceSet().createResource(newResoruceURI);
- final Diagram diagramCopy = EcoreUtil.copy(diagramDocument.getDiagram());
- try {
- new AbstractTransactionalCommand(diagramDocument.getEditingDomain(), NLS.bind(Messages.UMLDocumentProvider_SaveAsOperation, diagramCopy.getName()), affectedFiles) {
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- newResource.getContents().add(diagramCopy);
- return CommandResult.newOKCommandResult();
- }
- }.execute(monitor, null);
- newResource.save(UMLDiagramEditorUtil.getSaveOptions());
- } catch (ExecutionException e) {
- fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, e.getLocalizedMessage(), null));
- } catch (IOException e) {
- fireElementStateChangeFailed(element);
- throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, e.getLocalizedMessage(), null));
- }
- newResource.unload();
- }
- }
-
- /**
- * @generated
- */
- protected void handleElementChanged(ResourceSetInfo info, Resource changedResource, IProgressMonitor monitor) {
- IFile file = WorkspaceSynchronizer.getFile(changedResource);
- if (file != null) {
- try {
- file.refreshLocal(IResource.DEPTH_INFINITE, monitor);
- } catch (CoreException ex) {
- UMLDiagramEditorPlugin.getInstance().logError(Messages.UMLDocumentProvider_handleElementContentChanged, ex);
- // Error message to log was initially taken from org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.FileDocumentProvider_handleElementContentChanged
- }
- }
- changedResource.unload();
-
- fireElementContentAboutToBeReplaced(info.getEditorInput());
- removeUnchangedElementListeners(info.getEditorInput(), info);
- info.fStatus = null;
- try {
- setDocumentContent(info.fDocument, info.getEditorInput());
- } catch (CoreException e) {
- info.fStatus = e.getStatus();
- }
- if (!info.fCanBeSaved) {
- info.setModificationStamp(computeModificationStamp(info));
- }
- addUnchangedElementListeners(info.getEditorInput(), info);
- fireElementContentReplaced(info.getEditorInput());
- }
-
- /**
- * @generated
- */
- protected void handleElementMoved(IEditorInput input, URI uri) {
- if (input instanceof FileEditorInput) {
- IFile newFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(URI.decode(uri.path())).removeFirstSegments(1));
- fireElementMoved(input, newFile == null ? null : new FileEditorInput(newFile));
- return;
- }
- // TODO: append suffix to the URI! (use diagram as a parameter)
- fireElementMoved(input, new URIEditorInput(uri));
- }
-
- /**
- * @generated
- */
- @Override
- public IEditorInput createInputWithEditingDomain(IEditorInput editorInput, TransactionalEditingDomain domain) {
- return editorInput;
- }
-
- /**
- * @generated
- */
- @Override
- public IDiagramDocument getDiagramDocument(Object element) {
- IDocument doc = getDocument(element);
- if (doc instanceof IDiagramDocument) {
- return (IDiagramDocument) doc;
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- protected IRunnableContext getOperationRunner(IProgressMonitor monitor) {
- return null;
- }
-
- /**
- * @generated
- */
- protected class ResourceSetInfo extends ElementInfo {
-
- /**
- * @generated
- */
- private long myModificationStamp = IResource.NULL_STAMP;
-
- /**
- * @generated
- */
- private WorkspaceSynchronizer mySynchronizer;
-
- /**
- * @generated
- */
- private LinkedList<Resource> myUnSynchronizedResources = new LinkedList<Resource>();
-
- /**
- * @generated
- */
- private IDiagramDocument myDocument;
-
- /**
- * @generated
- */
- private IEditorInput myEditorInput;
-
- /**
- * @generated
- */
- private boolean myUpdateCache = true;
-
- /**
- * @generated
- */
- private boolean myModifiable = false;
-
- /**
- * @generated
- */
- private boolean myReadOnly = true;
-
- /**
- * @generated
- */
- private ResourceSetModificationListener myResourceSetListener;
-
- /**
- * @generated
- */
- public ResourceSetInfo(IDiagramDocument document, IEditorInput editorInput) {
- super(document);
- myDocument = document;
- myEditorInput = editorInput;
- startResourceListening();
- myResourceSetListener = new ResourceSetModificationListener(this);
- getResourceSet().eAdapters().add(myResourceSetListener);
- }
-
- /**
- * @generated
- */
- public long getModificationStamp() {
- return myModificationStamp;
- }
-
- /**
- * @generated
- */
- public void setModificationStamp(long modificationStamp) {
- myModificationStamp = modificationStamp;
- }
-
- /**
- * @generated
- */
- public TransactionalEditingDomain getEditingDomain() {
- return myDocument.getEditingDomain();
- }
-
- /**
- * @generated
- */
- public ResourceSet getResourceSet() {
- return getEditingDomain().getResourceSet();
- }
-
- /**
- * @generated
- */
- public Iterator<Resource> getLoadedResourcesIterator() {
- return new ArrayList<Resource>(getResourceSet().getResources()).iterator();
- }
-
- /**
- * @generated
- */
- public IEditorInput getEditorInput() {
- return myEditorInput;
- }
-
- /**
- * @generated
- */
- public void dispose() {
- stopResourceListening();
- getResourceSet().eAdapters().remove(myResourceSetListener);
- for (Iterator<Resource> it = getLoadedResourcesIterator(); it.hasNext();) {
- Resource resource = it.next();
- resource.unload();
- }
- getEditingDomain().dispose();
- }
-
- /**
- * @generated
- */
- public boolean isSynchronized() {
- return myUnSynchronizedResources.size() == 0;
- }
-
- /**
- * @generated
- */
- public void setUnSynchronized(Resource resource) {
- myUnSynchronizedResources.add(resource);
- }
-
- /**
- * @generated
- */
- public void setSynchronized(Resource resource) {
- myUnSynchronizedResources.remove(resource);
- }
-
- /**
- * @generated
- */
- public final void stopResourceListening() {
- mySynchronizer.dispose();
- mySynchronizer = null;
- }
-
- /**
- * @generated
- */
- public final void startResourceListening() {
- mySynchronizer = new WorkspaceSynchronizer(getEditingDomain(), new SynchronizerDelegate());
- }
-
- /**
- * @generated
- */
- public boolean isUpdateCache() {
- return myUpdateCache;
- }
-
- /**
- * @generated
- */
- public void setUpdateCache(boolean update) {
- myUpdateCache = update;
- }
-
- /**
- * @generated
- */
- public boolean isModifiable() {
- return myModifiable;
- }
-
- /**
- * @generated
- */
- public void setModifiable(boolean modifiable) {
- myModifiable = modifiable;
- }
-
- /**
- * @generated
- */
- public boolean isReadOnly() {
- return myReadOnly;
- }
-
- /**
- * @generated
- */
- public void setReadOnly(boolean readOnly) {
- myReadOnly = readOnly;
- }
-
- /**
- * @generated
- */
- private class SynchronizerDelegate implements WorkspaceSynchronizer.Delegate {
-
- /**
- * @generated
- */
- @Override
- public void dispose() {
- }
-
- /**
- * @generated
- */
- @Override
- public boolean handleResourceChanged(final Resource resource) {
- synchronized (ResourceSetInfo.this) {
- if (ResourceSetInfo.this.fCanBeSaved) {
- ResourceSetInfo.this.setUnSynchronized(resource);
- return true;
- }
- }
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- handleElementChanged(ResourceSetInfo.this, resource, null);
- }
- });
- return true;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean handleResourceDeleted(Resource resource) {
- synchronized (ResourceSetInfo.this) {
- if (ResourceSetInfo.this.fCanBeSaved) {
- ResourceSetInfo.this.setUnSynchronized(resource);
- return true;
- }
- }
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- fireElementDeleted(ResourceSetInfo.this.getEditorInput());
- }
- });
- return true;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean handleResourceMoved(Resource resource, final URI newURI) {
- synchronized (ResourceSetInfo.this) {
- if (ResourceSetInfo.this.fCanBeSaved) {
- ResourceSetInfo.this.setUnSynchronized(resource);
- return true;
- }
- }
- if (myDocument.getDiagram().eResource() == resource) {
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- handleElementMoved(ResourceSetInfo.this.getEditorInput(), newURI);
- }
- });
- } else {
- handleResourceDeleted(resource);
- }
- return true;
- }
- }
- }
-
- /**
- * @generated
- */
- private class ResourceSetModificationListener extends EContentAdapter {
-
- /**
- * @generated
- */
- private NotificationFilter myModifiedFilter;
-
- /**
- * @generated
- */
- private ResourceSetInfo myInfo;
-
- /**
- * @generated
- */
- public ResourceSetModificationListener(ResourceSetInfo info) {
- myInfo = info;
- myModifiedFilter = NotificationFilter.createEventTypeFilter(Notification.SET).or(NotificationFilter.createEventTypeFilter(Notification.UNSET)).and(NotificationFilter.createFeatureFilter(Resource.class, Resource.RESOURCE__IS_MODIFIED));
- }
-
- /**
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification) {
- if (notification.getNotifier() instanceof ResourceSet) {
- super.notifyChanged(notification);
- }
- if (!notification.isTouch() && myModifiedFilter.matches(notification)) {
- if (notification.getNotifier() instanceof Resource) {
- Resource resource = (Resource) notification.getNotifier();
- if (resource.isLoaded()) {
- boolean modified = false;
- for (Iterator<Resource> it = myInfo.getLoadedResourcesIterator(); it.hasNext() && !modified;) {
- Resource nextResource = it.next();
- if (nextResource.isLoaded()) {
- modified = nextResource.isModified();
- }
- }
- boolean dirtyStateChanged = false;
- synchronized (myInfo) {
- if (modified != myInfo.fCanBeSaved) {
- myInfo.fCanBeSaved = modified;
- dirtyStateChanged = true;
- }
- if (!resource.isModified()) {
- myInfo.setSynchronized(resource);
- }
- }
- if (dirtyStateChanged) {
- fireElementDirtyStateChanged(myInfo.getEditorInput(), modified);
-
- if (!modified) {
- myInfo.setModificationStamp(computeModificationStamp(myInfo));
- }
- }
- }
- }
- }
- }
- }
-}
+/**
+ * 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.deployment.part;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceStatus;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.MultiRule;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.ui.URIEditorInput;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.NotificationFilter;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.core.DiagramEditingDomainFactory;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.DiagramDocument;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocumentProvider;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.EditorStatusCodes;
+import org.eclipse.gmf.runtime.diagram.ui.resources.editor.internal.util.DiagramIOUtil;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+
+/**
+ * @generated
+ */
+public class UMLDocumentProvider extends AbstractDocumentProvider implements IDiagramDocumentProvider {
+
+ /**
+ * @generated
+ */
+ @Override
+ protected ElementInfo createElementInfo(Object element) throws CoreException {
+ if (false == element instanceof FileEditorInput && false == element instanceof URIEditorInput) {
+ throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
+ NLS.bind(
+ Messages.UMLDocumentProvider_IncorrectInputError,
+ new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
+ null));
+ }
+ IEditorInput editorInput = (IEditorInput) element;
+ IDiagramDocument document = (IDiagramDocument) createDocument(editorInput);
+
+ ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
+ info.setModificationStamp(computeModificationStamp(info));
+ info.fStatus = null;
+ return info;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IDocument createDocument(Object element) throws CoreException {
+ if (false == element instanceof FileEditorInput && false == element instanceof URIEditorInput) {
+ throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
+ NLS.bind(
+ Messages.UMLDocumentProvider_IncorrectInputError,
+ new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
+ null));
+ }
+ IDocument document = createEmptyDocument();
+ setDocumentContent(document, (IEditorInput) element);
+ setupDocument(element, document);
+ return document;
+ }
+
+ /**
+ * Sets up the given document as it would be provided for the given element. The
+ * content of the document is not changed. This default implementation is empty.
+ * Subclasses may reimplement.
+ *
+ * @param element
+ * the blue-print element
+ * @param document
+ * the document to set up
+ * @generated
+ */
+ protected void setupDocument(Object element, IDocument document) {
+ // for subclasses
+ }
+
+ /**
+ * @generated
+ */
+ private long computeModificationStamp(ResourceSetInfo info) {
+ int result = 0;
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ Resource nextResource = it.next();
+ IFile file = WorkspaceSynchronizer.getFile(nextResource);
+ if (file != null) {
+ if (file.getLocation() != null) {
+ result += file.getLocation().toFile().lastModified();
+ } else {
+ result += file.getModificationStamp();
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IDocument createEmptyDocument() {
+ DiagramDocument document = new DiagramDocument();
+ document.setEditingDomain(createEditingDomain());
+ return document;
+ }
+
+ /**
+ * @generated
+ */
+ private TransactionalEditingDomain createEditingDomain() {
+ TransactionalEditingDomain editingDomain = DiagramEditingDomainFactory.getInstance().createEditingDomain();
+ editingDomain.setID("org.eclipse.papyrus.uml.diagram.deployment.EditingDomain"); //$NON-NLS-1$
+ final NotificationFilter diagramResourceModifiedFilter = NotificationFilter.createNotifierFilter(editingDomain.getResourceSet()).and(NotificationFilter.createEventTypeFilter(Notification.ADD))
+ .and(NotificationFilter.createFeatureFilter(ResourceSet.class, ResourceSet.RESOURCE_SET__RESOURCES));
+ editingDomain.getResourceSet().eAdapters().add(new Adapter() {
+
+ private Notifier myTarger;
+
+ @Override
+ public Notifier getTarget() {
+ return myTarger;
+ }
+
+ @Override
+ public boolean isAdapterForType(Object type) {
+ return false;
+ }
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (diagramResourceModifiedFilter.matches(notification)) {
+ Object value = notification.getNewValue();
+ if (value instanceof Resource) {
+ ((Resource) value).setTrackingModification(true);
+ }
+ }
+ }
+
+ @Override
+ public void setTarget(Notifier newTarget) {
+ myTarger = newTarget;
+ }
+
+ });
+
+ return editingDomain;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setDocumentContent(IDocument document, IEditorInput element) throws CoreException {
+ IDiagramDocument diagramDocument = (IDiagramDocument) document;
+ TransactionalEditingDomain domain = diagramDocument.getEditingDomain();
+ if (element instanceof FileEditorInput) {
+ IStorage storage = ((FileEditorInput) element).getStorage();
+ Diagram diagram = DiagramIOUtil.load(domain, storage, true, getProgressMonitor());
+ document.setContent(diagram);
+ } else if (element instanceof URIEditorInput) {
+ URI uri = ((URIEditorInput) element).getURI();
+ Resource resource = null;
+ try {
+ resource = domain.getResourceSet().getResource(uri.trimFragment(), false);
+ if (resource == null) {
+ resource = domain.getResourceSet().createResource(uri.trimFragment());
+ }
+ if (!resource.isLoaded()) {
+ try {
+ @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);
+ } catch (IOException e) {
+ resource.unload();
+ throw e;
+ }
+ }
+ if (uri.fragment() != null) {
+ EObject rootElement = resource.getEObject(uri.fragment());
+ if (rootElement instanceof Diagram) {
+ document.setContent(rootElement);
+ return;
+ }
+ } else {
+ for (Iterator<EObject> it = resource.getContents().iterator(); it.hasNext();) {
+ Object rootElement = it.next();
+ if (rootElement instanceof Diagram) {
+ document.setContent(rootElement);
+ return;
+ }
+ }
+ }
+ throw new RuntimeException(Messages.UMLDocumentProvider_NoDiagramInResourceError);
+ } catch (Exception e) {
+ CoreException thrownExcp = null;
+ if (e instanceof CoreException) {
+ thrownExcp = (CoreException) e;
+ } else {
+ String msg = e.getLocalizedMessage();
+ thrownExcp = new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
+ msg != null ? msg : Messages.UMLDocumentProvider_DiagramLoadingError, e));
+ }
+ throw thrownExcp;
+ }
+ } else {
+ throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
+ NLS.bind(
+ Messages.UMLDocumentProvider_IncorrectInputError,
+ new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
+ null));
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public long getModificationStamp(Object element) {
+ ResourceSetInfo info = getResourceSetInfo(element);
+ if (info != null) {
+ return computeModificationStamp(info);
+ }
+ return super.getModificationStamp(element);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isDeleted(Object element) {
+ IDiagramDocument document = getDiagramDocument(element);
+ if (document != null) {
+ Resource diagramResource = document.getDiagram().eResource();
+ if (diagramResource != null) {
+ IFile file = WorkspaceSynchronizer.getFile(diagramResource);
+ return file == null || file.getLocation() == null || !file.getLocation().toFile().exists();
+ }
+ }
+ return super.isDeleted(element);
+ }
+
+ /**
+ * @generated
+ */
+ public ResourceSetInfo getResourceSetInfo(Object editorInput) {
+ return (ResourceSetInfo) super.getElementInfo(editorInput);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void disposeElementInfo(Object element, ElementInfo info) {
+ if (info instanceof ResourceSetInfo) {
+ ResourceSetInfo resourceSetInfo = (ResourceSetInfo) info;
+ resourceSetInfo.dispose();
+ }
+ super.disposeElementInfo(element, info);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void doValidateState(Object element, Object computationContext) throws CoreException {
+ ResourceSetInfo info = getResourceSetInfo(element);
+ if (info != null) {
+ LinkedList<IFile> files2Validate = new LinkedList<IFile>();
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ Resource nextResource = it.next();
+ IFile file = WorkspaceSynchronizer.getFile(nextResource);
+ if (file != null && file.isReadOnly()) {
+ files2Validate.add(file);
+ }
+ }
+ ResourcesPlugin.getWorkspace().validateEdit(files2Validate.toArray(new IFile[files2Validate.size()]), computationContext);
+ }
+
+ super.doValidateState(element, computationContext);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isReadOnly(Object element) {
+ ResourceSetInfo info = getResourceSetInfo(element);
+ if (info != null) {
+ if (info.isUpdateCache()) {
+ try {
+ updateCache(element);
+ } catch (CoreException ex) {
+ UMLDiagramEditorPlugin.getInstance().logError(Messages.UMLDocumentProvider_isModifiable, ex);
+ // Error message to log was initially taken from org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.StorageDocumentProvider_isModifiable
+ }
+ }
+ return info.isReadOnly();
+ }
+ return super.isReadOnly(element);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isModifiable(Object element) {
+ if (!isStateValidated(element)) {
+ if (element instanceof FileEditorInput || element instanceof URIEditorInput) {
+ return true;
+ }
+ }
+ ResourceSetInfo info = getResourceSetInfo(element);
+ if (info != null) {
+ if (info.isUpdateCache()) {
+ try {
+ updateCache(element);
+ } catch (CoreException ex) {
+ UMLDiagramEditorPlugin.getInstance().logError(Messages.UMLDocumentProvider_isModifiable, ex);
+ // Error message to log was initially taken from org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.StorageDocumentProvider_isModifiable
+ }
+ }
+ return info.isModifiable();
+ }
+ return super.isModifiable(element);
+ }
+
+ /**
+ * @generated
+ */
+ protected void updateCache(Object element) throws CoreException {
+ ResourceSetInfo info = getResourceSetInfo(element);
+ if (info != null) {
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ Resource nextResource = it.next();
+ IFile file = WorkspaceSynchronizer.getFile(nextResource);
+ if (file != null && file.isReadOnly()) {
+ info.setReadOnly(true);
+ info.setModifiable(false);
+ return;
+ }
+ }
+ info.setReadOnly(false);
+ info.setModifiable(true);
+ return;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void doUpdateStateCache(Object element) throws CoreException {
+ ResourceSetInfo info = getResourceSetInfo(element);
+ if (info != null) {
+ info.setUpdateCache(true);
+ }
+ super.doUpdateStateCache(element);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isSynchronized(Object element) {
+ ResourceSetInfo info = getResourceSetInfo(element);
+ if (info != null) {
+ return info.isSynchronized();
+ }
+ return super.isSynchronized(element);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected ISchedulingRule getResetRule(Object element) {
+ ResourceSetInfo info = getResourceSetInfo(element);
+ if (info != null) {
+ LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ Resource nextResource = it.next();
+ IFile file = WorkspaceSynchronizer.getFile(nextResource);
+ if (file != null) {
+ rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(file));
+ }
+ }
+ return new MultiRule(rules.toArray(new ISchedulingRule[rules.size()]));
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected ISchedulingRule getSaveRule(Object element) {
+ ResourceSetInfo info = getResourceSetInfo(element);
+ if (info != null) {
+ LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ Resource nextResource = it.next();
+ IFile file = WorkspaceSynchronizer.getFile(nextResource);
+ if (file != null) {
+ rules.add(computeSchedulingRule(file));
+ }
+ }
+ return new MultiRule(rules.toArray(new ISchedulingRule[rules.size()]));
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected ISchedulingRule getSynchronizeRule(Object element) {
+ ResourceSetInfo info = getResourceSetInfo(element);
+ if (info != null) {
+ LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ Resource nextResource = it.next();
+ IFile file = WorkspaceSynchronizer.getFile(nextResource);
+ if (file != null) {
+ rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().refreshRule(file));
+ }
+ }
+ return new MultiRule(rules.toArray(new ISchedulingRule[rules.size()]));
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected ISchedulingRule getValidateStateRule(Object element) {
+ ResourceSetInfo info = getResourceSetInfo(element);
+ if (info != null) {
+ LinkedList<ISchedulingRule> files = new LinkedList<ISchedulingRule>();
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ Resource nextResource = it.next();
+ IFile file = WorkspaceSynchronizer.getFile(nextResource);
+ if (file != null) {
+ files.add(file);
+ }
+ }
+ return ResourcesPlugin.getWorkspace().getRuleFactory().validateEditRule(files.toArray(new IFile[files.size()]));
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private ISchedulingRule computeSchedulingRule(IResource toCreateOrModify) {
+ if (toCreateOrModify.exists()) {
+ return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(toCreateOrModify);
+ }
+
+ IResource parent = toCreateOrModify;
+ do {
+ /*
+ * XXX This is a workaround for
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=67601
+ * IResourceRuleFactory.createRule should iterate the hierarchy
+ * itself.
+ */
+ toCreateOrModify = parent;
+ parent = toCreateOrModify.getParent();
+ } while (parent != null && !parent.exists());
+
+ return ResourcesPlugin.getWorkspace().getRuleFactory().createRule(toCreateOrModify);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void doSynchronize(Object element, IProgressMonitor monitor) throws CoreException {
+ ResourceSetInfo info = getResourceSetInfo(element);
+ if (info != null) {
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ Resource nextResource = it.next();
+ handleElementChanged(info, nextResource, monitor);
+ }
+ return;
+ }
+ super.doSynchronize(element, monitor);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException {
+ ResourceSetInfo info = getResourceSetInfo(element);
+ if (info != null) {
+ if (!overwrite && !info.isSynchronized()) {
+ throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID,
+ IResourceStatus.OUT_OF_SYNC_LOCAL,
+ Messages.UMLDocumentProvider_UnsynchronizedFileSaveError,
+ null));
+ }
+ info.stopResourceListening();
+ fireElementStateChanging(element);
+ try {
+ monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); // "Saving diagram"
+ for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
+ Resource nextResource = it.next();
+ monitor.setTaskName(NLS.bind(
+ Messages.UMLDocumentProvider_SaveNextResourceTask,
+ nextResource.getURI()));
+ if (nextResource.isLoaded() && !info.getEditingDomain().isReadOnly(nextResource)) {
+ try {
+ nextResource.save(UMLDiagramEditorUtil.getSaveOptions());
+ } catch (IOException e) {
+ fireElementStateChangeFailed(element);
+ throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, EditorStatusCodes.RESOURCE_FAILURE, e.getLocalizedMessage(), null));
+ }
+ }
+ monitor.worked(1);
+ }
+ monitor.done();
+ info.setModificationStamp(computeModificationStamp(info));
+ } catch (RuntimeException x) {
+ fireElementStateChangeFailed(element);
+ throw x;
+ } finally {
+ info.startResourceListening();
+ }
+ } else {
+ URI newResoruceURI;
+ List<IFile> affectedFiles = null;
+ if (element instanceof FileEditorInput) {
+ IFile newFile = ((FileEditorInput) element).getFile();
+ affectedFiles = Collections.singletonList(newFile);
+ newResoruceURI = URI.createPlatformResourceURI(newFile.getFullPath().toString(), true);
+ } else if (element instanceof URIEditorInput) {
+ newResoruceURI = ((URIEditorInput) element).getURI();
+ } else {
+ fireElementStateChangeFailed(element);
+ throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
+ NLS.bind(
+ Messages.UMLDocumentProvider_IncorrectInputError,
+ new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
+ null));
+ }
+ if (false == document instanceof IDiagramDocument) {
+ fireElementStateChangeFailed(element);
+ throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
+ "Incorrect document used: " + document + " instead of org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument", null)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ IDiagramDocument diagramDocument = (IDiagramDocument) document;
+ final Resource newResource = diagramDocument.getEditingDomain().getResourceSet().createResource(newResoruceURI);
+ final Diagram diagramCopy = EcoreUtil.copy(diagramDocument.getDiagram());
+ try {
+ new AbstractTransactionalCommand(diagramDocument.getEditingDomain(), NLS.bind(Messages.UMLDocumentProvider_SaveAsOperation, diagramCopy.getName()), affectedFiles) {
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ newResource.getContents().add(diagramCopy);
+ return CommandResult.newOKCommandResult();
+ }
+ }.execute(monitor, null);
+ newResource.save(UMLDiagramEditorUtil.getSaveOptions());
+ } catch (ExecutionException e) {
+ fireElementStateChangeFailed(element);
+ throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, e.getLocalizedMessage(), null));
+ } catch (IOException e) {
+ fireElementStateChangeFailed(element);
+ throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0, e.getLocalizedMessage(), null));
+ }
+ newResource.unload();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleElementChanged(ResourceSetInfo info, Resource changedResource, IProgressMonitor monitor) {
+ IFile file = WorkspaceSynchronizer.getFile(changedResource);
+ if (file != null) {
+ try {
+ file.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ } catch (CoreException ex) {
+ UMLDiagramEditorPlugin.getInstance().logError(Messages.UMLDocumentProvider_handleElementContentChanged, ex);
+ // Error message to log was initially taken from org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.FileDocumentProvider_handleElementContentChanged
+ }
+ }
+ changedResource.unload();
+
+ fireElementContentAboutToBeReplaced(info.getEditorInput());
+ removeUnchangedElementListeners(info.getEditorInput(), info);
+ info.fStatus = null;
+ try {
+ setDocumentContent(info.fDocument, info.getEditorInput());
+ } catch (CoreException e) {
+ info.fStatus = e.getStatus();
+ }
+ if (!info.fCanBeSaved) {
+ info.setModificationStamp(computeModificationStamp(info));
+ }
+ addUnchangedElementListeners(info.getEditorInput(), info);
+ fireElementContentReplaced(info.getEditorInput());
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleElementMoved(IEditorInput input, URI uri) {
+ if (input instanceof FileEditorInput) {
+ IFile newFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(URI.decode(uri.path())).removeFirstSegments(1));
+ fireElementMoved(input, newFile == null ? null : new FileEditorInput(newFile));
+ return;
+ }
+ // TODO: append suffix to the URI! (use diagram as a parameter)
+ fireElementMoved(input, new URIEditorInput(uri));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IEditorInput createInputWithEditingDomain(IEditorInput editorInput, TransactionalEditingDomain domain) {
+ return editorInput;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IDiagramDocument getDiagramDocument(Object element) {
+ IDocument doc = getDocument(element);
+ if (doc instanceof IDiagramDocument) {
+ return (IDiagramDocument) doc;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected IRunnableContext getOperationRunner(IProgressMonitor monitor) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected class ResourceSetInfo extends ElementInfo {
+
+ /**
+ * @generated
+ */
+ private long myModificationStamp = IResource.NULL_STAMP;
+
+ /**
+ * @generated
+ */
+ private WorkspaceSynchronizer mySynchronizer;
+
+ /**
+ * @generated
+ */
+ private LinkedList<Resource> myUnSynchronizedResources = new LinkedList<Resource>();
+
+ /**
+ * @generated
+ */
+ private IDiagramDocument myDocument;
+
+ /**
+ * @generated
+ */
+ private IEditorInput myEditorInput;
+
+ /**
+ * @generated
+ */
+ private boolean myUpdateCache = true;
+
+ /**
+ * @generated
+ */
+ private boolean myModifiable = false;
+
+ /**
+ * @generated
+ */
+ private boolean myReadOnly = true;
+
+ /**
+ * @generated
+ */
+ private ResourceSetModificationListener myResourceSetListener;
+
+ /**
+ * @generated
+ */
+ public ResourceSetInfo(IDiagramDocument document, IEditorInput editorInput) {
+ super(document);
+ myDocument = document;
+ myEditorInput = editorInput;
+ startResourceListening();
+ myResourceSetListener = new ResourceSetModificationListener(this);
+ getResourceSet().eAdapters().add(myResourceSetListener);
+ }
+
+ /**
+ * @generated
+ */
+ public long getModificationStamp() {
+ return myModificationStamp;
+ }
+
+ /**
+ * @generated
+ */
+ public void setModificationStamp(long modificationStamp) {
+ myModificationStamp = modificationStamp;
+ }
+
+ /**
+ * @generated
+ */
+ public TransactionalEditingDomain getEditingDomain() {
+ return myDocument.getEditingDomain();
+ }
+
+ /**
+ * @generated
+ */
+ public ResourceSet getResourceSet() {
+ return getEditingDomain().getResourceSet();
+ }
+
+ /**
+ * @generated
+ */
+ public Iterator<Resource> getLoadedResourcesIterator() {
+ return new ArrayList<Resource>(getResourceSet().getResources()).iterator();
+ }
+
+ /**
+ * @generated
+ */
+ public IEditorInput getEditorInput() {
+ return myEditorInput;
+ }
+
+ /**
+ * @generated
+ */
+ public void dispose() {
+ stopResourceListening();
+ getResourceSet().eAdapters().remove(myResourceSetListener);
+ for (Iterator<Resource> it = getLoadedResourcesIterator(); it.hasNext();) {
+ Resource resource = it.next();
+ resource.unload();
+ }
+ getEditingDomain().dispose();
+ }
+
+ /**
+ * @generated
+ */
+ public boolean isSynchronized() {
+ return myUnSynchronizedResources.size() == 0;
+ }
+
+ /**
+ * @generated
+ */
+ public void setUnSynchronized(Resource resource) {
+ myUnSynchronizedResources.add(resource);
+ }
+
+ /**
+ * @generated
+ */
+ public void setSynchronized(Resource resource) {
+ myUnSynchronizedResources.remove(resource);
+ }
+
+ /**
+ * @generated
+ */
+ public final void stopResourceListening() {
+ mySynchronizer.dispose();
+ mySynchronizer = null;
+ }
+
+ /**
+ * @generated
+ */
+ public final void startResourceListening() {
+ mySynchronizer = new WorkspaceSynchronizer(getEditingDomain(), new SynchronizerDelegate());
+ }
+
+ /**
+ * @generated
+ */
+ public boolean isUpdateCache() {
+ return myUpdateCache;
+ }
+
+ /**
+ * @generated
+ */
+ public void setUpdateCache(boolean update) {
+ myUpdateCache = update;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean isModifiable() {
+ return myModifiable;
+ }
+
+ /**
+ * @generated
+ */
+ public void setModifiable(boolean modifiable) {
+ myModifiable = modifiable;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean isReadOnly() {
+ return myReadOnly;
+ }
+
+ /**
+ * @generated
+ */
+ public void setReadOnly(boolean readOnly) {
+ myReadOnly = readOnly;
+ }
+
+ /**
+ * @generated
+ */
+ private class SynchronizerDelegate implements WorkspaceSynchronizer.Delegate {
+
+ /**
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean handleResourceChanged(final Resource resource) {
+ synchronized (ResourceSetInfo.this) {
+ if (ResourceSetInfo.this.fCanBeSaved) {
+ ResourceSetInfo.this.setUnSynchronized(resource);
+ return true;
+ }
+ }
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ handleElementChanged(ResourceSetInfo.this, resource, null);
+ }
+ });
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean handleResourceDeleted(Resource resource) {
+ synchronized (ResourceSetInfo.this) {
+ if (ResourceSetInfo.this.fCanBeSaved) {
+ ResourceSetInfo.this.setUnSynchronized(resource);
+ return true;
+ }
+ }
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ fireElementDeleted(ResourceSetInfo.this.getEditorInput());
+ }
+ });
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean handleResourceMoved(Resource resource, final URI newURI) {
+ synchronized (ResourceSetInfo.this) {
+ if (ResourceSetInfo.this.fCanBeSaved) {
+ ResourceSetInfo.this.setUnSynchronized(resource);
+ return true;
+ }
+ }
+ if (myDocument.getDiagram().eResource() == resource) {
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ handleElementMoved(ResourceSetInfo.this.getEditorInput(), newURI);
+ }
+ });
+ } else {
+ handleResourceDeleted(resource);
+ }
+ return true;
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private class ResourceSetModificationListener extends EContentAdapter {
+
+ /**
+ * @generated
+ */
+ private NotificationFilter myModifiedFilter;
+
+ /**
+ * @generated
+ */
+ private ResourceSetInfo myInfo;
+
+ /**
+ * @generated
+ */
+ public ResourceSetModificationListener(ResourceSetInfo info) {
+ myInfo = info;
+ myModifiedFilter = NotificationFilter.createEventTypeFilter(Notification.SET).or(NotificationFilter.createEventTypeFilter(Notification.UNSET)).and(NotificationFilter.createFeatureFilter(Resource.class, Resource.RESOURCE__IS_MODIFIED));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.getNotifier() instanceof ResourceSet) {
+ super.notifyChanged(notification);
+ }
+ if (!notification.isTouch() && myModifiedFilter.matches(notification)) {
+ if (notification.getNotifier() instanceof Resource) {
+ Resource resource = (Resource) notification.getNotifier();
+ if (resource.isLoaded()) {
+ boolean modified = false;
+ for (Iterator<Resource> it = myInfo.getLoadedResourcesIterator(); it.hasNext() && !modified;) {
+ Resource nextResource = it.next();
+ if (nextResource.isLoaded()) {
+ modified = nextResource.isModified();
+ }
+ }
+ boolean dirtyStateChanged = false;
+ synchronized (myInfo) {
+ if (modified != myInfo.fCanBeSaved) {
+ myInfo.fCanBeSaved = modified;
+ dirtyStateChanged = true;
+ }
+ if (!resource.isModified()) {
+ myInfo.setSynchronized(resource);
+ }
+ }
+ if (dirtyStateChanged) {
+ fireElementDirtyStateChanged(myInfo.getEditorInput(), modified);
+
+ if (!modified) {
+ myInfo.setModificationStamp(computeModificationStamp(myInfo));
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLInitDiagramFileAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLInitDiagramFileAction.java
index ab22cfed812..72152b27c25 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLInitDiagramFileAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLInitDiagramFileAction.java
@@ -1,107 +1,107 @@
-/**
- * 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.deployment.part;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * @generated
- */
-public class UMLInitDiagramFileAction implements IObjectActionDelegate {
-
- /**
- * @generated
- */
- private IWorkbenchPart targetPart;
-
- /**
- * @generated
- */
- private URI domainModelURI;
-
- /**
- * @generated
- */
- @Override
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- this.targetPart = targetPart;
- }
-
- /**
- * @generated
- */
- @Override
- public void selectionChanged(IAction action, ISelection selection) {
- domainModelURI = null;
- action.setEnabled(false);
- if (selection instanceof IStructuredSelection == false || selection.isEmpty()) {
- return;
- }
- IFile file =
- (IFile) ((IStructuredSelection) selection).getFirstElement();
- domainModelURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
- action.setEnabled(true);
- }
-
- /**
- * @generated
- */
- private Shell getShell() {
- return targetPart.getSite().getShell();
- }
-
- /**
- * @generated
- */
- @Override
- public void run(IAction action) {
- TransactionalEditingDomain editingDomain =
- WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain();
- ResourceSet resourceSet = editingDomain.getResourceSet();
- EObject diagramRoot = null;
- try {
- Resource resource = resourceSet.getResource(domainModelURI, true);
- diagramRoot = resource.getContents().get(0);
- } catch (WrappedException ex) {
- UMLDiagramEditorPlugin.getInstance().logError(
- "Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$
- }
- if (diagramRoot == null) {
- MessageDialog.openError(getShell(),
- Messages.InitDiagramFile_ResourceErrorDialogTitle,
- Messages.InitDiagramFile_ResourceErrorDialogMessage);
- return;
- }
- Wizard wizard = new UMLNewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain);
- wizard.setWindowTitle(NLS.bind(
- Messages.InitDiagramFile_WizardTitle,
- DeploymentDiagramEditPart.MODEL_ID));
- UMLDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$
- }
-}
+/**
+ * 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.deployment.part;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * @generated
+ */
+public class UMLInitDiagramFileAction implements IObjectActionDelegate {
+
+ /**
+ * @generated
+ */
+ private IWorkbenchPart targetPart;
+
+ /**
+ * @generated
+ */
+ private URI domainModelURI;
+
+ /**
+ * @generated
+ */
+ @Override
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ this.targetPart = targetPart;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void selectionChanged(IAction action, ISelection selection) {
+ domainModelURI = null;
+ action.setEnabled(false);
+ if (selection instanceof IStructuredSelection == false || selection.isEmpty()) {
+ return;
+ }
+ IFile file =
+ (IFile) ((IStructuredSelection) selection).getFirstElement();
+ domainModelURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
+ action.setEnabled(true);
+ }
+
+ /**
+ * @generated
+ */
+ private Shell getShell() {
+ return targetPart.getSite().getShell();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void run(IAction action) {
+ TransactionalEditingDomain editingDomain =
+ WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain();
+ ResourceSet resourceSet = editingDomain.getResourceSet();
+ EObject diagramRoot = null;
+ try {
+ Resource resource = resourceSet.getResource(domainModelURI, true);
+ diagramRoot = resource.getContents().get(0);
+ } catch (WrappedException ex) {
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Unable to load resource: " + domainModelURI, ex); //$NON-NLS-1$
+ }
+ if (diagramRoot == null) {
+ MessageDialog.openError(getShell(),
+ Messages.InitDiagramFile_ResourceErrorDialogTitle,
+ Messages.InitDiagramFile_ResourceErrorDialogMessage);
+ return;
+ }
+ Wizard wizard = new UMLNewDiagramFileWizard(domainModelURI, diagramRoot, editingDomain);
+ wizard.setWindowTitle(NLS.bind(
+ Messages.InitDiagramFile_WizardTitle,
+ DeploymentDiagramEditPart.MODEL_ID));
+ UMLDiagramEditorUtil.runWizard(getShell(), wizard, "InitDiagramFile"); //$NON-NLS-1$
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLNewDiagramFileWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLNewDiagramFileWizard.java
index e60ee000c87..bd7033d1f6d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLNewDiagramFileWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLNewDiagramFileWizard.java
@@ -1,194 +1,194 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.deployment.part;
-
-import java.io.IOException;
-import java.util.LinkedList;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.OperationHistoryFactory;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-
-/**
- * @generated
- */
-public class UMLNewDiagramFileWizard extends Wizard {
-
- /**
- * @generated
- */
- private WizardNewFileCreationPage myFileCreationPage;
-
- /**
- * @generated
- */
- private ModelElementSelectionPage diagramRootElementSelectionPage;
-
- /**
- * @generated
- */
- private TransactionalEditingDomain myEditingDomain;
-
- /**
- * @generated
- */
- public UMLNewDiagramFileWizard(URI domainModelURI, EObject diagramRoot, TransactionalEditingDomain editingDomain) {
- 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,
- DeploymentDiagramEditPart.MODEL_ID));
- IPath filePath;
- String fileName = URI.decode(domainModelURI.trimFileExtension().lastSegment());
- if (domainModelURI.isPlatformResource()) {
- filePath = new Path(domainModelURI.trimSegments(1).toPlatformString(true));
- } else if (domainModelURI.isFile()) {
- filePath = new Path(domainModelURI.trimSegments(1).toFileString());
- } else {
- // TODO : use some default path
- throw new IllegalArgumentException("Unsupported URI: " + domainModelURI); //$NON-NLS-1$
- }
- myFileCreationPage.setContainerFullPath(filePath);
- myFileCreationPage.setFileName(UMLDiagramEditorUtil.getUniqueFileName(
- filePath, fileName, "PapyrusUMLDeployment_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;
- }
-
- /**
- * @generated
- */
- @Override
- public void addPages() {
- addPage(myFileCreationPage);
- addPage(diagramRootElementSelectionPage);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean performFinish() {
- LinkedList<IFile> affectedFiles = new LinkedList<IFile>();
- IFile diagramFile = myFileCreationPage.createNewFile();
- UMLDiagramEditorUtil.setCharset(diagramFile);
- affectedFiles.add(diagramFile);
- URI diagramModelURI = URI.createPlatformResourceURI(diagramFile.getFullPath().toString(), true);
- ResourceSet resourceSet = myEditingDomain.getResourceSet();
- final Resource diagramResource = resourceSet.createResource(diagramModelURI);
- AbstractTransactionalCommand command =
- new AbstractTransactionalCommand(
- myEditingDomain, Messages.UMLNewDiagramFileWizard_InitDiagramCommand, affectedFiles) {
-
- @Override
- protected CommandResult doExecuteWithResult(
- IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- int diagramVID = UMLVisualIDRegistry.getDiagramVisualID(diagramRootElementSelectionPage.getModelElement());
- if (diagramVID != DeploymentDiagramEditPart.VISUAL_ID) {
- return CommandResult.newErrorCommandResult(
- Messages.UMLNewDiagramFileWizard_IncorrectRootError);
- }
- Diagram diagram =
- ViewService.createDiagram(
- diagramRootElementSelectionPage.getModelElement(), DeploymentDiagramEditPart.MODEL_ID,
- UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- diagramResource.getContents().add(diagram);
- return CommandResult.newOKCommandResult();
- }
- };
- try {
- OperationHistoryFactory.getOperationHistory().execute(
- command, new NullProgressMonitor(), null);
- diagramResource.save(UMLDiagramEditorUtil.getSaveOptions());
- UMLDiagramEditorUtil.openDiagram(diagramResource);
- } catch (ExecutionException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$
- } catch (IOException ex) {
- UMLDiagramEditorPlugin.getInstance().logError(
- "Save operation failed for: " + diagramModelURI, ex); //$NON-NLS-1$
- } catch (PartInitException ex) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to open editor", ex); //$NON-NLS-1$
- }
- return true;
- }
-
- /**
- * @generated
- */
- private static class DiagramRootElementSelectionPage extends ModelElementSelectionPage {
-
- /**
- * @generated
- */
- protected DiagramRootElementSelectionPage(String pageName) {
- super(pageName);
- }
-
- /**
- * @generated
- */
- @Override
- protected String getSelectionTitle() {
- return Messages.UMLNewDiagramFileWizard_RootSelectionPageSelectionTitle;
- }
-
- /**
- * @generated
- */
- @Override
- protected boolean validatePage() {
- if (getModelElement() == null) {
- setErrorMessage(Messages.UMLNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
- return false;
- }
- boolean result = ViewService.getInstance().provides(
- new CreateDiagramViewOperation(
- new EObjectAdapter(getModelElement()),
- DeploymentDiagramEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
- setErrorMessage(result ? null : Messages.UMLNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
- return result;
- }
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.part;
+
+import java.io.IOException;
+import java.util.LinkedList;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.OperationHistoryFactory;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+
+/**
+ * @generated
+ */
+public class UMLNewDiagramFileWizard extends Wizard {
+
+ /**
+ * @generated
+ */
+ private WizardNewFileCreationPage myFileCreationPage;
+
+ /**
+ * @generated
+ */
+ private ModelElementSelectionPage diagramRootElementSelectionPage;
+
+ /**
+ * @generated
+ */
+ private TransactionalEditingDomain myEditingDomain;
+
+ /**
+ * @generated
+ */
+ public UMLNewDiagramFileWizard(URI domainModelURI, EObject diagramRoot, TransactionalEditingDomain editingDomain) {
+ 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,
+ DeploymentDiagramEditPart.MODEL_ID));
+ IPath filePath;
+ String fileName = URI.decode(domainModelURI.trimFileExtension().lastSegment());
+ if (domainModelURI.isPlatformResource()) {
+ filePath = new Path(domainModelURI.trimSegments(1).toPlatformString(true));
+ } else if (domainModelURI.isFile()) {
+ filePath = new Path(domainModelURI.trimSegments(1).toFileString());
+ } else {
+ // TODO : use some default path
+ throw new IllegalArgumentException("Unsupported URI: " + domainModelURI); //$NON-NLS-1$
+ }
+ myFileCreationPage.setContainerFullPath(filePath);
+ myFileCreationPage.setFileName(UMLDiagramEditorUtil.getUniqueFileName(
+ filePath, fileName, "PapyrusUMLDeployment_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;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void addPages() {
+ addPage(myFileCreationPage);
+ addPage(diagramRootElementSelectionPage);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean performFinish() {
+ LinkedList<IFile> affectedFiles = new LinkedList<IFile>();
+ IFile diagramFile = myFileCreationPage.createNewFile();
+ UMLDiagramEditorUtil.setCharset(diagramFile);
+ affectedFiles.add(diagramFile);
+ URI diagramModelURI = URI.createPlatformResourceURI(diagramFile.getFullPath().toString(), true);
+ ResourceSet resourceSet = myEditingDomain.getResourceSet();
+ final Resource diagramResource = resourceSet.createResource(diagramModelURI);
+ AbstractTransactionalCommand command =
+ new AbstractTransactionalCommand(
+ myEditingDomain, Messages.UMLNewDiagramFileWizard_InitDiagramCommand, affectedFiles) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(
+ IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ int diagramVID = UMLVisualIDRegistry.getDiagramVisualID(diagramRootElementSelectionPage.getModelElement());
+ if (diagramVID != DeploymentDiagramEditPart.VISUAL_ID) {
+ return CommandResult.newErrorCommandResult(
+ Messages.UMLNewDiagramFileWizard_IncorrectRootError);
+ }
+ Diagram diagram =
+ ViewService.createDiagram(
+ diagramRootElementSelectionPage.getModelElement(), DeploymentDiagramEditPart.MODEL_ID,
+ UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
+ diagramResource.getContents().add(diagram);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ try {
+ OperationHistoryFactory.getOperationHistory().execute(
+ command, new NullProgressMonitor(), null);
+ diagramResource.save(UMLDiagramEditorUtil.getSaveOptions());
+ UMLDiagramEditorUtil.openDiagram(diagramResource);
+ } catch (ExecutionException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$
+ } catch (IOException ex) {
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Save operation failed for: " + diagramModelURI, ex); //$NON-NLS-1$
+ } catch (PartInitException ex) {
+ UMLDiagramEditorPlugin.getInstance().logError("Unable to open editor", ex); //$NON-NLS-1$
+ }
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ private static class DiagramRootElementSelectionPage extends ModelElementSelectionPage {
+
+ /**
+ * @generated
+ */
+ protected DiagramRootElementSelectionPage(String pageName) {
+ super(pageName);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected String getSelectionTitle() {
+ return Messages.UMLNewDiagramFileWizard_RootSelectionPageSelectionTitle;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected boolean validatePage() {
+ if (getModelElement() == null) {
+ setErrorMessage(Messages.UMLNewDiagramFileWizard_RootSelectionPageNoSelectionMessage);
+ return false;
+ }
+ boolean result = ViewService.getInstance().provides(
+ new CreateDiagramViewOperation(
+ new EObjectAdapter(getModelElement()),
+ DeploymentDiagramEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT));
+ setErrorMessage(result ? null : Messages.UMLNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage);
+ return result;
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLVisualIDRegistry.java
index cf23f864403..bef759ce652 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLVisualIDRegistry.java
@@ -1,985 +1,997 @@
-/**
- * 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.deployment.part;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.structure.DiagramStructure;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.MultiDependencyLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackagePackageableElementCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackagePackageableElementCompartmentEditPartCN;
-import org.eclipse.uml2.uml.Package;
-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 {
-
- /**
- * @generated
- */
- private static final String DEBUG_KEY = "org.eclipse.papyrus.uml.diagram.deployment/debug/visualID"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- public static int getVisualID(View view) {
- if (view instanceof Diagram) {
- if (DeploymentDiagramEditPart.MODEL_ID.equals(view.getType())) {
- return DeploymentDiagramEditPart.VISUAL_ID;
- } else {
- return -1;
- }
- }
- return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getVisualID(view.getType());
- }
-
- /**
- * @generated
- */
- public static String getModelID(View view) {
- View diagram = view.getDiagram();
- while (view != diagram) {
- EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
- if (annotation != null) {
- return annotation.getDetails().get("modelID"); //$NON-NLS-1$
- }
- view = (View) view.eContainer();
- }
- return diagram != null ? diagram.getType() : null;
- }
-
- /**
- * @generated
- */
- public static int getVisualID(String type) {
- try {
- return Integer.parseInt(type);
- } catch (NumberFormatException e) {
- if (Boolean.TRUE.toString().equalsIgnoreCase(Platform.getDebugOption(DEBUG_KEY))) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to parse view type as a visualID number: " + type);
- }
- }
- return -1;
- }
-
- /**
- * @generated
- */
- public static String getType(int visualID) {
- return Integer.toString(visualID);
- }
-
- /**
- * @generated
- */
- public static int getDiagramVisualID(EObject domainElement) {
- if (domainElement == null) {
- return -1;
- }
- return 1000;
- }
-
- /**
- * @generated
- */
- public static int getNodeVisualID(View containerView, EObject domainElement) {
- if (domainElement == null) {
- return -1;
- }
- String containerModelID = org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getModelID(containerView);
- if (!DeploymentDiagramEditPart.MODEL_ID.equals(containerModelID)) {
- return -1;
- }
- int containerVisualID;
- if (DeploymentDiagramEditPart.MODEL_ID.equals(containerModelID)) {
- containerVisualID = org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getVisualID(containerView);
- } else {
- if (containerView instanceof Diagram) {
- containerVisualID = DeploymentDiagramEditPart.VISUAL_ID;
- } else {
- return -1;
- }
- }
- switch (containerVisualID) {
- case DeploymentDiagramEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass())) {
- return DependencyNodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getModel().isSuperTypeOf(domainElement.eClass())) {
- return ModelEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass())) {
- return PackageEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
- return ExecutionEnvironmentEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
- return DeviceEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
- return ArtifactEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
- return NodeEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getNamedElement().isSuperTypeOf(domainElement.eClass())) {
- return DefaultNamedElementEditPart.VISUAL_ID;
- }
- break;
- case ModelPackageableElementCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getModel().isSuperTypeOf(domainElement.eClass())) {
- return ModelEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass())) {
- return PackageEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
- return NestedDeviceEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
- return NestedExecutionEnvironmentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
- return NestedNodeEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
- return NestedArtifactNodeEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintEditPartCN.VISUAL_ID;
- }
- break;
- case PackagePackageableElementCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getModel().isSuperTypeOf(domainElement.eClass())) {
- return ModelEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass())) {
- return PackageEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
- return NestedArtifactNodeEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
- return NestedDeviceEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
- return NestedExecutionEnvironmentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
- return NestedNodeEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintEditPartCN.VISUAL_ID;
- }
- break;
- case DeviceCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
- return ExecutionEnvironmentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
- return DeviceEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
- return NodeEditPartCN.VISUAL_ID;
- }
- break;
- case ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
- return ExecutionEnvironmentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
- return ArtifactEditPartCN.VISUAL_ID;
- }
- break;
- case NodeCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
- return DeviceEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
- return ExecutionEnvironmentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
- return ArtifactEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
- return NodeEditPartCN.VISUAL_ID;
- }
- break;
- case ArtifactCompositeCompartmentEditPart.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
- return ArtifactEditPartACN.VISUAL_ID;
- }
- break;
- case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getModel().isSuperTypeOf(domainElement.eClass())) {
- return ModelEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass())) {
- return PackageEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
- return NestedDeviceEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
- return NestedExecutionEnvironmentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
- return NestedNodeEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
- return NestedArtifactNodeEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintEditPartCN.VISUAL_ID;
- }
- break;
- case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass())) {
- return PackageEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
- return NestedArtifactNodeEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
- return NestedDeviceEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
- return NestedExecutionEnvironmentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
- return NestedNodeEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
- return CommentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
- return ConstraintEditPartCN.VISUAL_ID;
- }
- break;
- case DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
- return ExecutionEnvironmentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
- return DeviceEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
- return NodeEditPartCN.VISUAL_ID;
- }
- break;
- case ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
- return ArtifactEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
- return ExecutionEnvironmentEditPartCN.VISUAL_ID;
- }
- break;
- case NodeCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
- return DeviceEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
- return ExecutionEnvironmentEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
- return NodeEditPartCN.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
- return ArtifactEditPartCN.VISUAL_ID;
- }
- break;
- case ArtifactCompositeCompartmentEditPartCN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
- return ArtifactEditPartACN.VISUAL_ID;
- }
- break;
- case ArtifactCompositeCompartmentEditPartACN.VISUAL_ID:
- if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
- return ArtifactEditPartACN.VISUAL_ID;
- }
- break;
- }
- return -1;
- }
-
- /**
- * @generated
- */
- public static boolean canCreateNode(View containerView, int nodeVisualID) {
- String containerModelID = org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getModelID(containerView);
- if (!DeploymentDiagramEditPart.MODEL_ID.equals(containerModelID)) {
- return false;
- }
- int containerVisualID;
- if (DeploymentDiagramEditPart.MODEL_ID.equals(containerModelID)) {
- containerVisualID = org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getVisualID(containerView);
- } else {
- if (containerView instanceof Diagram) {
- containerVisualID = DeploymentDiagramEditPart.VISUAL_ID;
- } else {
- return false;
- }
- }
- switch (containerVisualID) {
- case DeploymentDiagramEditPart.VISUAL_ID:
- if (DependencyNodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ModelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (PackageEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExecutionEnvironmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DeviceEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ArtifactEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NodeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DefaultNamedElementEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DependencyNodeEditPart.VISUAL_ID:
- if (MultiDependencyLabelEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ModelEditPart.VISUAL_ID:
- if (ModelNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ModelPackageableElementCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case PackageEditPart.VISUAL_ID:
- if (PackageNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (PackagePackageableElementCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ConstraintEditPart.VISUAL_ID:
- if (ConstraintNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintSpecificationEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case CommentEditPart.VISUAL_ID:
- if (CommentBodyEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ExecutionEnvironmentEditPart.VISUAL_ID:
- if (ExecutionEnvironmentNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DeviceEditPart.VISUAL_ID:
- if (DeviceNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DeviceCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ArtifactEditPart.VISUAL_ID:
- if (ArtifactNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ArtifactCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case NodeEditPart.VISUAL_ID:
- if (NodeNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NodeCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DefaultNamedElementEditPart.VISUAL_ID:
- if (DefaultNamedElementNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ModelEditPartCN.VISUAL_ID:
- if (ModelNameEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ModelPackageableElementCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case PackageEditPartCN.VISUAL_ID:
- if (PackageNameEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (PackagePackageableElementCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DeviceEditPartCN.VISUAL_ID:
- if (DeviceNameEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case NestedDeviceEditPartCN.VISUAL_ID:
- if (NestedDeviceNameEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DeviceCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ExecutionEnvironmentEditPartCN.VISUAL_ID:
- if (ExecutionEnvironmentNameEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
- if (NestedExecutionEnvironmentNameEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case NodeEditPartCN.VISUAL_ID:
- if (NodeNameEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case NestedNodeEditPartCN.VISUAL_ID:
- if (NestedNodeNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NodeCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ArtifactEditPartCN.VISUAL_ID:
- if (ArtifactNameEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ArtifactEditPartACN.VISUAL_ID:
- if (ArtifactNameEditPartACN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ArtifactCompositeCompartmentEditPartACN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case NestedArtifactNodeEditPartCN.VISUAL_ID:
- if (NestedArtifactNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ArtifactCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case CommentEditPartCN.VISUAL_ID:
- if (CommentBodyEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ConstraintEditPartCN.VISUAL_ID:
- if (ConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ModelPackageableElementCompartmentEditPart.VISUAL_ID:
- if (ModelEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (PackageEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedDeviceEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedNodeEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedArtifactNodeEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case PackagePackageableElementCompartmentEditPart.VISUAL_ID:
- if (ModelEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (PackageEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedArtifactNodeEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedDeviceEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedNodeEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DeviceCompositeCompartmentEditPart.VISUAL_ID:
- if (ExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DeviceEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NodeEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID:
- if (ExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case NodeCompositeCompartmentEditPart.VISUAL_ID:
- if (DeviceEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NodeEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ArtifactCompositeCompartmentEditPart.VISUAL_ID:
- if (ArtifactEditPartACN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
- if (ModelEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (PackageEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedDeviceEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedNodeEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedArtifactNodeEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
- if (PackageEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedArtifactNodeEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedDeviceEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NestedNodeEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
- if (ExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DeviceEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NodeEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case NodeCompositeCompartmentEditPartCN.VISUAL_ID:
- if (DeviceEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (NodeEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ArtifactCompositeCompartmentEditPartCN.VISUAL_ID:
- if (ArtifactEditPartACN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ArtifactCompositeCompartmentEditPartACN.VISUAL_ID:
- if (ArtifactEditPartACN.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DeploymentEditPart.VISUAL_ID:
- if (DeploymentNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DeploymentAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case ManifestationEditPart.VISUAL_ID:
- if (ManifestationNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (ManifestationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case GeneralizationEditPart.VISUAL_ID:
- if (GeneralizationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- case DependencyEditPart.VISUAL_ID:
- if (DependencyNameEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- if (DependencyAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
- return true;
- }
- break;
- }
- return false;
- }
-
- /**
- * @generated
- */
- public static int getLinkWithClassVisualID(EObject domainElement) {
- if (domainElement == null) {
- return -1;
- }
- if (UMLPackage.eINSTANCE.getDeployment().isSuperTypeOf(domainElement.eClass())) {
- return DeploymentEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getManifestation().isSuperTypeOf(domainElement.eClass())) {
- return ManifestationEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getGeneralization().isSuperTypeOf(domainElement.eClass())) {
- return GeneralizationEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass())) {
- return DependencyEditPart.VISUAL_ID;
- }
- if (UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass())) {
- return DependencyBranchEditPart.VISUAL_ID;
- }
- return -1;
- }
-
- /**
- * User can change implementation of this method to handle some specific
- * situations not covered by default logic.
- *
- * @generated
- */
- private static boolean isDiagram(Package element) {
- return true;
- }
-
- /**
- * @generated
- */
- public static boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
- if (candidate == -1) {
- //unrecognized id is always bad
- return false;
- }
- int basic = getNodeVisualID(containerView, domainElement);
- return basic == candidate;
- }
-
- /**
- * @generated
- */
- public static boolean isCompartmentVisualID(int visualID) {
- switch (visualID) {
- case ModelPackageableElementCompartmentEditPart.VISUAL_ID:
- case PackagePackageableElementCompartmentEditPart.VISUAL_ID:
- case DeviceCompositeCompartmentEditPart.VISUAL_ID:
- case ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID:
- case NodeCompositeCompartmentEditPart.VISUAL_ID:
- case ArtifactCompositeCompartmentEditPart.VISUAL_ID:
- case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
- case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
- case DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
- case ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
- case NodeCompositeCompartmentEditPartCN.VISUAL_ID:
- case ArtifactCompositeCompartmentEditPartCN.VISUAL_ID:
- case ArtifactCompositeCompartmentEditPartACN.VISUAL_ID:
- return true;
- default:
- break;
- }
- return false;
- }
-
- /**
- * @generated
- */
- public static boolean isSemanticLeafVisualID(int visualID) {
- switch (visualID) {
- case DeploymentDiagramEditPart.VISUAL_ID:
- return false;
- case DeviceEditPartCN.VISUAL_ID:
- case ExecutionEnvironmentEditPartCN.VISUAL_ID:
- case NodeEditPartCN.VISUAL_ID:
- case ArtifactEditPartCN.VISUAL_ID:
- case CommentEditPartCN.VISUAL_ID:
- case ConstraintEditPartCN.VISUAL_ID:
- case CommentEditPart.VISUAL_ID:
- case ConstraintEditPart.VISUAL_ID:
- case DependencyNodeEditPart.VISUAL_ID:
- case DefaultNamedElementEditPart.VISUAL_ID:
- return true;
- default:
- break;
- }
- return false;
- }
-
- /**
- * @generated
- */
- public static final DiagramStructure TYPED_INSTANCE = new DiagramStructure() {
- /**
- * @generated
- */
- @Override
- public int getVisualID(View view) {
- return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getVisualID(view);
- }
-
- /**
- * @generated
- */
- @Override
- public String getModelID(View view) {
- return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getModelID(view);
- }
-
- /**
- * @generated
- */
- @Override
- public int getNodeVisualID(View containerView, EObject domainElement) {
- return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
- return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.checkNodeVisualID(containerView, domainElement, candidate);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean isCompartmentVisualID(int visualID) {
- return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.isCompartmentVisualID(visualID);
- }
-
- /**
- * @generated
- */
- @Override
- public boolean isSemanticLeafVisualID(int visualID) {
- return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.isSemanticLeafVisualID(visualID);
- }
- };
-}
+/**
+ * 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.deployment.part;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.structure.DiagramStructure;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.MultiDependencyLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackagePackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+import org.eclipse.uml2.uml.Package;
+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 {
+
+ /**
+ * @generated
+ */
+ private static final String DEBUG_KEY = "org.eclipse.papyrus.uml.diagram.deployment/debug/visualID"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static int getVisualID(View view) {
+ if (view instanceof Diagram) {
+ if (DeploymentDiagramEditPart.MODEL_ID.equals(view.getType())) {
+ return DeploymentDiagramEditPart.VISUAL_ID;
+ } else {
+ return -1;
+ }
+ }
+ return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getVisualID(view.getType());
+ }
+
+ /**
+ * @generated
+ */
+ public static String getModelID(View view) {
+ View diagram = view.getDiagram();
+ while (view != diagram) {
+ EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+ if (annotation != null) {
+ return annotation.getDetails().get("modelID"); //$NON-NLS-1$
+ }
+ view = (View) view.eContainer();
+ }
+ return diagram != null ? diagram.getType() : null;
+ }
+
+ /**
+ * @generated
+ */
+ public static int getVisualID(String type) {
+ try {
+ return Integer.parseInt(type);
+ } catch (NumberFormatException e) {
+ if (Boolean.TRUE.toString().equalsIgnoreCase(Platform.getDebugOption(DEBUG_KEY))) {
+ UMLDiagramEditorPlugin.getInstance().logError("Unable to parse view type as a visualID number: " + type);
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * @generated
+ */
+ public static String getType(int visualID) {
+ return Integer.toString(visualID);
+ }
+
+ /**
+ * @generated
+ */
+ public static int getDiagramVisualID(EObject domainElement) {
+ if (domainElement == null) {
+ return -1;
+ }
+ return 1000;
+ }
+
+ /**
+ * @generated
+ */
+ public static int getNodeVisualID(View containerView, EObject domainElement) {
+ if (domainElement == null) {
+ return -1;
+ }
+ String containerModelID = org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getModelID(containerView);
+ if (!DeploymentDiagramEditPart.MODEL_ID.equals(containerModelID)) {
+ return -1;
+ }
+ int containerVisualID;
+ if (DeploymentDiagramEditPart.MODEL_ID.equals(containerModelID)) {
+ containerVisualID = org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getVisualID(containerView);
+ } else {
+ if (containerView instanceof Diagram) {
+ containerVisualID = DeploymentDiagramEditPart.VISUAL_ID;
+ } else {
+ return -1;
+ }
+ }
+ switch (containerVisualID) {
+ case DeploymentDiagramEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass())) {
+ return DependencyNodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getModel().isSuperTypeOf(domainElement.eClass())) {
+ return ModelEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass())) {
+ return PackageEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ return ExecutionEnvironmentEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ return DeviceEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ return ArtifactEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ return NodeEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getNamedElement().isSuperTypeOf(domainElement.eClass())) {
+ return DefaultNamedElementEditPart.VISUAL_ID;
+ }
+ break;
+ case ModelPackageableElementCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getModel().isSuperTypeOf(domainElement.eClass())) {
+ return ModelEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass())) {
+ return PackageEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ return NestedDeviceEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ return NestedExecutionEnvironmentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ return NestedNodeEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ return NestedArtifactNodeEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintEditPartCN.VISUAL_ID;
+ }
+ break;
+ case PackagePackageableElementCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getModel().isSuperTypeOf(domainElement.eClass())) {
+ return ModelEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass())) {
+ return PackageEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ return NestedArtifactNodeEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ return NestedDeviceEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ return NestedExecutionEnvironmentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ return NestedNodeEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintEditPartCN.VISUAL_ID;
+ }
+ break;
+ case DeviceCompositeCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ return ExecutionEnvironmentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ return DeviceEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ return NodeEditPartCN.VISUAL_ID;
+ }
+ break;
+ case ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ return ExecutionEnvironmentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ return ArtifactEditPartCN.VISUAL_ID;
+ }
+ break;
+ case NodeCompositeCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ return DeviceEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ return ExecutionEnvironmentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ return ArtifactEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ return NodeEditPartCN.VISUAL_ID;
+ }
+ break;
+ case ArtifactCompositeCompartmentEditPart.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ return ArtifactEditPartACN.VISUAL_ID;
+ }
+ break;
+ case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getModel().isSuperTypeOf(domainElement.eClass())) {
+ return ModelEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass())) {
+ return PackageEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ return NestedDeviceEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ return NestedExecutionEnvironmentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ return NestedNodeEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ return NestedArtifactNodeEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintEditPartCN.VISUAL_ID;
+ }
+ break;
+ case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass())) {
+ return PackageEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ return NestedArtifactNodeEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ return NestedDeviceEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ return NestedExecutionEnvironmentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ return NestedNodeEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
+ return CommentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getConstraint().isSuperTypeOf(domainElement.eClass())) {
+ return ConstraintEditPartCN.VISUAL_ID;
+ }
+ break;
+ case DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ return ExecutionEnvironmentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ return DeviceEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ return NodeEditPartCN.VISUAL_ID;
+ }
+ break;
+ case ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ return ArtifactEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ return ExecutionEnvironmentEditPartCN.VISUAL_ID;
+ }
+ break;
+ case NodeCompositeCompartmentEditPartCN.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getDevice().isSuperTypeOf(domainElement.eClass())) {
+ return DeviceEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getExecutionEnvironment().isSuperTypeOf(domainElement.eClass())) {
+ return ExecutionEnvironmentEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getNode().isSuperTypeOf(domainElement.eClass())) {
+ return NodeEditPartCN.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ return ArtifactEditPartCN.VISUAL_ID;
+ }
+ break;
+ case ArtifactCompositeCompartmentEditPartCN.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ return ArtifactEditPartACN.VISUAL_ID;
+ }
+ break;
+ case ArtifactCompositeCompartmentEditPartACN.VISUAL_ID:
+ if (UMLPackage.eINSTANCE.getArtifact().isSuperTypeOf(domainElement.eClass())) {
+ return ArtifactEditPartACN.VISUAL_ID;
+ }
+ break;
+ }
+ return -1;
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean canCreateNode(View containerView, int nodeVisualID) {
+ String containerModelID = org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getModelID(containerView);
+ if (!DeploymentDiagramEditPart.MODEL_ID.equals(containerModelID)) {
+ return false;
+ }
+ int containerVisualID;
+ if (DeploymentDiagramEditPart.MODEL_ID.equals(containerModelID)) {
+ containerVisualID = org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getVisualID(containerView);
+ } else {
+ if (containerView instanceof Diagram) {
+ containerVisualID = DeploymentDiagramEditPart.VISUAL_ID;
+ } else {
+ return false;
+ }
+ }
+ switch (containerVisualID) {
+ case DeploymentDiagramEditPart.VISUAL_ID:
+ if (DependencyNodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ModelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (PackageEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExecutionEnvironmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DeviceEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ArtifactEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NodeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DefaultNamedElementEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case DependencyNodeEditPart.VISUAL_ID:
+ if (MultiDependencyLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ModelEditPart.VISUAL_ID:
+ if (ModelNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ModelPackageableElementCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case PackageEditPart.VISUAL_ID:
+ if (PackageNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (PackagePackageableElementCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ConstraintEditPart.VISUAL_ID:
+ if (ConstraintNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintSpecificationEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case CommentEditPart.VISUAL_ID:
+ if (CommentBodyEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ExecutionEnvironmentEditPart.VISUAL_ID:
+ if (ExecutionEnvironmentNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case DeviceEditPart.VISUAL_ID:
+ if (DeviceNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DeviceCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ArtifactEditPart.VISUAL_ID:
+ if (ArtifactNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ArtifactFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ArtifactCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case NodeEditPart.VISUAL_ID:
+ if (NodeNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NodeCompositeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case DefaultNamedElementEditPart.VISUAL_ID:
+ if (DefaultNamedElementNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ModelEditPartCN.VISUAL_ID:
+ if (ModelNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ModelPackageableElementCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case PackageEditPartCN.VISUAL_ID:
+ if (PackageNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (PackagePackageableElementCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case DeviceEditPartCN.VISUAL_ID:
+ if (DeviceNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case NestedDeviceEditPartCN.VISUAL_ID:
+ if (NestedDeviceNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DeviceCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID:
+ if (ExecutionEnvironmentNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
+ if (NestedExecutionEnvironmentNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case NodeEditPartCN.VISUAL_ID:
+ if (NodeNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case NestedNodeEditPartCN.VISUAL_ID:
+ if (NestedNodeNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NodeCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ArtifactEditPartCN.VISUAL_ID:
+ if (ArtifactNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ArtifactFloatingLabelEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ArtifactCompositeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ArtifactEditPartACN.VISUAL_ID:
+ if (ArtifactNameEditPartACN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ArtifactFloatingLabelEditPartACN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ArtifactCompositeCompartmentEditPartACN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+ if (NestedArtifactNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case CommentEditPartCN.VISUAL_ID:
+ if (CommentBodyEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ConstraintEditPartCN.VISUAL_ID:
+ if (ConstraintNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintSpecificationEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ModelPackageableElementCompartmentEditPart.VISUAL_ID:
+ if (ModelEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (PackageEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedDeviceEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedNodeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedArtifactNodeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case PackagePackageableElementCompartmentEditPart.VISUAL_ID:
+ if (ModelEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (PackageEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedArtifactNodeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedDeviceEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedNodeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case DeviceCompositeCompartmentEditPart.VISUAL_ID:
+ if (ExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DeviceEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NodeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID:
+ if (ExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case NodeCompositeCompartmentEditPart.VISUAL_ID:
+ if (DeviceEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NodeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ArtifactCompositeCompartmentEditPart.VISUAL_ID:
+ if (ArtifactEditPartACN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
+ if (ModelEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (PackageEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedDeviceEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedNodeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedArtifactNodeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
+ if (PackageEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedArtifactNodeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedDeviceEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NestedNodeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (CommentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ConstraintEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
+ if (ExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DeviceEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NodeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
+ if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case NodeCompositeCompartmentEditPartCN.VISUAL_ID:
+ if (DeviceEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ExecutionEnvironmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (NodeEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ArtifactEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ArtifactCompositeCompartmentEditPartCN.VISUAL_ID:
+ if (ArtifactEditPartACN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ArtifactCompositeCompartmentEditPartACN.VISUAL_ID:
+ if (ArtifactEditPartACN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case DeploymentEditPart.VISUAL_ID:
+ if (DeploymentNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DeploymentAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ManifestationEditPart.VISUAL_ID:
+ if (ManifestationNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (ManifestationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case GeneralizationEditPart.VISUAL_ID:
+ if (GeneralizationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case DependencyEditPart.VISUAL_ID:
+ if (DependencyNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if (DependencyAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public static int getLinkWithClassVisualID(EObject domainElement) {
+ if (domainElement == null) {
+ return -1;
+ }
+ if (UMLPackage.eINSTANCE.getDeployment().isSuperTypeOf(domainElement.eClass())) {
+ return DeploymentEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getManifestation().isSuperTypeOf(domainElement.eClass())) {
+ return ManifestationEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getGeneralization().isSuperTypeOf(domainElement.eClass())) {
+ return GeneralizationEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass())) {
+ return DependencyEditPart.VISUAL_ID;
+ }
+ if (UMLPackage.eINSTANCE.getDependency().isSuperTypeOf(domainElement.eClass())) {
+ return DependencyBranchEditPart.VISUAL_ID;
+ }
+ return -1;
+ }
+
+ /**
+ * User can change implementation of this method to handle some specific
+ * situations not covered by default logic.
+ *
+ * @generated
+ */
+ private static boolean isDiagram(Package element) {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
+ if (candidate == -1) {
+ // unrecognized id is always bad
+ return false;
+ }
+ int basic = getNodeVisualID(containerView, domainElement);
+ return basic == candidate;
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean isCompartmentVisualID(int visualID) {
+ switch (visualID) {
+ case ModelPackageableElementCompartmentEditPart.VISUAL_ID:
+ case PackagePackageableElementCompartmentEditPart.VISUAL_ID:
+ case DeviceCompositeCompartmentEditPart.VISUAL_ID:
+ case ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID:
+ case NodeCompositeCompartmentEditPart.VISUAL_ID:
+ case ArtifactCompositeCompartmentEditPart.VISUAL_ID:
+ case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
+ case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
+ case DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
+ case ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
+ case NodeCompositeCompartmentEditPartCN.VISUAL_ID:
+ case ArtifactCompositeCompartmentEditPartCN.VISUAL_ID:
+ case ArtifactCompositeCompartmentEditPartACN.VISUAL_ID:
+ return true;
+ default:
+ break;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public static boolean isSemanticLeafVisualID(int visualID) {
+ switch (visualID) {
+ case DeploymentDiagramEditPart.VISUAL_ID:
+ return false;
+ case DeviceEditPartCN.VISUAL_ID:
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID:
+ case NodeEditPartCN.VISUAL_ID:
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+ case CommentEditPartCN.VISUAL_ID:
+ case ConstraintEditPartCN.VISUAL_ID:
+ case CommentEditPart.VISUAL_ID:
+ case ConstraintEditPart.VISUAL_ID:
+ case DependencyNodeEditPart.VISUAL_ID:
+ case DefaultNamedElementEditPart.VISUAL_ID:
+ return true;
+ default:
+ break;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public static final DiagramStructure TYPED_INSTANCE = new DiagramStructure() {
+ /**
+ * @generated
+ */
+ @Override
+ public int getVisualID(View view) {
+ return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getVisualID(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getModelID(View view) {
+ return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getModelID(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getNodeVisualID(View containerView, EObject domainElement) {
+ return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
+ return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.checkNodeVisualID(containerView, domainElement, candidate);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isCompartmentVisualID(int visualID) {
+ return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.isCompartmentVisualID(visualID);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean isSemanticLeafVisualID(int visualID) {
+ return org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry.isSemanticLeafVisualID(visualID);
+ }
+ };
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/ValidateAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/ValidateAction.java
index 1dbf018c082..2a21e3857bd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/ValidateAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/ValidateAction.java
@@ -1,302 +1,302 @@
-/**
- * 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.deployment.part;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.Diagnostician;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.emf.validation.model.EvaluationMode;
-import org.eclipse.emf.validation.model.IConstraintStatus;
-import org.eclipse.emf.validation.service.IBatchValidator;
-import org.eclipse.emf.validation.service.ModelValidationService;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gef.EditPartViewer;
-import org.eclipse.gmf.runtime.diagram.ui.OffscreenEditPartFactory;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLMarkerNavigationProvider;
-import org.eclipse.papyrus.uml.diagram.deployment.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;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
-
-/**
- * @generated
- */
-public class ValidateAction extends Action {
-
- /**
- * @generated
- */
- private IWorkbenchPage page;
-
- /**
- * @generated
- */
- public ValidateAction(IWorkbenchPage page) {
- setText(Messages.ValidateActionMessage);
- this.page = page;
- }
-
- /**
- * @generated
- */
- @Override
- public void run() {
- IWorkbenchPart workbenchPart = page.getActivePart();
- if (workbenchPart instanceof IDiagramWorkbenchPart) {
- final IDiagramWorkbenchPart part = (IDiagramWorkbenchPart) workbenchPart;
- try {
- new WorkspaceModifyDelegatingOperation(
- new IRunnableWithProgress() {
-
- @Override
- public void run(IProgressMonitor monitor)
- throws InterruptedException, InvocationTargetException {
- runValidation(part.getDiagramEditPart(), part.getDiagram());
- }
- })
- .run(new NullProgressMonitor());
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Validation action failed", e); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * @generated
- */
- public static void runValidation(View view) {
- try {
- if (UMLDiagramEditorUtil.openDiagram(view.eResource())) {
- IEditorPart editorPart = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- if (editorPart instanceof IDiagramWorkbenchPart) {
- runValidation(((IDiagramWorkbenchPart) editorPart).
- getDiagramEditPart(), view);
- } else {
- runNonUIValidation(view);
- }
- }
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Validation action failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public static void runNonUIValidation(View view) {
- Shell shell = Display.getCurrent().getActiveShell();
- if (shell == null) {
- shell = new Shell();
- }
-
- DiagramEditPart diagramEditPart =
- OffscreenEditPartFactory.getInstance().createDiagramEditPart(
- view.getDiagram(), shell);
- runValidation(diagramEditPart, view);
- }
-
- /**
- * @generated
- */
- public static void runValidation(DiagramEditPart diagramEditPart, View view) {
- final DiagramEditPart fpart = diagramEditPart;
- final View fview = view;
- TransactionalEditingDomain txDomain = TransactionUtil.getEditingDomain(view);
- UMLValidationProvider.runWithConstraints(txDomain, new Runnable() {
-
- @Override
- public void run() {
- validate(fpart, fview);
- }
- });
- }
-
- /**
- * @generated
- */
- private static Diagnostic runEMFValidator(View target) {
- if (target.isSetElement() && target.getElement() != null) {
- return new Diagnostician() {
-
- @Override
- public String getObjectLabel(EObject eObject) {
- return EMFCoreUtil.getQualifiedName(eObject, true);
- }
- }.validate(target.getElement());
- }
- return Diagnostic.OK_INSTANCE;
- }
-
- /**
- * @generated
- */
- private static void validate(DiagramEditPart diagramEditPart, View view) {
- IFile target = view.eResource() != null ?
- WorkspaceSynchronizer.getFile(view.eResource()) : null;
- if (target != null) {
- UMLMarkerNavigationProvider.deleteMarkers(target);
- }
- Diagnostic diagnostic = runEMFValidator(view);
- createMarkers(target, diagnostic, diagramEditPart);
- IBatchValidator validator =
- (IBatchValidator)
- ModelValidationService.getInstance().newValidator(
- EvaluationMode.BATCH);
- validator.setIncludeLiveConstraints(true);
- if (view.isSetElement() && view.getElement() != null) {
- IStatus status = validator.validate(view.getElement());
- createMarkers(target, status, diagramEditPart);
- }
- }
-
- /**
- * @generated
- */
- private static void createMarkers(IFile
- target, IStatus validationStatus, DiagramEditPart diagramEditPart) {
- if (validationStatus.isOK()) {
- return;
- }
- final IStatus rootStatus = validationStatus;
- List allStatuses = new ArrayList();
- UMLDiagramEditorUtil.LazyElement2ViewMap element2ViewMap = new UMLDiagramEditorUtil.LazyElement2ViewMap(
- diagramEditPart.getDiagramView(),
- collectTargetElements(rootStatus, new HashSet<EObject>(), allStatuses));
- for (Iterator it = allStatuses.iterator(); it.hasNext();) {
- IConstraintStatus nextStatus =
- (IConstraintStatus) it.next();
- View view = UMLDiagramEditorUtil.findView(
- diagramEditPart, nextStatus.getTarget(), element2ViewMap);
- addMarker(diagramEditPart.getViewer(), target, view.eResource().getURIFragment(view),
- EMFCoreUtil.getQualifiedName(nextStatus.getTarget(), true),
- nextStatus.getMessage(), nextStatus.getSeverity());
- }
- }
-
- /**
- * @generated
- */
- private static void createMarkers(IFile
- target, Diagnostic emfValidationStatus, DiagramEditPart diagramEditPart) {
- if (emfValidationStatus.getSeverity() == Diagnostic.OK) {
- return;
- }
- final Diagnostic rootStatus = emfValidationStatus;
- List<Diagnostic> allDiagnostics = new ArrayList<Diagnostic>();
- UMLDiagramEditorUtil.LazyElement2ViewMap element2ViewMap =
- new UMLDiagramEditorUtil.LazyElement2ViewMap(
- diagramEditPart.getDiagramView(),
- collectTargetElements(rootStatus, new HashSet<EObject>(), allDiagnostics));
- for (Iterator<Diagnostic> it = emfValidationStatus.getChildren().iterator(); it.hasNext();) {
- Diagnostic nextDiagnostic = it.next();
- 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);
- addMarker(diagramEditPart.getViewer(), target, view.eResource().getURIFragment(view),
- EMFCoreUtil.getQualifiedName(element, true),
- nextDiagnostic.getMessage(), diagnosticToStatusSeverity(nextDiagnostic.getSeverity()));
- }
- }
- }
-
- /**
- * @generated
- */
- private static void addMarker(EditPartViewer viewer, IFile
- target, String elementId, String location, String message, int statusSeverity) {
- if (target == null) {
- return;
- }
- UMLMarkerNavigationProvider.addMarker(
- target, elementId, location, message, statusSeverity);
- }
-
- /**
- * @generated
- */
- private static int diagnosticToStatusSeverity(int diagnosticSeverity) {
- if (diagnosticSeverity == Diagnostic.OK) {
- return IStatus.OK;
- } else if (diagnosticSeverity == Diagnostic.INFO) {
- return IStatus.INFO;
- } else if (diagnosticSeverity == Diagnostic.WARNING) {
- return IStatus.WARNING;
- } else if (diagnosticSeverity == Diagnostic.ERROR
- || diagnosticSeverity == Diagnostic.CANCEL) {
- return IStatus.ERROR;
- }
- return IStatus.INFO;
- }
-
- /**
- * @generated
- */
- private static Set<EObject> collectTargetElements(IStatus status, Set<EObject> targetElementCollector, List<IConstraintStatus> allConstraintStatuses) {
- if (status instanceof IConstraintStatus) {
- targetElementCollector.add(((IConstraintStatus) status).getTarget());
- allConstraintStatuses.add((IConstraintStatus) status);
- }
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- collectTargetElements(children[i], targetElementCollector, allConstraintStatuses);
- }
- }
- return targetElementCollector;
- }
-
- /**
- * @generated
- */
- 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);
- targetElementCollector.add(target);
- allDiagnostics.add(diagnostic);
- }
- if (diagnostic.getChildren() != null && !diagnostic.getChildren().isEmpty()) {
- for (Iterator<Diagnostic> it = diagnostic.getChildren().iterator(); it.hasNext();) {
- collectTargetElements(it.next(),
- targetElementCollector, allDiagnostics);
- }
- }
- return targetElementCollector;
- }
-}
+/**
+ * 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.deployment.part;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.emf.validation.model.EvaluationMode;
+import org.eclipse.emf.validation.model.IConstraintStatus;
+import org.eclipse.emf.validation.service.IBatchValidator;
+import org.eclipse.emf.validation.service.ModelValidationService;
+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gmf.runtime.diagram.ui.OffscreenEditPartFactory;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLMarkerNavigationProvider;
+import org.eclipse.papyrus.uml.diagram.deployment.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;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
+
+/**
+ * @generated
+ */
+public class ValidateAction extends Action {
+
+ /**
+ * @generated
+ */
+ private IWorkbenchPage page;
+
+ /**
+ * @generated
+ */
+ public ValidateAction(IWorkbenchPage page) {
+ setText(Messages.ValidateActionMessage);
+ this.page = page;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void run() {
+ IWorkbenchPart workbenchPart = page.getActivePart();
+ if (workbenchPart instanceof IDiagramWorkbenchPart) {
+ final IDiagramWorkbenchPart part = (IDiagramWorkbenchPart) workbenchPart;
+ try {
+ new WorkspaceModifyDelegatingOperation(
+ new IRunnableWithProgress() {
+
+ @Override
+ public void run(IProgressMonitor monitor)
+ throws InterruptedException, InvocationTargetException {
+ runValidation(part.getDiagramEditPart(), part.getDiagram());
+ }
+ })
+ .run(new NullProgressMonitor());
+ } catch (Exception e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Validation action failed", e); //$NON-NLS-1$
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public static void runValidation(View view) {
+ try {
+ if (UMLDiagramEditorUtil.openDiagram(view.eResource())) {
+ IEditorPart editorPart = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (editorPart instanceof IDiagramWorkbenchPart) {
+ runValidation(((IDiagramWorkbenchPart) editorPart).
+ getDiagramEditPart(), view);
+ } else {
+ runNonUIValidation(view);
+ }
+ }
+ } catch (Exception e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Validation action failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public static void runNonUIValidation(View view) {
+ Shell shell = Display.getCurrent().getActiveShell();
+ if (shell == null) {
+ shell = new Shell();
+ }
+
+ DiagramEditPart diagramEditPart =
+ OffscreenEditPartFactory.getInstance().createDiagramEditPart(
+ view.getDiagram(), shell);
+ runValidation(diagramEditPart, view);
+ }
+
+ /**
+ * @generated
+ */
+ public static void runValidation(DiagramEditPart diagramEditPart, View view) {
+ final DiagramEditPart fpart = diagramEditPart;
+ final View fview = view;
+ TransactionalEditingDomain txDomain = TransactionUtil.getEditingDomain(view);
+ UMLValidationProvider.runWithConstraints(txDomain, new Runnable() {
+
+ @Override
+ public void run() {
+ validate(fpart, fview);
+ }
+ });
+ }
+
+ /**
+ * @generated
+ */
+ private static Diagnostic runEMFValidator(View target) {
+ if (target.isSetElement() && target.getElement() != null) {
+ return new Diagnostician() {
+
+ @Override
+ public String getObjectLabel(EObject eObject) {
+ return EMFCoreUtil.getQualifiedName(eObject, true);
+ }
+ }.validate(target.getElement());
+ }
+ return Diagnostic.OK_INSTANCE;
+ }
+
+ /**
+ * @generated
+ */
+ private static void validate(DiagramEditPart diagramEditPart, View view) {
+ IFile target = view.eResource() != null ?
+ WorkspaceSynchronizer.getFile(view.eResource()) : null;
+ if (target != null) {
+ UMLMarkerNavigationProvider.deleteMarkers(target);
+ }
+ Diagnostic diagnostic = runEMFValidator(view);
+ createMarkers(target, diagnostic, diagramEditPart);
+ IBatchValidator validator =
+ (IBatchValidator)
+ ModelValidationService.getInstance().newValidator(
+ EvaluationMode.BATCH);
+ validator.setIncludeLiveConstraints(true);
+ if (view.isSetElement() && view.getElement() != null) {
+ IStatus status = validator.validate(view.getElement());
+ createMarkers(target, status, diagramEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private static void createMarkers(IFile
+ target, IStatus validationStatus, DiagramEditPart diagramEditPart) {
+ if (validationStatus.isOK()) {
+ return;
+ }
+ final IStatus rootStatus = validationStatus;
+ List allStatuses = new ArrayList();
+ UMLDiagramEditorUtil.LazyElement2ViewMap element2ViewMap = new UMLDiagramEditorUtil.LazyElement2ViewMap(
+ diagramEditPart.getDiagramView(),
+ collectTargetElements(rootStatus, new HashSet<EObject>(), allStatuses));
+ for (Iterator it = allStatuses.iterator(); it.hasNext();) {
+ IConstraintStatus nextStatus =
+ (IConstraintStatus) it.next();
+ View view = UMLDiagramEditorUtil.findView(
+ diagramEditPart, nextStatus.getTarget(), element2ViewMap);
+ addMarker(diagramEditPart.getViewer(), target, view.eResource().getURIFragment(view),
+ EMFCoreUtil.getQualifiedName(nextStatus.getTarget(), true),
+ nextStatus.getMessage(), nextStatus.getSeverity());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private static void createMarkers(IFile
+ target, Diagnostic emfValidationStatus, DiagramEditPart diagramEditPart) {
+ if (emfValidationStatus.getSeverity() == Diagnostic.OK) {
+ return;
+ }
+ final Diagnostic rootStatus = emfValidationStatus;
+ List<Diagnostic> allDiagnostics = new ArrayList<Diagnostic>();
+ UMLDiagramEditorUtil.LazyElement2ViewMap element2ViewMap =
+ new UMLDiagramEditorUtil.LazyElement2ViewMap(
+ diagramEditPart.getDiagramView(),
+ collectTargetElements(rootStatus, new HashSet<EObject>(), allDiagnostics));
+ for (Iterator<Diagnostic> it = emfValidationStatus.getChildren().iterator(); it.hasNext();) {
+ Diagnostic nextDiagnostic = it.next();
+ 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);
+ addMarker(diagramEditPart.getViewer(), target, view.eResource().getURIFragment(view),
+ EMFCoreUtil.getQualifiedName(element, true),
+ nextDiagnostic.getMessage(), diagnosticToStatusSeverity(nextDiagnostic.getSeverity()));
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private static void addMarker(EditPartViewer viewer, IFile
+ target, String elementId, String location, String message, int statusSeverity) {
+ if (target == null) {
+ return;
+ }
+ UMLMarkerNavigationProvider.addMarker(
+ target, elementId, location, message, statusSeverity);
+ }
+
+ /**
+ * @generated
+ */
+ private static int diagnosticToStatusSeverity(int diagnosticSeverity) {
+ if (diagnosticSeverity == Diagnostic.OK) {
+ return IStatus.OK;
+ } else if (diagnosticSeverity == Diagnostic.INFO) {
+ return IStatus.INFO;
+ } else if (diagnosticSeverity == Diagnostic.WARNING) {
+ return IStatus.WARNING;
+ } else if (diagnosticSeverity == Diagnostic.ERROR
+ || diagnosticSeverity == Diagnostic.CANCEL) {
+ return IStatus.ERROR;
+ }
+ return IStatus.INFO;
+ }
+
+ /**
+ * @generated
+ */
+ private static Set<EObject> collectTargetElements(IStatus status, Set<EObject> targetElementCollector, List<IConstraintStatus> allConstraintStatuses) {
+ if (status instanceof IConstraintStatus) {
+ targetElementCollector.add(((IConstraintStatus) status).getTarget());
+ allConstraintStatuses.add((IConstraintStatus) status);
+ }
+ if (status.isMultiStatus()) {
+ IStatus[] children = status.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ collectTargetElements(children[i], targetElementCollector, allConstraintStatuses);
+ }
+ }
+ return targetElementCollector;
+ }
+
+ /**
+ * @generated
+ */
+ 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);
+ targetElementCollector.add(target);
+ allDiagnostics.add(diagnostic);
+ }
+ if (diagnostic.getChildren() != null && !diagnostic.getChildren().isEmpty()) {
+ for (Iterator<Diagnostic> it = diagnostic.getChildren().iterator(); it.hasNext();) {
+ collectTargetElements(it.next(),
+ targetElementCollector, allDiagnostics);
+ }
+ }
+ return targetElementCollector;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/ElementInitializers.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/ElementInitializers.java
index 0152c5748bf..8a266550d72 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/ElementInitializers.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/ElementInitializers.java
@@ -1,685 +1,685 @@
-/**
- * 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.deployment.providers;
-
-import org.eclipse.papyrus.uml.diagram.deployment.expressions.UMLOCLFactory;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.uml2.uml.Artifact;
-import org.eclipse.uml2.uml.Comment;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.Dependency;
-import org.eclipse.uml2.uml.Deployment;
-import org.eclipse.uml2.uml.Device;
-import org.eclipse.uml2.uml.ExecutionEnvironment;
-import org.eclipse.uml2.uml.LiteralString;
-import org.eclipse.uml2.uml.Manifestation;
-import org.eclipse.uml2.uml.Model;
-import org.eclipse.uml2.uml.Node;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.ValueSpecification;
-
-/**
- * @generated
- */
-public class ElementInitializers {
-
- protected ElementInitializers() {
- // use #getInstance to access cached instance
- }
-
- /**
- * @generated
- */
- public void init_Model_2010(Model instance) {
- try {
- Object value_0 = name_Model_2010(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Package_2009(Package instance) {
- try {
- Object value_0 = name_Package_2009(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Constraint_2005(Constraint instance) {
- try {
- Object value_0 = name_Constraint_2005(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- Object value_1 = specification_Constraint_2005(instance);
- if (value_1 != null) {
- instance.setSpecification(
- (ValueSpecification) value_1
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Comment_2001(Comment instance) {
- try {
- Object value_0 = body_Comment_2001(instance);
- if (value_0 != null) {
- instance.setBody(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_ExecutionEnvironment_2002(ExecutionEnvironment instance) {
- try {
- Object value_0 = name_ExecutionEnvironment_2002(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Device_2003(Device instance) {
- try {
- Object value_0 = name_Device_2003(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Artifact_2006(Artifact instance) {
- try {
- Object value_0 = name_Artifact_2006(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- Object value_1 = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getArtifact(), null).evaluate(instance);
- if (value_1 != null) {
- instance.setFileName(
- (String) value_1
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Node_2008(Node instance) {
- try {
- Object value_0 = name_Node_2008(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Model_49(Model instance) {
- try {
- Object value_0 = name_Model_49(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Package_36(Package instance) {
- try {
- Object value_0 = name_Package_36(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Device_16(Device instance) {
- try {
- Object value_0 = name_Device_16(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Device_44(Device instance) {
- try {
- Object value_0 = name_Device_44(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_ExecutionEnvironment_21(ExecutionEnvironment instance) {
- try {
- Object value_0 = name_ExecutionEnvironment_21(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_ExecutionEnvironment_46(ExecutionEnvironment instance) {
- try {
- Object value_0 = name_ExecutionEnvironment_46(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Node_23(Node instance) {
- try {
- Object value_0 = name_Node_23(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Node_42(Node instance) {
- try {
- Object value_0 = name_Node_42(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Artifact_25(Artifact instance) {
- try {
- Object value_0 = name_Artifact_25(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- Object value_1 = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getArtifact(), null).evaluate(instance);
- if (value_1 != null) {
- instance.setFileName(
- (String) value_1
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Artifact_28(Artifact instance) {
- try {
- Object value_0 = name_Artifact_28(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- Object value_1 = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getArtifact(), null).evaluate(instance);
- if (value_1 != null) {
- instance.setFileName(
- (String) value_1
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Artifact_40(Artifact instance) {
- try {
- Object value_0 = name_Artifact_40(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- Object value_1 = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getArtifact(), null).evaluate(instance);
- if (value_1 != null) {
- instance.setFileName(
- (String) value_1
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Comment_54(Comment instance) {
- try {
- Object value_0 = body_Comment_54(instance);
- if (value_0 != null) {
- instance.setBody(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Constraint_56(Constraint instance) {
- try {
- Object value_0 = name_Constraint_56(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- Object value_1 = specification_Constraint_56(instance);
- if (value_1 != null) {
- instance.setSpecification(
- (ValueSpecification) value_1
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Deployment_4001(Deployment instance) {
- try {
- Object value_0 = name_Deployment_4001(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Manifestation_4002(Manifestation instance) {
- try {
- Object value_0 = name_Manifestation_4002(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Dependency_4004(Dependency instance) {
- try {
- Object value_0 = name_Dependency_4004(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public void init_Dependency_4010(Dependency instance) {
- try {
- Object value_0 = name_Dependency_4010(instance);
- if (value_0 != null) {
- instance.setName(
- (String) value_0
- );
- }
- } catch (RuntimeException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- private String name_Model_2010(Model it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Package_2009(Package it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Constraint_2005(Constraint it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private ValueSpecification specification_Constraint_2005(Constraint it) {
- // Constraint specification init
- LiteralString value = UMLFactory.eINSTANCE.createLiteralString();
- value.setValue("");
- return value;
- }
-
- /**
- * @generated
- */
- private String body_Comment_2001(Comment it) {
- // Comment body init
- return "";
- }
-
- /**
- * @generated
- */
- private String name_ExecutionEnvironment_2002(ExecutionEnvironment it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Device_2003(Device it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Artifact_2006(Artifact it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Node_2008(Node it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Model_49(Model it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Package_36(Package it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Device_16(Device it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Device_44(Device it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_ExecutionEnvironment_21(ExecutionEnvironment it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_ExecutionEnvironment_46(ExecutionEnvironment it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Node_23(Node it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Node_42(Node it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Artifact_25(Artifact it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Artifact_28(Artifact it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Artifact_40(Artifact it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String body_Comment_54(Comment it) {
- // Comment body init
- return "";
- }
-
- /**
- * @generated
- */
- private String name_Constraint_56(Constraint it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private ValueSpecification specification_Constraint_56(Constraint it) {
- // Constraint specification init
- LiteralString value = UMLFactory.eINSTANCE.createLiteralString();
- value.setValue("");
- return value;
- }
-
- /**
- * @generated
- */
- private String name_Deployment_4001(Deployment it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Manifestation_4002(Manifestation it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Dependency_4004(Dependency it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- private String name_Dependency_4010(Dependency it) {
- return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
- }
-
- /**
- * @generated
- */
- public static ElementInitializers getInstance() {
- ElementInitializers cached = UMLDiagramEditorPlugin.getInstance().getElementInitializers();
- if (cached == null) {
- UMLDiagramEditorPlugin.getInstance().setElementInitializers(cached = new ElementInitializers());
- }
- return cached;
- }
-}
+/**
+ * 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.deployment.providers;
+
+import org.eclipse.papyrus.uml.diagram.deployment.expressions.UMLOCLFactory;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.Artifact;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Deployment;
+import org.eclipse.uml2.uml.Device;
+import org.eclipse.uml2.uml.ExecutionEnvironment;
+import org.eclipse.uml2.uml.LiteralString;
+import org.eclipse.uml2.uml.Manifestation;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Node;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * @generated
+ */
+public class ElementInitializers {
+
+ protected ElementInitializers() {
+ // use #getInstance to access cached instance
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Model_2010(Model instance) {
+ try {
+ Object value_0 = name_Model_2010(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Package_2009(Package instance) {
+ try {
+ Object value_0 = name_Package_2009(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Constraint_2005(Constraint instance) {
+ try {
+ Object value_0 = name_Constraint_2005(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ Object value_1 = specification_Constraint_2005(instance);
+ if (value_1 != null) {
+ instance.setSpecification(
+ (ValueSpecification) value_1
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Comment_2001(Comment instance) {
+ try {
+ Object value_0 = body_Comment_2001(instance);
+ if (value_0 != null) {
+ instance.setBody(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_ExecutionEnvironment_2002(ExecutionEnvironment instance) {
+ try {
+ Object value_0 = name_ExecutionEnvironment_2002(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Device_2003(Device instance) {
+ try {
+ Object value_0 = name_Device_2003(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Artifact_2006(Artifact instance) {
+ try {
+ Object value_0 = name_Artifact_2006(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ Object value_1 = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getArtifact(), null).evaluate(instance);
+ if (value_1 != null) {
+ instance.setFileName(
+ (String) value_1
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Node_2008(Node instance) {
+ try {
+ Object value_0 = name_Node_2008(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Model_49(Model instance) {
+ try {
+ Object value_0 = name_Model_49(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Package_36(Package instance) {
+ try {
+ Object value_0 = name_Package_36(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Device_16(Device instance) {
+ try {
+ Object value_0 = name_Device_16(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Device_44(Device instance) {
+ try {
+ Object value_0 = name_Device_44(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_ExecutionEnvironment_21(ExecutionEnvironment instance) {
+ try {
+ Object value_0 = name_ExecutionEnvironment_21(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_ExecutionEnvironment_46(ExecutionEnvironment instance) {
+ try {
+ Object value_0 = name_ExecutionEnvironment_46(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Node_23(Node instance) {
+ try {
+ Object value_0 = name_Node_23(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Node_42(Node instance) {
+ try {
+ Object value_0 = name_Node_42(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Artifact_25(Artifact instance) {
+ try {
+ Object value_0 = name_Artifact_25(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ Object value_1 = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getArtifact(), null).evaluate(instance);
+ if (value_1 != null) {
+ instance.setFileName(
+ (String) value_1
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Artifact_28(Artifact instance) {
+ try {
+ Object value_0 = name_Artifact_28(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ Object value_1 = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getArtifact(), null).evaluate(instance);
+ if (value_1 != null) {
+ instance.setFileName(
+ (String) value_1
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Artifact_40(Artifact instance) {
+ try {
+ Object value_0 = name_Artifact_40(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ Object value_1 = UMLOCLFactory.getExpression(0, UMLPackage.eINSTANCE.getArtifact(), null).evaluate(instance);
+ if (value_1 != null) {
+ instance.setFileName(
+ (String) value_1
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Comment_54(Comment instance) {
+ try {
+ Object value_0 = body_Comment_54(instance);
+ if (value_0 != null) {
+ instance.setBody(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Constraint_56(Constraint instance) {
+ try {
+ Object value_0 = name_Constraint_56(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ Object value_1 = specification_Constraint_56(instance);
+ if (value_1 != null) {
+ instance.setSpecification(
+ (ValueSpecification) value_1
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Deployment_4001(Deployment instance) {
+ try {
+ Object value_0 = name_Deployment_4001(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Manifestation_4002(Manifestation instance) {
+ try {
+ Object value_0 = name_Manifestation_4002(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Dependency_4004(Dependency instance) {
+ try {
+ Object value_0 = name_Dependency_4004(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void init_Dependency_4010(Dependency instance) {
+ try {
+ Object value_0 = name_Dependency_4010(instance);
+ if (value_0 != null) {
+ instance.setName(
+ (String) value_0
+ );
+ }
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Model_2010(Model it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Package_2009(Package it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Constraint_2005(Constraint it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private ValueSpecification specification_Constraint_2005(Constraint it) {
+ // Constraint specification init
+ LiteralString value = UMLFactory.eINSTANCE.createLiteralString();
+ value.setValue("");
+ return value;
+ }
+
+ /**
+ * @generated
+ */
+ private String body_Comment_2001(Comment it) {
+ // Comment body init
+ return "";
+ }
+
+ /**
+ * @generated
+ */
+ private String name_ExecutionEnvironment_2002(ExecutionEnvironment it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Device_2003(Device it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Artifact_2006(Artifact it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Node_2008(Node it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Model_49(Model it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Package_36(Package it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Device_16(Device it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Device_44(Device it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_ExecutionEnvironment_21(ExecutionEnvironment it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_ExecutionEnvironment_46(ExecutionEnvironment it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Node_23(Node it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Node_42(Node it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Artifact_25(Artifact it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Artifact_28(Artifact it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Artifact_40(Artifact it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String body_Comment_54(Comment it) {
+ // Comment body init
+ return "";
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Constraint_56(Constraint it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private ValueSpecification specification_Constraint_56(Constraint it) {
+ // Constraint specification init
+ LiteralString value = UMLFactory.eINSTANCE.createLiteralString();
+ value.setValue("");
+ return value;
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Deployment_4001(Deployment it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Manifestation_4002(Manifestation it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Dependency_4004(Dependency it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ private String name_Dependency_4010(Dependency it) {
+ return NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
+ public static ElementInitializers getInstance() {
+ ElementInitializers cached = UMLDiagramEditorPlugin.getInstance().getElementInitializers();
+ if (cached == null) {
+ UMLDiagramEditorPlugin.getInstance().setElementInitializers(cached = new ElementInitializers());
+ }
+ return cached;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLEditPartProvider.java
index 440a5c7398a..509b5380a0f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLEditPartProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLEditPartProvider.java
@@ -1,32 +1,32 @@
-/**
- * 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.deployment.providers;
-
-import org.eclipse.gmf.tooling.runtime.providers.DefaultEditPartProvider;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.UMLEditPartFactory;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-
-/**
- * @generated
- */
-public class UMLEditPartProvider extends DefaultEditPartProvider {
-
- /**
- * @generated
- */
- public UMLEditPartProvider() {
- super(new UMLEditPartFactory(),
- UMLVisualIDRegistry.TYPED_INSTANCE,
- DeploymentDiagramEditPart.MODEL_ID);
- }
-}
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.deployment.providers;
+
+import org.eclipse.gmf.tooling.runtime.providers.DefaultEditPartProvider;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.UMLEditPartFactory;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+
+/**
+ * @generated
+ */
+public class UMLEditPartProvider extends DefaultEditPartProvider {
+
+ /**
+ * @generated
+ */
+ public UMLEditPartProvider() {
+ super(new UMLEditPartFactory(),
+ UMLVisualIDRegistry.TYPED_INSTANCE,
+ DeploymentDiagramEditPart.MODEL_ID);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLMarkerNavigationProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLMarkerNavigationProvider.java
index aeeecd06f2a..c5176527e08 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLMarkerNavigationProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLMarkerNavigationProvider.java
@@ -1,96 +1,96 @@
-/**
- * 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.deployment.providers;
-
-import java.util.Arrays;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
-import org.eclipse.gmf.runtime.emf.ui.providers.marker.AbstractModelMarkerNavigationProvider;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorUtil;
-
-/**
- * @generated
- */
-public class UMLMarkerNavigationProvider extends AbstractModelMarkerNavigationProvider {
-
- /**
- * @generated
- */
- public static final String MARKER_TYPE = UMLDiagramEditorPlugin.ID + ".diagnostic"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- @Override
- protected void doGotoMarker(IMarker marker) {
- String elementId = marker.getAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, null);
- if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
- return;
- }
- DiagramEditor editor =
- (DiagramEditor) getEditor();
- Map<?, ?> editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
- EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
- if (targetView == null) {
- return;
- }
- EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
- if (targetEditPart != null) {
- UMLDiagramEditorUtil.selectElementsInDiagram(
- editor, Arrays.asList(new EditPart[] { targetEditPart }));
- }
- }
-
- /**
- * @generated
- */
- public static void deleteMarkers(IResource resource) {
- try {
- resource.deleteMarkers(MARKER_TYPE, true, IResource.DEPTH_ZERO);
- } catch (CoreException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Failed to delete validation markers", e); //$NON-NLS-1$
- }
- }
-
- /**
- * @generated
- */
- public static IMarker addMarker(IFile file, String elementId, String location, String message, int statusSeverity) {
- IMarker marker = null;
- try {
- marker = file.createMarker(MARKER_TYPE);
- marker.setAttribute(IMarker.MESSAGE, message);
- marker.setAttribute(IMarker.LOCATION, location);
- marker.setAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, elementId);
- int markerSeverity = IMarker.SEVERITY_INFO;
- if (statusSeverity == IStatus.WARNING) {
- markerSeverity = IMarker.SEVERITY_WARNING;
- } else if (statusSeverity == IStatus.ERROR ||
- statusSeverity == IStatus.CANCEL) {
- markerSeverity = IMarker.SEVERITY_ERROR;
- }
- marker.setAttribute(IMarker.SEVERITY, markerSeverity);
- } catch (CoreException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Failed to create validation marker", e); //$NON-NLS-1$
- }
- return marker;
- }
-}
+/**
+ * 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.deployment.providers;
+
+import java.util.Arrays;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
+import org.eclipse.gmf.runtime.emf.ui.providers.marker.AbstractModelMarkerNavigationProvider;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorUtil;
+
+/**
+ * @generated
+ */
+public class UMLMarkerNavigationProvider extends AbstractModelMarkerNavigationProvider {
+
+ /**
+ * @generated
+ */
+ public static final String MARKER_TYPE = UMLDiagramEditorPlugin.ID + ".diagnostic"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void doGotoMarker(IMarker marker) {
+ String elementId = marker.getAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, null);
+ if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
+ return;
+ }
+ DiagramEditor editor =
+ (DiagramEditor) getEditor();
+ Map<?, ?> editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
+ EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
+ if (targetView == null) {
+ return;
+ }
+ EditPart targetEditPart = (EditPart) editPartRegistry.get(targetView);
+ if (targetEditPart != null) {
+ UMLDiagramEditorUtil.selectElementsInDiagram(
+ editor, Arrays.asList(new EditPart[] { targetEditPart }));
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public static void deleteMarkers(IResource resource) {
+ try {
+ resource.deleteMarkers(MARKER_TYPE, true, IResource.DEPTH_ZERO);
+ } catch (CoreException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Failed to delete validation markers", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public static IMarker addMarker(IFile file, String elementId, String location, String message, int statusSeverity) {
+ IMarker marker = null;
+ try {
+ marker = file.createMarker(MARKER_TYPE);
+ marker.setAttribute(IMarker.MESSAGE, message);
+ marker.setAttribute(IMarker.LOCATION, location);
+ marker.setAttribute(org.eclipse.gmf.runtime.common.core.resources.IMarker.ELEMENT_ID, elementId);
+ int markerSeverity = IMarker.SEVERITY_INFO;
+ if (statusSeverity == IStatus.WARNING) {
+ markerSeverity = IMarker.SEVERITY_WARNING;
+ } else if (statusSeverity == IStatus.ERROR ||
+ statusSeverity == IStatus.CANCEL) {
+ markerSeverity = IMarker.SEVERITY_ERROR;
+ }
+ marker.setAttribute(IMarker.SEVERITY, markerSeverity);
+ } catch (CoreException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Failed to create validation marker", e); //$NON-NLS-1$
+ }
+ return marker;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLParserProvider.java
index bff2a524511..cddc71c33a5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLParserProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLParserProvider.java
@@ -1,822 +1,888 @@
-/**
- * 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.deployment.providers;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.parser.CommentParser;
-import org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser;
-import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.MultiDependencyLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.parsers.MessageFormatParser;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * @generated
- */
-public class UMLParserProvider extends AbstractProvider implements IParserProvider {
-
- /**
- * @generated
- */
- private IParser dependencyName_7Parser;
-
- /**
- * @generated
- */
- private IParser getDependencyName_7Parser() {
- if (dependencyName_7Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- dependencyName_7Parser = parser;
- }
- return dependencyName_7Parser;
- }
-
- /**
- * @generated
- */
- private IParser modelName_48Parser;
-
- /**
- * @generated
- */
- private IParser getModelName_48Parser() {
- if (modelName_48Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- modelName_48Parser = parser;
- }
- return modelName_48Parser;
- }
-
- /**
- * @generated
- */
- private IParser packageName_35Parser;
-
- /**
- * @generated
- */
- private IParser getPackageName_35Parser() {
- if (packageName_35Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- packageName_35Parser = parser;
- }
- return packageName_35Parser;
- }
-
- /**
- * @generated
- */
- private IParser constraintName_2Parser;
-
- /**
- * @generated
- */
- private IParser getConstraintName_2Parser() {
- if (constraintName_2Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- constraintName_2Parser = parser;
- }
- return constraintName_2Parser;
- }
-
- /**
- * @generated
- */
- private ConstraintParser constraintSpecification_3Parser;
-
- /**
- * @generated
- */
- private IParser getConstraintSpecification_3Parser() {
- if (constraintSpecification_3Parser == null) {
- constraintSpecification_3Parser = new ConstraintParser();
- }
- return constraintSpecification_3Parser;
- }
-
- /**
- * @generated
- */
- private CommentParser commentBody_1Parser;
-
- /**
- * @generated
- */
- private IParser getCommentBody_1Parser() {
- if (commentBody_1Parser == null) {
- commentBody_1Parser = new CommentParser();
- }
- return commentBody_1Parser;
- }
-
- /**
- * @generated
- */
- private IParser executionEnvironmentName_5Parser;
-
- /**
- * @generated
- */
- private IParser getExecutionEnvironmentName_5Parser() {
- if (executionEnvironmentName_5Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- executionEnvironmentName_5Parser = parser;
- }
- return executionEnvironmentName_5Parser;
- }
-
- /**
- * @generated
- */
- private IParser deviceName_6Parser;
-
- /**
- * @generated
- */
- private IParser getDeviceName_6Parser() {
- if (deviceName_6Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- deviceName_6Parser = parser;
- }
- return deviceName_6Parser;
- }
-
- /**
- * @generated
- */
- private IParser artifactName_8Parser;
-
- /**
- * @generated
- */
- private IParser getArtifactName_8Parser() {
- if (artifactName_8Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- artifactName_8Parser = parser;
- }
- return artifactName_8Parser;
- }
-
- /**
- * @generated
- */
- private IParser nodeName_9Parser;
-
- /**
- * @generated
- */
- private IParser getNodeName_9Parser() {
- if (nodeName_9Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- nodeName_9Parser = parser;
- }
- return nodeName_9Parser;
- }
-
- /**
- * @generated
- */
- private IParser namedElementName_53Parser;
-
- /**
- * @generated
- */
- private IParser getNamedElementName_53Parser() {
- if (namedElementName_53Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- namedElementName_53Parser = parser;
- }
- return namedElementName_53Parser;
- }
-
- /**
- * @generated
- */
- private IParser modelName_50Parser;
-
- /**
- * @generated
- */
- private IParser getModelName_50Parser() {
- if (modelName_50Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- modelName_50Parser = parser;
- }
- return modelName_50Parser;
- }
-
- /**
- * @generated
- */
- private IParser packageName_37Parser;
-
- /**
- * @generated
- */
- private IParser getPackageName_37Parser() {
- if (packageName_37Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- packageName_37Parser = parser;
- }
- return packageName_37Parser;
- }
-
- /**
- * @generated
- */
- private IParser deviceName_20Parser;
-
- /**
- * @generated
- */
- private IParser getDeviceName_20Parser() {
- if (deviceName_20Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- deviceName_20Parser = parser;
- }
- return deviceName_20Parser;
- }
-
- /**
- * @generated
- */
- private IParser deviceName_45Parser;
-
- /**
- * @generated
- */
- private IParser getDeviceName_45Parser() {
- if (deviceName_45Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- deviceName_45Parser = parser;
- }
- return deviceName_45Parser;
- }
-
- /**
- * @generated
- */
- private IParser executionEnvironmentName_22Parser;
-
- /**
- * @generated
- */
- private IParser getExecutionEnvironmentName_22Parser() {
- if (executionEnvironmentName_22Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- executionEnvironmentName_22Parser = parser;
- }
- return executionEnvironmentName_22Parser;
- }
-
- /**
- * @generated
- */
- private IParser executionEnvironmentName_47Parser;
-
- /**
- * @generated
- */
- private IParser getExecutionEnvironmentName_47Parser() {
- if (executionEnvironmentName_47Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- executionEnvironmentName_47Parser = parser;
- }
- return executionEnvironmentName_47Parser;
- }
-
- /**
- * @generated
- */
- private IParser nodeName_24Parser;
-
- /**
- * @generated
- */
- private IParser getNodeName_24Parser() {
- if (nodeName_24Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- nodeName_24Parser = parser;
- }
- return nodeName_24Parser;
- }
-
- /**
- * @generated
- */
- private IParser nodeName_43Parser;
-
- /**
- * @generated
- */
- private IParser getNodeName_43Parser() {
- if (nodeName_43Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- nodeName_43Parser = parser;
- }
- return nodeName_43Parser;
- }
-
- /**
- * @generated
- */
- private IParser artifactName_27Parser;
-
- /**
- * @generated
- */
- private IParser getArtifactName_27Parser() {
- if (artifactName_27Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- artifactName_27Parser = parser;
- }
- return artifactName_27Parser;
- }
-
- /**
- * @generated
- */
- private IParser artifactName_29Parser;
-
- /**
- * @generated
- */
- private IParser getArtifactName_29Parser() {
- if (artifactName_29Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- artifactName_29Parser = parser;
- }
- return artifactName_29Parser;
- }
-
- /**
- * @generated
- */
- private IParser artifactName_41Parser;
-
- /**
- * @generated
- */
- private IParser getArtifactName_41Parser() {
- if (artifactName_41Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- artifactName_41Parser = parser;
- }
- return artifactName_41Parser;
- }
-
- /**
- * @generated
- */
- private CommentParser commentBody_55Parser;
-
- /**
- * @generated
- */
- private IParser getCommentBody_55Parser() {
- if (commentBody_55Parser == null) {
- commentBody_55Parser = new CommentParser();
- }
- return commentBody_55Parser;
- }
-
- /**
- * @generated
- */
- private IParser constraintName_57Parser;
-
- /**
- * @generated
- */
- private IParser getConstraintName_57Parser() {
- if (constraintName_57Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- constraintName_57Parser = parser;
- }
- return constraintName_57Parser;
- }
-
- /**
- * @generated
- */
- private ConstraintParser constraintSpecification_58Parser;
-
- /**
- * @generated
- */
- private IParser getConstraintSpecification_58Parser() {
- if (constraintSpecification_58Parser == null) {
- constraintSpecification_58Parser = new ConstraintParser();
- }
- return constraintSpecification_58Parser;
- }
-
- /**
- * @generated
- */
- private IParser deploymentName_13Parser;
-
- /**
- * @generated
- */
- private IParser getDeploymentName_13Parser() {
- if (deploymentName_13Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- deploymentName_13Parser = parser;
- }
- return deploymentName_13Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser deploymentName_14Parser;
-
- /**
- * @generated
- */
- private IParser getDeploymentName_14Parser() {
- if (deploymentName_14Parser == null) {
- deploymentName_14Parser = new AppliedStereotypeParser();
- }
- return deploymentName_14Parser;
- }
-
- /**
- * @generated
- */
- private IParser manifestationName_10Parser;
-
- /**
- * @generated
- */
- private IParser getManifestationName_10Parser() {
- if (manifestationName_10Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- manifestationName_10Parser = parser;
- }
- return manifestationName_10Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser manifestationName_11Parser;
-
- /**
- * @generated
- */
- private IParser getManifestationName_11Parser() {
- if (manifestationName_11Parser == null) {
- manifestationName_11Parser = new AppliedStereotypeParser();
- }
- return manifestationName_11Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser generalizationIsSubstitutable_4Parser;
-
- /**
- * @generated
- */
- private IParser getGeneralizationIsSubstitutable_4Parser() {
- if (generalizationIsSubstitutable_4Parser == null) {
- generalizationIsSubstitutable_4Parser = new AppliedStereotypeParser();
- }
- return generalizationIsSubstitutable_4Parser;
- }
-
- /**
- * @generated
- */
- private IParser dependencyName_12Parser;
-
- /**
- * @generated
- */
- private IParser getDependencyName_12Parser() {
- if (dependencyName_12Parser == null) {
- EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
- MessageFormatParser parser = new MessageFormatParser(features);
- dependencyName_12Parser = parser;
- }
- return dependencyName_12Parser;
- }
-
- /**
- * @generated
- */
- private AppliedStereotypeParser dependencyName_15Parser;
-
- /**
- * @generated
- */
- private IParser getDependencyName_15Parser() {
- if (dependencyName_15Parser == null) {
- dependencyName_15Parser = new AppliedStereotypeParser();
- }
- return dependencyName_15Parser;
- }
-
- /**
- * @generated
- */
- protected IParser getParser(int visualID) {
- switch (visualID) {
- case MultiDependencyLabelEditPart.VISUAL_ID:
- return getDependencyName_7Parser();
-
- case ModelNameEditPart.VISUAL_ID:
- return getModelName_48Parser();
-
- case PackageNameEditPart.VISUAL_ID:
- return getPackageName_35Parser();
-
- case ConstraintNameEditPart.VISUAL_ID:
- return getConstraintName_2Parser();
- case ConstraintSpecificationEditPart.VISUAL_ID:
- return getConstraintSpecification_3Parser();
-
- case CommentBodyEditPart.VISUAL_ID:
- return getCommentBody_1Parser();
-
- case ExecutionEnvironmentNameEditPart.VISUAL_ID:
- return getExecutionEnvironmentName_5Parser();
-
- case DeviceNameEditPart.VISUAL_ID:
- return getDeviceName_6Parser();
-
- case ArtifactNameEditPart.VISUAL_ID:
- return getArtifactName_8Parser();
-
- case NodeNameEditPart.VISUAL_ID:
- return getNodeName_9Parser();
-
- case DefaultNamedElementNameEditPart.VISUAL_ID:
- return getNamedElementName_53Parser();
-
- case ModelNameEditPartCN.VISUAL_ID:
- return getModelName_50Parser();
-
- case PackageNameEditPartCN.VISUAL_ID:
- return getPackageName_37Parser();
-
- case DeviceNameEditPartCN.VISUAL_ID:
- return getDeviceName_20Parser();
-
- case NestedDeviceNameEditPartCN.VISUAL_ID:
- return getDeviceName_45Parser();
-
- case ExecutionEnvironmentNameEditPartCN.VISUAL_ID:
- return getExecutionEnvironmentName_22Parser();
-
- case NestedExecutionEnvironmentNameEditPartCN.VISUAL_ID:
- return getExecutionEnvironmentName_47Parser();
-
- case NodeNameEditPartCN.VISUAL_ID:
- return getNodeName_24Parser();
-
- case NestedNodeNameEditPart.VISUAL_ID:
- return getNodeName_43Parser();
-
- case ArtifactNameEditPartCN.VISUAL_ID:
- return getArtifactName_27Parser();
-
- case ArtifactNameEditPartACN.VISUAL_ID:
- return getArtifactName_29Parser();
-
- case NestedArtifactNameEditPart.VISUAL_ID:
- return getArtifactName_41Parser();
-
- case CommentBodyEditPartCN.VISUAL_ID:
- return getCommentBody_55Parser();
-
- case ConstraintNameEditPartCN.VISUAL_ID:
- return getConstraintName_57Parser();
- case ConstraintSpecificationEditPartCN.VISUAL_ID:
- return getConstraintSpecification_58Parser();
-
-
-
-
- case DeploymentNameEditPart.VISUAL_ID:
- return getDeploymentName_13Parser();
- case DeploymentAppliedStereotypeEditPart.VISUAL_ID:
- return getDeploymentName_14Parser();
-
- case ManifestationNameEditPart.VISUAL_ID:
- return getManifestationName_10Parser();
- case ManifestationAppliedStereotypeEditPart.VISUAL_ID:
- return getManifestationName_11Parser();
-
- case GeneralizationAppliedStereotypeEditPart.VISUAL_ID:
- return getGeneralizationIsSubstitutable_4Parser();
-
- case DependencyNameEditPart.VISUAL_ID:
- return getDependencyName_12Parser();
- case DependencyAppliedStereotypeEditPart.VISUAL_ID:
- return getDependencyName_15Parser();
-
-
- }
- return null;
- }
-
- /**
- * Utility method that consults ParserService
- *
- * @generated
- */
- public static IParser getParser(IElementType type, EObject object, String parserHint) {
- return ParserService.getInstance().getParser(new HintAdapter(type, object, parserHint));
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser(IAdaptable hint) {
- String vid = (String) hint.getAdapter(String.class);
- if (vid != null) {
- return getParser(UMLVisualIDRegistry.getVisualID(vid));
- }
- View view =
- (View) hint.getAdapter(View.class);
- if (view != null) {
- return getParser(UMLVisualIDRegistry.getVisualID(view));
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public boolean provides(IOperation operation) {
- if (operation instanceof GetParserOperation) {
- IAdaptable hint =
- ((GetParserOperation) operation).getHint();
- if (UMLElementTypes.getElement(hint) == null) {
- return false;
- }
- return getParser(hint) != null;
- }
- return false;
- }
-
- /**
- * @generated
- */
- private static class HintAdapter extends ParserHintAdapter {
-
- /**
- * @generated
- */
- private final IElementType elementType;
-
- /**
- * @generated
- */
- public HintAdapter(IElementType type, EObject object, String parserHint) {
- super(object, parserHint);
- assert type != null;
- elementType = type;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
- if (IElementType.class.equals(adapter)) {
- return elementType;
- }
- return super.getAdapter(adapter);
- }
- }
-}
+/**
+ * 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.deployment.providers;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.parser.CommentParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser;
+import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.MultiDependencyLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class UMLParserProvider extends AbstractProvider implements IParserProvider {
+
+ /**
+ * @generated
+ */
+ private IParser dependencyName_7Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDependencyName_7Parser() {
+ if (dependencyName_7Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ dependencyName_7Parser = parser;
+ }
+ return dependencyName_7Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser modelName_48Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getModelName_48Parser() {
+ if (modelName_48Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ modelName_48Parser = parser;
+ }
+ return modelName_48Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser packageName_35Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getPackageName_35Parser() {
+ if (packageName_35Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ packageName_35Parser = parser;
+ }
+ return packageName_35Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser constraintName_2Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getConstraintName_2Parser() {
+ if (constraintName_2Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ constraintName_2Parser = parser;
+ }
+ return constraintName_2Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ConstraintParser constraintSpecification_3Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getConstraintSpecification_3Parser() {
+ if (constraintSpecification_3Parser == null) {
+ constraintSpecification_3Parser = new ConstraintParser();
+ }
+ return constraintSpecification_3Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private CommentParser commentBody_1Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getCommentBody_1Parser() {
+ if (commentBody_1Parser == null) {
+ commentBody_1Parser = new CommentParser();
+ }
+ return commentBody_1Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser executionEnvironmentName_5Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getExecutionEnvironmentName_5Parser() {
+ if (executionEnvironmentName_5Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ executionEnvironmentName_5Parser = parser;
+ }
+ return executionEnvironmentName_5Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser deviceName_6Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDeviceName_6Parser() {
+ if (deviceName_6Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ deviceName_6Parser = parser;
+ }
+ return deviceName_6Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser artifactName_8Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getArtifactName_8Parser() {
+ if (artifactName_8Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ artifactName_8Parser = parser;
+ }
+ return artifactName_8Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser artifactName_61Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getArtifactName_61Parser() {
+ if (artifactName_61Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ artifactName_61Parser = parser;
+ }
+ return artifactName_61Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser nodeName_9Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getNodeName_9Parser() {
+ if (nodeName_9Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ nodeName_9Parser = parser;
+ }
+ return nodeName_9Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser namedElementName_53Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getNamedElementName_53Parser() {
+ if (namedElementName_53Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ namedElementName_53Parser = parser;
+ }
+ return namedElementName_53Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser modelName_50Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getModelName_50Parser() {
+ if (modelName_50Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ modelName_50Parser = parser;
+ }
+ return modelName_50Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser packageName_37Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getPackageName_37Parser() {
+ if (packageName_37Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ packageName_37Parser = parser;
+ }
+ return packageName_37Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser deviceName_20Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDeviceName_20Parser() {
+ if (deviceName_20Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ deviceName_20Parser = parser;
+ }
+ return deviceName_20Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser deviceName_45Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDeviceName_45Parser() {
+ if (deviceName_45Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ deviceName_45Parser = parser;
+ }
+ return deviceName_45Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser executionEnvironmentName_22Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getExecutionEnvironmentName_22Parser() {
+ if (executionEnvironmentName_22Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ executionEnvironmentName_22Parser = parser;
+ }
+ return executionEnvironmentName_22Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser executionEnvironmentName_47Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getExecutionEnvironmentName_47Parser() {
+ if (executionEnvironmentName_47Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ executionEnvironmentName_47Parser = parser;
+ }
+ return executionEnvironmentName_47Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser nodeName_24Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getNodeName_24Parser() {
+ if (nodeName_24Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ nodeName_24Parser = parser;
+ }
+ return nodeName_24Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser nodeName_43Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getNodeName_43Parser() {
+ if (nodeName_43Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ nodeName_43Parser = parser;
+ }
+ return nodeName_43Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser artifactName_27Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getArtifactName_27Parser() {
+ if (artifactName_27Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ artifactName_27Parser = parser;
+ }
+ return artifactName_27Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser artifactName_59Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getArtifactName_59Parser() {
+ if (artifactName_59Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ artifactName_59Parser = parser;
+ }
+ return artifactName_59Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser artifactName_29Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getArtifactName_29Parser() {
+ if (artifactName_29Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ artifactName_29Parser = parser;
+ }
+ return artifactName_29Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser artifactName_60Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getArtifactName_60Parser() {
+ if (artifactName_60Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ artifactName_60Parser = parser;
+ }
+ return artifactName_60Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser artifactName_41Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getArtifactName_41Parser() {
+ if (artifactName_41Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ artifactName_41Parser = parser;
+ }
+ return artifactName_41Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private CommentParser commentBody_55Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getCommentBody_55Parser() {
+ if (commentBody_55Parser == null) {
+ commentBody_55Parser = new CommentParser();
+ }
+ return commentBody_55Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser constraintName_57Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getConstraintName_57Parser() {
+ if (constraintName_57Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ constraintName_57Parser = parser;
+ }
+ return constraintName_57Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private ConstraintParser constraintSpecification_58Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getConstraintSpecification_58Parser() {
+ if (constraintSpecification_58Parser == null) {
+ constraintSpecification_58Parser = new ConstraintParser();
+ }
+ return constraintSpecification_58Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser deploymentName_13Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDeploymentName_13Parser() {
+ if (deploymentName_13Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ deploymentName_13Parser = parser;
+ }
+ return deploymentName_13Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser deploymentName_14Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDeploymentName_14Parser() {
+ if (deploymentName_14Parser == null) {
+ deploymentName_14Parser = new AppliedStereotypeParser();
+ }
+ return deploymentName_14Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser manifestationName_10Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getManifestationName_10Parser() {
+ if (manifestationName_10Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ manifestationName_10Parser = parser;
+ }
+ return manifestationName_10Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser manifestationName_11Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getManifestationName_11Parser() {
+ if (manifestationName_11Parser == null) {
+ manifestationName_11Parser = new AppliedStereotypeParser();
+ }
+ return manifestationName_11Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser generalizationIsSubstitutable_4Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getGeneralizationIsSubstitutable_4Parser() {
+ if (generalizationIsSubstitutable_4Parser == null) {
+ generalizationIsSubstitutable_4Parser = new AppliedStereotypeParser();
+ }
+ return generalizationIsSubstitutable_4Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private IParser dependencyName_12Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDependencyName_12Parser() {
+ if (dependencyName_12Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ dependencyName_12Parser = parser;
+ }
+ return dependencyName_12Parser;
+ }
+
+ /**
+ * @generated
+ */
+ private AppliedStereotypeParser dependencyName_15Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getDependencyName_15Parser() {
+ if (dependencyName_15Parser == null) {
+ dependencyName_15Parser = new AppliedStereotypeParser();
+ }
+ return dependencyName_15Parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected IParser getParser(int visualID) {
+ switch (visualID) {
+ case MultiDependencyLabelEditPart.VISUAL_ID:
+ return getDependencyName_7Parser();
+
+ case ModelNameEditPart.VISUAL_ID:
+ return getModelName_48Parser();
+
+ case PackageNameEditPart.VISUAL_ID:
+ return getPackageName_35Parser();
+
+ case ConstraintNameEditPart.VISUAL_ID:
+ return getConstraintName_2Parser();
+ case ConstraintSpecificationEditPart.VISUAL_ID:
+ return getConstraintSpecification_3Parser();
+
+ case CommentBodyEditPart.VISUAL_ID:
+ return getCommentBody_1Parser();
+
+ case ExecutionEnvironmentNameEditPart.VISUAL_ID:
+ return getExecutionEnvironmentName_5Parser();
+
+ case DeviceNameEditPart.VISUAL_ID:
+ return getDeviceName_6Parser();
+
+ case ArtifactNameEditPart.VISUAL_ID:
+ return getArtifactName_8Parser();
+ case ArtifactFloatingLabelEditPart.VISUAL_ID:
+ return getArtifactName_61Parser();
+
+ case NodeNameEditPart.VISUAL_ID:
+ return getNodeName_9Parser();
+
+ case DefaultNamedElementNameEditPart.VISUAL_ID:
+ return getNamedElementName_53Parser();
+
+ case ModelNameEditPartCN.VISUAL_ID:
+ return getModelName_50Parser();
+
+ case PackageNameEditPartCN.VISUAL_ID:
+ return getPackageName_37Parser();
+
+ case DeviceNameEditPartCN.VISUAL_ID:
+ return getDeviceName_20Parser();
+
+ case NestedDeviceNameEditPartCN.VISUAL_ID:
+ return getDeviceName_45Parser();
+
+ case ExecutionEnvironmentNameEditPartCN.VISUAL_ID:
+ return getExecutionEnvironmentName_22Parser();
+
+ case NestedExecutionEnvironmentNameEditPartCN.VISUAL_ID:
+ return getExecutionEnvironmentName_47Parser();
+
+ case NodeNameEditPartCN.VISUAL_ID:
+ return getNodeName_24Parser();
+
+ case NestedNodeNameEditPart.VISUAL_ID:
+ return getNodeName_43Parser();
+
+ case ArtifactNameEditPartCN.VISUAL_ID:
+ return getArtifactName_27Parser();
+ case ArtifactFloatingLabelEditPartCN.VISUAL_ID:
+ return getArtifactName_59Parser();
+
+ case ArtifactNameEditPartACN.VISUAL_ID:
+ return getArtifactName_29Parser();
+ case ArtifactFloatingLabelEditPartACN.VISUAL_ID:
+ return getArtifactName_60Parser();
+
+ case NestedArtifactNameEditPart.VISUAL_ID:
+ return getArtifactName_41Parser();
+
+ case CommentBodyEditPartCN.VISUAL_ID:
+ return getCommentBody_55Parser();
+
+ case ConstraintNameEditPartCN.VISUAL_ID:
+ return getConstraintName_57Parser();
+ case ConstraintSpecificationEditPartCN.VISUAL_ID:
+ return getConstraintSpecification_58Parser();
+
+
+
+
+ case DeploymentNameEditPart.VISUAL_ID:
+ return getDeploymentName_13Parser();
+ case DeploymentAppliedStereotypeEditPart.VISUAL_ID:
+ return getDeploymentName_14Parser();
+
+ case ManifestationNameEditPart.VISUAL_ID:
+ return getManifestationName_10Parser();
+ case ManifestationAppliedStereotypeEditPart.VISUAL_ID:
+ return getManifestationName_11Parser();
+
+ case GeneralizationAppliedStereotypeEditPart.VISUAL_ID:
+ return getGeneralizationIsSubstitutable_4Parser();
+
+ case DependencyNameEditPart.VISUAL_ID:
+ return getDependencyName_12Parser();
+ case DependencyAppliedStereotypeEditPart.VISUAL_ID:
+ return getDependencyName_15Parser();
+
+
+ }
+ return null;
+ }
+
+ /**
+ * Utility method that consults ParserService
+ *
+ * @generated
+ */
+ public static IParser getParser(IElementType type, EObject object, String parserHint) {
+ return ParserService.getInstance().getParser(new HintAdapter(type, object, parserHint));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser(IAdaptable hint) {
+ String vid = (String) hint.getAdapter(String.class);
+ if (vid != null) {
+ return getParser(UMLVisualIDRegistry.getVisualID(vid));
+ }
+ View view =
+ (View) hint.getAdapter(View.class);
+ if (view != null) {
+ return getParser(UMLVisualIDRegistry.getVisualID(view));
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean provides(IOperation operation) {
+ if (operation instanceof GetParserOperation) {
+ IAdaptable hint =
+ ((GetParserOperation) operation).getHint();
+ if (UMLElementTypes.getElement(hint) == null) {
+ return false;
+ }
+ return getParser(hint) != null;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ private static class HintAdapter extends ParserHintAdapter {
+
+ /**
+ * @generated
+ */
+ private final IElementType elementType;
+
+ /**
+ * @generated
+ */
+ public HintAdapter(IElementType type, EObject object, String parserHint) {
+ super(object, parserHint);
+ assert type != null;
+ elementType = type;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ if (IElementType.class.equals(adapter)) {
+ return elementType;
+ }
+ return super.getAdapter(adapter);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLValidationDecoratorProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLValidationDecoratorProvider.java
index 497f688407b..b048b60a8f8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLValidationDecoratorProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLValidationDecoratorProvider.java
@@ -1,74 +1,74 @@
-/**
- * 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.deployment.providers;
-
-import org.eclipse.gef.EditDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.editparts.AbstractConnectionEditPart;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.CreateDecoratorsOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.providers.ValidationDecoratorProvider;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-
-/**
- * @generated
- */
-public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider implements IDecoratorProvider {
-
- /**
- * @generated
- */
- @Override
- public void createDecorators(IDecoratorTarget decoratorTarget) {
- EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
- if (editPart instanceof GraphicalEditPart ||
- editPart instanceof AbstractConnectionEditPart) {
- Object model = editPart.getModel();
- if ((model instanceof View)) {
- View view = (View) model;
- if (!(view instanceof Edge) && !view.isSetElement()) {
- return;
- }
- }
- EditDomain ed = editPart.getViewer().getEditDomain();
- if (!(ed instanceof DiagramEditDomain)) {
- return;
- }
- if (((DiagramEditDomain) ed).getEditorPart() instanceof UMLDiagramEditor) {
- decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
- }
- }
- }
-
- /**
- * @generated
- */
- @Override
- public boolean provides(IOperation operation) {
- if (!(operation instanceof CreateDecoratorsOperation)) {
- return false;
- }
- IDecoratorTarget decoratorTarget =
- ((CreateDecoratorsOperation) operation).getDecoratorTarget();
- View view = (View) decoratorTarget.getAdapter(
- View.class);
- return view != null && DeploymentDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
- }
-}
+/**
+ * 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.deployment.providers;
+
+import org.eclipse.gef.EditDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.editparts.AbstractConnectionEditPart;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.CreateDecoratorsOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.providers.ValidationDecoratorProvider;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditor;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+
+/**
+ * @generated
+ */
+public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider implements IDecoratorProvider {
+
+ /**
+ * @generated
+ */
+ @Override
+ public void createDecorators(IDecoratorTarget decoratorTarget) {
+ EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
+ if (editPart instanceof GraphicalEditPart ||
+ editPart instanceof AbstractConnectionEditPart) {
+ Object model = editPart.getModel();
+ if ((model instanceof View)) {
+ View view = (View) model;
+ if (!(view instanceof Edge) && !view.isSetElement()) {
+ return;
+ }
+ }
+ EditDomain ed = editPart.getViewer().getEditDomain();
+ if (!(ed instanceof DiagramEditDomain)) {
+ return;
+ }
+ if (((DiagramEditDomain) ed).getEditorPart() instanceof UMLDiagramEditor) {
+ decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public boolean provides(IOperation operation) {
+ if (!(operation instanceof CreateDecoratorsOperation)) {
+ return false;
+ }
+ IDecoratorTarget decoratorTarget =
+ ((CreateDecoratorsOperation) operation).getDecoratorTarget();
+ View view = (View) decoratorTarget.getAdapter(
+ View.class);
+ return view != null && DeploymentDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLValidationProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLValidationProvider.java
index 33b4e5bed9c..7709f8754f8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLValidationProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLValidationProvider.java
@@ -1,76 +1,76 @@
-/**
- * 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.deployment.providers;
-
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-
-/**
- * @generated
- */
-public class UMLValidationProvider {
-
- /**
- * @generated
- */
- private static boolean constraintsActive = false;
-
- /**
- * @generated
- */
- public static boolean shouldConstraintsBePrivate() {
- return false;
- }
-
- /**
- * @generated
- */
- public static void runWithConstraints(TransactionalEditingDomain editingDomain, Runnable operation) {
- final Runnable op = operation;
- Runnable task = new Runnable() {
- @Override
- public void run() {
- try {
- constraintsActive = true;
- op.run();
- } finally {
- constraintsActive = false;
- }
- }
- };
- if (editingDomain != null) {
- try {
- editingDomain.runExclusive(task);
- } catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Validation failed", e); //$NON-NLS-1$
- }
- } else {
- task.run();
- }
- }
-
- /**
- * @generated
- */
- static boolean isInDefaultEditorContext(Object object) {
- if (shouldConstraintsBePrivate() && !constraintsActive) {
- return false;
- }
- if (object instanceof View) {
- return constraintsActive && DeploymentDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID((View) object));
- }
- return true;
- }
-}
+/**
+ * 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.deployment.providers;
+
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+
+/**
+ * @generated
+ */
+public class UMLValidationProvider {
+
+ /**
+ * @generated
+ */
+ private static boolean constraintsActive = false;
+
+ /**
+ * @generated
+ */
+ public static boolean shouldConstraintsBePrivate() {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public static void runWithConstraints(TransactionalEditingDomain editingDomain, Runnable operation) {
+ final Runnable op = operation;
+ Runnable task = new Runnable() {
+ @Override
+ public void run() {
+ try {
+ constraintsActive = true;
+ op.run();
+ } finally {
+ constraintsActive = false;
+ }
+ }
+ };
+ if (editingDomain != null) {
+ try {
+ editingDomain.runExclusive(task);
+ } catch (Exception e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Validation failed", e); //$NON-NLS-1$
+ }
+ } else {
+ task.run();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ static boolean isInDefaultEditorContext(Object object) {
+ if (shouldConstraintsBePrivate() && !constraintsActive) {
+ return false;
+ }
+ if (object instanceof View) {
+ return constraintsActive && DeploymentDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID((View) object));
+ }
+ return true;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLViewProvider.java
index 0fdc12b134d..f3168d566a2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/providers/UMLViewProvider.java
@@ -1,1258 +1,1276 @@
-/**
- * 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.deployment.providers;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.providers.IViewProvider;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.notation.Connector;
-import org.eclipse.gmf.runtime.notation.DecorationNode;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.FillStyle;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.Location;
-import org.eclipse.gmf.runtime.notation.MeasurementUnit;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.RelativeBendpoints;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.TitleStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartACN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.LinkDescriptorEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.MultiDependencyLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackagePackageableElementCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackagePackageableElementCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.FontData;
-
-/**
- * @generated
- */
-public class UMLViewProvider extends AbstractProvider implements IViewProvider {
-
- /**
- * @generated
- */
- @Override
- public final boolean provides(IOperation operation) {
- if (operation instanceof CreateViewForKindOperation) {
- return provides((CreateViewForKindOperation) operation);
- }
- assert operation instanceof CreateViewOperation;
- if (operation instanceof CreateDiagramViewOperation) {
- return provides((CreateDiagramViewOperation) operation);
- } else if (operation instanceof CreateEdgeViewOperation) {
- return provides((CreateEdgeViewOperation) operation);
- } else if (operation instanceof CreateNodeViewOperation) {
- return provides((CreateNodeViewOperation) operation);
- }
- return false;
- }
-
- /**
- * @generated
- */
- protected boolean provides(CreateViewForKindOperation op) {
- /*
- if (op.getViewKind() == Node.class)
- return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
- 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;
- }
-
- /**
- * @generated
- */
- protected String getDiagramProvidedId() {
- /*
- * Indicates for which diagram this provider works for.
- * <p>
- * This method can be overloaded when diagram editor inherits from another one, but should never be <code>null</code>
- * </p>
- *
- * @return the unique identifier of the diagram for which views are provided.
- */
- return DeploymentDiagramEditPart.MODEL_ID;
- }
-
- /**
- * @generated
- */
- protected boolean provides(CreateDiagramViewOperation op) {
- return DeploymentDiagramEditPart.MODEL_ID.equals(op.getSemanticHint()) && UMLVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())) != -1;
- }
-
- /**
- * @generated
- */
- protected boolean provides(CreateNodeViewOperation op) {
- if (op.getContainerView() == null) {
- return false;
- }
- IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- EObject domainElement = getSemanticElement(op.getSemanticAdapter());
- int visualID;
- if (op.getSemanticHint() == null) {
- // Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
- // In this situation there should be NO elementType, visualID will be determined
- // by VisualIDRegistry.getNodeVisualID() for domainElement.
- if (elementType != null || domainElement == null) {
- return false;
- }
- visualID = UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement);
- } else {
- visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint());
- if (elementType != null) {
- if (elementType instanceof IExtendedHintedElementType) {
- if (domainElement != null) {
- if (!UMLVisualIDRegistry.checkNodeVisualID(op.getContainerView(), domainElement, visualID)) {
- return false;
- }
- }
- } else {
- if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
- return false; // foreign element type
- }
- }
- String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
- if (!op.getSemanticHint().equals(elementTypeHint)) {
- return false; // if semantic hint is specified it should be the same as in element type
- }
- if (domainElement != null && visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
- return false; // visual id for node EClass should match visual id from element type
- }
- } else {
- if (!DeploymentDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(op.getContainerView()))) {
- return false; // foreign diagram
- }
- switch (visualID) {
- case DependencyNodeEditPart.VISUAL_ID:
- case ConstraintEditPart.VISUAL_ID:
- case CommentEditPart.VISUAL_ID:
- case ExecutionEnvironmentEditPart.VISUAL_ID:
- case DeviceEditPart.VISUAL_ID:
- case ArtifactEditPart.VISUAL_ID:
- case NodeEditPart.VISUAL_ID:
- case DefaultNamedElementEditPart.VISUAL_ID:
- case CommentEditPartCN.VISUAL_ID:
- case ConstraintEditPartCN.VISUAL_ID:
- case ModelEditPart.VISUAL_ID:
- case PackageEditPart.VISUAL_ID:
- case ModelEditPartCN.VISUAL_ID:
- case PackageEditPartCN.VISUAL_ID:
- case DeviceEditPartCN.VISUAL_ID:
- case NestedDeviceEditPartCN.VISUAL_ID:
- case ExecutionEnvironmentEditPartCN.VISUAL_ID:
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
- case NodeEditPartCN.VISUAL_ID:
- case NestedNodeEditPartCN.VISUAL_ID:
- case ArtifactEditPartCN.VISUAL_ID:
- case ArtifactEditPartACN.VISUAL_ID:
- case NestedArtifactNodeEditPartCN.VISUAL_ID:
- if (domainElement == null || visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
- return false; // visual id in semantic hint should match visual id for domain element
- }
- break;
- default:
- return false;
- }
- }
- }
- return DependencyNodeEditPart.VISUAL_ID == visualID || ModelEditPart.VISUAL_ID == visualID || PackageEditPart.VISUAL_ID == visualID || ConstraintEditPart.VISUAL_ID == visualID || CommentEditPart.VISUAL_ID == visualID
- || ExecutionEnvironmentEditPart.VISUAL_ID == visualID || DeviceEditPart.VISUAL_ID == visualID || ArtifactEditPart.VISUAL_ID == visualID || NodeEditPart.VISUAL_ID == visualID || DefaultNamedElementEditPart.VISUAL_ID == visualID
- || ModelEditPartCN.VISUAL_ID == visualID || PackageEditPartCN.VISUAL_ID == visualID || DeviceEditPartCN.VISUAL_ID == visualID || NestedDeviceEditPartCN.VISUAL_ID == visualID || ExecutionEnvironmentEditPartCN.VISUAL_ID == visualID
- || NestedExecutionEnvironmentEditPartCN.VISUAL_ID == visualID || NodeEditPartCN.VISUAL_ID == visualID || NestedNodeEditPartCN.VISUAL_ID == visualID || ArtifactEditPartCN.VISUAL_ID == visualID || ArtifactEditPartACN.VISUAL_ID == visualID
- || NestedArtifactNodeEditPartCN.VISUAL_ID == visualID || CommentEditPartCN.VISUAL_ID == visualID || ConstraintEditPartCN.VISUAL_ID == visualID;
-
-
- }
-
- /**
- * @generated
- */
- protected boolean provides(CreateEdgeViewOperation op) {
- IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- //RS: add code for extended types creation
- if (elementType instanceof IExtendedHintedElementType) {
- IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType);
- if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) {
- return false; // foreign element type.
- }
- } else {
- if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
- return false; // foreign element type
- }
- }
- //if (!org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
- // return false; // foreign element type
- //}
- // END R.S.
- String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
- if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) {
- return false; // our hint is visual id and must be specified, and it should be the same as in element type
- }
- int visualID = UMLVisualIDRegistry.getVisualID(elementTypeHint);
- EObject domainElement = getSemanticElement(op.getSemanticAdapter());
- if (domainElement != null && visualID != UMLVisualIDRegistry.getLinkWithClassVisualID(domainElement)) {
- return false; // visual id for link EClass should match visual id from element type
- }
- return true;
- }
-
- /**
- * @generated
- */
- @Override
- @SuppressWarnings("unchecked")
- public Diagram createDiagram(IAdaptable semanticAdapter, String diagramKind, PreferencesHint preferencesHint) {
- Diagram diagram = NotationFactory.eINSTANCE.createDiagram();
- DiagramVersioningUtils.stampCurrentVersion(diagram);
- diagram.getStyles().add(NotationFactory.eINSTANCE.createDiagramStyle());
- diagram.setType(DeploymentDiagramEditPart.MODEL_ID);
- diagram.setElement(getSemanticElement(semanticAdapter));
- diagram.setMeasurementUnit(MeasurementUnit.PIXEL_LITERAL);
- return diagram;
- }
-
- /**
- * @generated
- */
- @Override
- public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
- final EObject domainElement = getSemanticElement(semanticAdapter);
- final int visualID;
- if (semanticHint == null) {
- visualID = UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
- } else {
- visualID = UMLVisualIDRegistry.getVisualID(semanticHint);
- }
- switch (visualID) {
- case DependencyNodeEditPart.VISUAL_ID:
- return createDependency_2011(domainElement, containerView, index, persisted, preferencesHint);
- case ModelEditPart.VISUAL_ID:
- return createModel_2010(domainElement, containerView, index, persisted, preferencesHint);
- case PackageEditPart.VISUAL_ID:
- return createPackage_2009(domainElement, containerView, index, persisted, preferencesHint);
- case ConstraintEditPart.VISUAL_ID:
- return createConstraint_2005(domainElement, containerView, index, persisted, preferencesHint);
- case CommentEditPart.VISUAL_ID:
- return createComment_2001(domainElement, containerView, index, persisted, preferencesHint);
- case ExecutionEnvironmentEditPart.VISUAL_ID:
- return createExecutionEnvironment_2002(domainElement, containerView, index, persisted, preferencesHint);
- case DeviceEditPart.VISUAL_ID:
- return createDevice_2003(domainElement, containerView, index, persisted, preferencesHint);
- case ArtifactEditPart.VISUAL_ID:
- return createArtifact_2006(domainElement, containerView, index, persisted, preferencesHint);
- case NodeEditPart.VISUAL_ID:
- return createNode_2008(domainElement, containerView, index, persisted, preferencesHint);
- case DefaultNamedElementEditPart.VISUAL_ID:
- return createNamedElement_2012(domainElement, containerView, index, persisted, preferencesHint);
- case ModelEditPartCN.VISUAL_ID:
- return createModel_49(domainElement, containerView, index, persisted, preferencesHint);
- case PackageEditPartCN.VISUAL_ID:
- return createPackage_36(domainElement, containerView, index, persisted, preferencesHint);
- case DeviceEditPartCN.VISUAL_ID:
- return createDevice_16(domainElement, containerView, index, persisted, preferencesHint);
- case NestedDeviceEditPartCN.VISUAL_ID:
- return createDevice_44(domainElement, containerView, index, persisted, preferencesHint);
- case ExecutionEnvironmentEditPartCN.VISUAL_ID:
- return createExecutionEnvironment_21(domainElement, containerView, index, persisted, preferencesHint);
- case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
- return createExecutionEnvironment_46(domainElement, containerView, index, persisted, preferencesHint);
- case NodeEditPartCN.VISUAL_ID:
- return createNode_23(domainElement, containerView, index, persisted, preferencesHint);
- case NestedNodeEditPartCN.VISUAL_ID:
- return createNode_42(domainElement, containerView, index, persisted, preferencesHint);
- case ArtifactEditPartCN.VISUAL_ID:
- return createArtifact_25(domainElement, containerView, index, persisted, preferencesHint);
- case ArtifactEditPartACN.VISUAL_ID:
- return createArtifact_28(domainElement, containerView, index, persisted, preferencesHint);
- case NestedArtifactNodeEditPartCN.VISUAL_ID:
- return createArtifact_40(domainElement, containerView, index, persisted, preferencesHint);
- case CommentEditPartCN.VISUAL_ID:
- return createComment_54(domainElement, containerView, index, persisted, preferencesHint);
- case ConstraintEditPartCN.VISUAL_ID:
- return createConstraint_56(domainElement, containerView, index, persisted, preferencesHint);
- }
- // can't happen, provided #provides(CreateNodeViewOperation) is correct
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
- IElementType elementType = getSemanticElementType(semanticAdapter);
- String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
- switch (UMLVisualIDRegistry.getVisualID(elementTypeHint)) {
- case LinkDescriptorEditPart.VISUAL_ID:
- return createLink_4005(containerView, index, persisted, preferencesHint);
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- return createCommentAnnotatedElement_4008(containerView, index, persisted, preferencesHint);
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- return createConstraintConstrainedElement_4009(containerView, index, persisted, preferencesHint);
- case DeploymentEditPart.VISUAL_ID:
- return createDeployment_4001(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case ManifestationEditPart.VISUAL_ID:
- return createManifestation_4002(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case GeneralizationEditPart.VISUAL_ID:
- return createGeneralization_4003(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case DependencyEditPart.VISUAL_ID:
- return createDependency_4004(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- case DependencyBranchEditPart.VISUAL_ID:
- return createDependency_4010(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
- }
- // can never happen, provided #provides(CreateEdgeViewOperation) is correct
- return null;
- }
-
- /**
- * @generated
- */
- public Node createDependency_2011(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DependencyNodeEditPart.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, "DependencyNode");
- Node label7 = createLabel(node, UMLVisualIDRegistry.getType(MultiDependencyLabelEditPart.VISUAL_ID));
- label7.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location7 = (Location) label7.getLayoutConstraint();
- location7.setX(0);
- location7.setY(5);
- return node;
- }
-
- /**
- * @generated
- */
- public Node createModel_2010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ModelEditPart.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, "Model");
- Node label48 = createLabel(node, UMLVisualIDRegistry.getType(ModelNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(ModelPackageableElementCompartmentEditPart.VISUAL_ID), false, true, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Model");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createPackage_2009(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(PackageEditPart.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, "Package");
- Node label35 = createLabel(node, UMLVisualIDRegistry.getType(PackageNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(PackagePackageableElementCompartmentEditPart.VISUAL_ID), false, true, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Package");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createConstraint_2005(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ConstraintEditPart.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, "Constraint");
- Node label2 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID));
- Node label3 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintSpecificationEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createComment_2001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(CommentEditPart.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, "Comment");
- Node label1 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createExecutionEnvironment_2002(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ExecutionEnvironmentEditPart.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, "ExecutionEnvironment");
- Node label5 = createLabel(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID), false, true, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ExecutionEnvironment");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createDevice_2003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DeviceEditPart.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, "Device");
- Node label6 = createLabel(node, UMLVisualIDRegistry.getType(DeviceNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(DeviceCompositeCompartmentEditPart.VISUAL_ID), false, true, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Device");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createArtifact_2006(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ArtifactEditPart.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, "Artifact");
- Node label8 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(ArtifactCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Artifact");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createNode_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(NodeEditPart.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, "Node");
- Node label9 = createLabel(node, UMLVisualIDRegistry.getType(NodeNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(NodeCompositeCompartmentEditPart.VISUAL_ID), false, true, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Node");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createNamedElement_2012(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DefaultNamedElementEditPart.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, "DefaultNamedElement");
- Node label53 = createLabel(node, UMLVisualIDRegistry.getType(DefaultNamedElementNameEditPart.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createModel_49(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ModelEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Model");
- Node label50 = createLabel(node, UMLVisualIDRegistry.getType(ModelNameEditPartCN.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(ModelPackageableElementCompartmentEditPartCN.VISUAL_ID), false, true, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Model");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createPackage_36(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(PackageEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Package");
- Node label37 = createLabel(node, UMLVisualIDRegistry.getType(PackageNameEditPartCN.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(PackagePackageableElementCompartmentEditPartCN.VISUAL_ID), false, true, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Package");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createDevice_16(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(DeviceEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Device");
- Node label20 = createLabel(node, UMLVisualIDRegistry.getType(DeviceNameEditPartCN.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createDevice_44(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(NestedDeviceEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Device");
- Node label45 = createLabel(node, UMLVisualIDRegistry.getType(NestedDeviceNameEditPartCN.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(DeviceCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Device");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createExecutionEnvironment_21(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ExecutionEnvironmentEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExecutionEnvironment");
- Node label22 = createLabel(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentNameEditPartCN.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createExecutionEnvironment_46(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(NestedExecutionEnvironmentEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExecutionEnvironment");
- Node label47 = createLabel(node, UMLVisualIDRegistry.getType(NestedExecutionEnvironmentNameEditPartCN.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ExecutionEnvironment");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createNode_23(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(NodeEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Node");
- Node label24 = createLabel(node, UMLVisualIDRegistry.getType(NodeNameEditPartCN.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createNode_42(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(NestedNodeEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Node");
- Node label43 = createLabel(node, UMLVisualIDRegistry.getType(NestedNodeNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(NodeCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Node");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createArtifact_25(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ArtifactEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Artifact");
- Node label27 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactNameEditPartCN.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createArtifact_28(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ArtifactEditPartACN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Artifact");
- Node label29 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactNameEditPartACN.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(ArtifactCompositeCompartmentEditPartACN.VISUAL_ID), true, true, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Artifact");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createArtifact_40(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(NestedArtifactNodeEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Artifact");
- Node label41 = createLabel(node, UMLVisualIDRegistry.getType(NestedArtifactNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(ArtifactCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Artifact");
- return node;
- }
-
- /**
- * @generated
- */
- public Node createComment_54(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(CommentEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment");
- Node label55 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPartCN.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Node createConstraint_56(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(UMLVisualIDRegistry.getType(ConstraintEditPartCN.VISUAL_ID));
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
- Node label57 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID));
- Node label58 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintSpecificationEditPartCN.VISUAL_ID));
- return node;
- }
-
- /**
- * @generated
- */
- public Edge createLink_4005(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(LinkDescriptorEditPart.VISUAL_ID));
- 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;
- }
-
- /**
- * @generated
- */
- public Edge createCommentAnnotatedElement_4008(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
- edge.setElement(null);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "CommentAnnotatedElement");
- //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;
- }
-
- /**
- * @generated
- */
- public Edge createConstraintConstrainedElement_4009(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
- edge.setElement(null);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ConstraintConstrainedElement");
- //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;
- }
-
- /**
- * @generated
- */
- public Edge createDeployment_4001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(DeploymentEditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Deployment");
- //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);
- //}
- Node label13 = createLabel(edge, UMLVisualIDRegistry.getType(DeploymentNameEditPart.VISUAL_ID));
- label13.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location13 = (Location) label13.getLayoutConstraint();
- location13.setX(0);
- location13.setY(60);
- Node label14 = createLabel(edge, UMLVisualIDRegistry.getType(DeploymentAppliedStereotypeEditPart.VISUAL_ID));
- label14.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location14 = (Location) label14.getLayoutConstraint();
- location14.setX(0);
- location14.setY(60);
-
- PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "Deployment");
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createManifestation_4002(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(ManifestationEditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Manifestation");
- //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);
- //}
- Node label10 = createLabel(edge, UMLVisualIDRegistry.getType(ManifestationNameEditPart.VISUAL_ID));
- label10.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location10 = (Location) label10.getLayoutConstraint();
- location10.setX(0);
- location10.setY(60);
- Node label11 = createLabel(edge, UMLVisualIDRegistry.getType(ManifestationAppliedStereotypeEditPart.VISUAL_ID));
- label11.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location11 = (Location) label11.getLayoutConstraint();
- location11.setX(0);
- location11.setY(30);
-
- PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "Manifestation");
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createGeneralization_4003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID));
- 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) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
- Node label4 = createLabel(edge, UMLVisualIDRegistry.getType(GeneralizationAppliedStereotypeEditPart.VISUAL_ID));
- label4.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location4 = (Location) label4.getLayoutConstraint();
- location4.setX(0);
- location4.setY(60);
-
- PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "Generalization");
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createDependency_4004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "DependencyLink");
- //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);
- //}
- Node label12 = createLabel(edge, UMLVisualIDRegistry.getType(DependencyNameEditPart.VISUAL_ID));
- label12.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location12 = (Location) label12.getLayoutConstraint();
- location12.setX(0);
- location12.setY(40);
- Node label15 = createLabel(edge, UMLVisualIDRegistry.getType(DependencyAppliedStereotypeEditPart.VISUAL_ID));
- label15.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location15 = (Location) label15.getLayoutConstraint();
- location15.setX(0);
- location15.setY(60);
-
- PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "DependencyLink");
- return edge;
- }
-
- /**
- * @generated
- */
- public Edge createDependency_4010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Connector edge = NotationFactory.eINSTANCE.createConnector();
- edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
- RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
- List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
- points.add(new RelativeBendpoint());
- points.add(new RelativeBendpoint());
- bendpoints.setPoints(points);
- edge.setBendpoints(bendpoints);
- ViewUtil.insertChildView(containerView, edge, index, persisted);
- edge.setType(UMLVisualIDRegistry.getType(DependencyBranchEditPart.VISUAL_ID));
- edge.setElement(domainElement);
- // initializePreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "DependencyBranchLink");
- //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;
- }
-
- /**
- * @generated
- */
- protected void stampShortcut(View containerView, Node target) {
- if (!DeploymentDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) {
- EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
- shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
- shortcutAnnotation.getDetails().put("modelID", DeploymentDiagramEditPart.MODEL_ID); //$NON-NLS-1$
- target.getEAnnotations().add(shortcutAnnotation);
- }
- }
-
- /**
- * @generated
- */
- protected Node createLabel(View owner, String hint) {
- DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode();
- rv.setType(hint);
- ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
- return rv;
- }
-
- /**
- * @generated
- */
- protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) {
- //SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
- //rv.setShowTitle(showTitle);
- //rv.setCollapsed(isCollapsed);
- Node rv;
- if (canCollapse) {
- rv = NotationFactory.eINSTANCE.createBasicCompartment();
- } else {
- rv = NotationFactory.eINSTANCE.createDecorationNode();
- }
-
- rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
-
- if (hasTitle) {
- TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle();
- rv.getStyles().add(ts);
- }
- if (canSort) {
- rv.getStyles().add(NotationFactory.eINSTANCE.createSortingStyle());
- }
- if (canFilter) {
- rv.getStyles().add(NotationFactory.eINSTANCE.createFilteringStyle());
- }
- rv.setType(hint);
- ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
- return rv;
- }
-
- /**
- * @generated
- */
- protected EObject getSemanticElement(IAdaptable semanticAdapter) {
- if (semanticAdapter == null) {
- return null;
- }
- EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
- if (eObject != null) {
- return EMFCoreUtil.resolve(TransactionUtil.getEditingDomain(eObject), eObject);
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected IElementType getSemanticElementType(IAdaptable semanticAdapter) {
- if (semanticAdapter == null) {
- return null;
- }
- return (IElementType) semanticAdapter.getAdapter(IElementType.class);
- }
-
- /**
- * @generated
- */
- 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);
- viewFontStyle.setFontName(fontData.getName());
- 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());
- }
- }
-
- /**
- * @generated
- */
- private void initForegroundFromPrefs(View view, final IPreferenceStore store, String elementName) {
- String lineColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_LINE);
- org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(store, lineColorConstant);
- ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB));
- }
-
- /**
- * @generated
- */
- private void initBackgroundFromPrefs(View view, final IPreferenceStore store, String elementName) {
- 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());
-
- ;
- if (store.getBoolean(gradientPolicyConstant)) {
- GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(
- store.getString(gradientColorConstant));
- fillStyle.setGradient(gradientPreferenceConverter.getGradientData());
- fillStyle
- .setTransparency(gradientPreferenceConverter.getTransparency());
- }
- }
-}
+/**
+ * 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.deployment.providers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.providers.IViewProvider;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
+import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewOperation;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.notation.Connector;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.FillStyle;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.MeasurementUnit;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.RelativeBendpoints;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.TitleStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.runtime.notation.datatype.RelativeBendpoint;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactFloatingLabelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartACN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ArtifactNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentBodyEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.CommentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ConstraintSpecificationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DefaultNamedElementNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DependencyNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentDiagramEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeploymentNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.DeviceNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ExecutionEnvironmentNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.LinkDescriptorEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ManifestationNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.ModelPackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.MultiDependencyLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedArtifactNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedDeviceNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedExecutionEnvironmentNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NestedNodeNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeCompositeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.NodeNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackageNameEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackagePackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.deployment.edit.parts.PackagePackageableElementCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.FontData;
+
+/**
+ * @generated
+ */
+public class UMLViewProvider extends AbstractProvider implements IViewProvider {
+
+ /**
+ * @generated
+ */
+ @Override
+ public final boolean provides(IOperation operation) {
+ if (operation instanceof CreateViewForKindOperation) {
+ return provides((CreateViewForKindOperation) operation);
+ }
+ assert operation instanceof CreateViewOperation;
+ if (operation instanceof CreateDiagramViewOperation) {
+ return provides((CreateDiagramViewOperation) operation);
+ } else if (operation instanceof CreateEdgeViewOperation) {
+ return provides((CreateEdgeViewOperation) operation);
+ } else if (operation instanceof CreateNodeViewOperation) {
+ return provides((CreateNodeViewOperation) operation);
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean provides(CreateViewForKindOperation op) {
+ /*
+ * if (op.getViewKind() == Node.class)
+ * return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ * 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;
+ }
+
+ /**
+ * @generated
+ */
+ protected String getDiagramProvidedId() {
+ /*
+ * Indicates for which diagram this provider works for.
+ * <p>
+ * This method can be overloaded when diagram editor inherits from another one, but should never be <code>null</code>
+ * </p>
+ *
+ * @return the unique identifier of the diagram for which views are provided.
+ */
+ return DeploymentDiagramEditPart.MODEL_ID;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean provides(CreateDiagramViewOperation op) {
+ return DeploymentDiagramEditPart.MODEL_ID.equals(op.getSemanticHint()) && UMLVisualIDRegistry.getDiagramVisualID(getSemanticElement(op.getSemanticAdapter())) != -1;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean provides(CreateNodeViewOperation op) {
+ if (op.getContainerView() == null) {
+ return false;
+ }
+ IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
+ EObject domainElement = getSemanticElement(op.getSemanticAdapter());
+ int visualID;
+ if (op.getSemanticHint() == null) {
+ // Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
+ // In this situation there should be NO elementType, visualID will be determined
+ // by VisualIDRegistry.getNodeVisualID() for domainElement.
+ if (elementType != null || domainElement == null) {
+ return false;
+ }
+ visualID = UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement);
+ } else {
+ visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint());
+ if (elementType != null) {
+ if (elementType instanceof IExtendedHintedElementType) {
+ if (domainElement != null) {
+ if (!UMLVisualIDRegistry.checkNodeVisualID(op.getContainerView(), domainElement, visualID)) {
+ return false;
+ }
+ }
+ } else {
+ if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
+ return false; // foreign element type
+ }
+ }
+ String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
+ if (!op.getSemanticHint().equals(elementTypeHint)) {
+ return false; // if semantic hint is specified it should be the same as in element type
+ }
+ if (domainElement != null && visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
+ return false; // visual id for node EClass should match visual id from element type
+ }
+ } else {
+ if (!DeploymentDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(op.getContainerView()))) {
+ return false; // foreign diagram
+ }
+ switch (visualID) {
+ case DependencyNodeEditPart.VISUAL_ID:
+ case ConstraintEditPart.VISUAL_ID:
+ case CommentEditPart.VISUAL_ID:
+ case ExecutionEnvironmentEditPart.VISUAL_ID:
+ case DeviceEditPart.VISUAL_ID:
+ case ArtifactEditPart.VISUAL_ID:
+ case NodeEditPart.VISUAL_ID:
+ case DefaultNamedElementEditPart.VISUAL_ID:
+ case CommentEditPartCN.VISUAL_ID:
+ case ConstraintEditPartCN.VISUAL_ID:
+ case ModelEditPart.VISUAL_ID:
+ case PackageEditPart.VISUAL_ID:
+ case ModelEditPartCN.VISUAL_ID:
+ case PackageEditPartCN.VISUAL_ID:
+ case DeviceEditPartCN.VISUAL_ID:
+ case NestedDeviceEditPartCN.VISUAL_ID:
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID:
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
+ case NodeEditPartCN.VISUAL_ID:
+ case NestedNodeEditPartCN.VISUAL_ID:
+ case ArtifactEditPartCN.VISUAL_ID:
+ case ArtifactEditPartACN.VISUAL_ID:
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+ if (domainElement == null || visualID != UMLVisualIDRegistry.getNodeVisualID(op.getContainerView(), domainElement)) {
+ return false; // visual id in semantic hint should match visual id for domain element
+ }
+ break;
+ default:
+ return false;
+ }
+ }
+ }
+ return DependencyNodeEditPart.VISUAL_ID == visualID || ModelEditPart.VISUAL_ID == visualID || PackageEditPart.VISUAL_ID == visualID || ConstraintEditPart.VISUAL_ID == visualID || CommentEditPart.VISUAL_ID == visualID
+ || ExecutionEnvironmentEditPart.VISUAL_ID == visualID || DeviceEditPart.VISUAL_ID == visualID || ArtifactEditPart.VISUAL_ID == visualID || NodeEditPart.VISUAL_ID == visualID || DefaultNamedElementEditPart.VISUAL_ID == visualID
+ || ModelEditPartCN.VISUAL_ID == visualID || PackageEditPartCN.VISUAL_ID == visualID || DeviceEditPartCN.VISUAL_ID == visualID || NestedDeviceEditPartCN.VISUAL_ID == visualID || ExecutionEnvironmentEditPartCN.VISUAL_ID == visualID
+ || NestedExecutionEnvironmentEditPartCN.VISUAL_ID == visualID || NodeEditPartCN.VISUAL_ID == visualID || NestedNodeEditPartCN.VISUAL_ID == visualID || ArtifactEditPartCN.VISUAL_ID == visualID || ArtifactEditPartACN.VISUAL_ID == visualID
+ || NestedArtifactNodeEditPartCN.VISUAL_ID == visualID || CommentEditPartCN.VISUAL_ID == visualID || ConstraintEditPartCN.VISUAL_ID == visualID;
+
+
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean provides(CreateEdgeViewOperation op) {
+ IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
+ // RS: add code for extended types creation
+ if (elementType instanceof IExtendedHintedElementType) {
+ IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType);
+ if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) {
+ return false; // foreign element type.
+ }
+ } else {
+ if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {
+ return false; // foreign element type
+ }
+ }
+ // if (!org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
+ // return false; // foreign element type
+ // }
+ // END R.S.
+ String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
+ if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) {
+ return false; // our hint is visual id and must be specified, and it should be the same as in element type
+ }
+ int visualID = UMLVisualIDRegistry.getVisualID(elementTypeHint);
+ EObject domainElement = getSemanticElement(op.getSemanticAdapter());
+ if (domainElement != null && visualID != UMLVisualIDRegistry.getLinkWithClassVisualID(domainElement)) {
+ return false; // visual id for link EClass should match visual id from element type
+ }
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Diagram createDiagram(IAdaptable semanticAdapter, String diagramKind, PreferencesHint preferencesHint) {
+ Diagram diagram = NotationFactory.eINSTANCE.createDiagram();
+ DiagramVersioningUtils.stampCurrentVersion(diagram);
+ diagram.getStyles().add(NotationFactory.eINSTANCE.createDiagramStyle());
+ diagram.setType(DeploymentDiagramEditPart.MODEL_ID);
+ diagram.setElement(getSemanticElement(semanticAdapter));
+ diagram.setMeasurementUnit(MeasurementUnit.PIXEL_LITERAL);
+ return diagram;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ final EObject domainElement = getSemanticElement(semanticAdapter);
+ final int visualID;
+ if (semanticHint == null) {
+ visualID = UMLVisualIDRegistry.getNodeVisualID(containerView, domainElement);
+ } else {
+ visualID = UMLVisualIDRegistry.getVisualID(semanticHint);
+ }
+ switch (visualID) {
+ case DependencyNodeEditPart.VISUAL_ID:
+ return createDependency_2011(domainElement, containerView, index, persisted, preferencesHint);
+ case ModelEditPart.VISUAL_ID:
+ return createModel_2010(domainElement, containerView, index, persisted, preferencesHint);
+ case PackageEditPart.VISUAL_ID:
+ return createPackage_2009(domainElement, containerView, index, persisted, preferencesHint);
+ case ConstraintEditPart.VISUAL_ID:
+ return createConstraint_2005(domainElement, containerView, index, persisted, preferencesHint);
+ case CommentEditPart.VISUAL_ID:
+ return createComment_2001(domainElement, containerView, index, persisted, preferencesHint);
+ case ExecutionEnvironmentEditPart.VISUAL_ID:
+ return createExecutionEnvironment_2002(domainElement, containerView, index, persisted, preferencesHint);
+ case DeviceEditPart.VISUAL_ID:
+ return createDevice_2003(domainElement, containerView, index, persisted, preferencesHint);
+ case ArtifactEditPart.VISUAL_ID:
+ return createArtifact_2006(domainElement, containerView, index, persisted, preferencesHint);
+ case NodeEditPart.VISUAL_ID:
+ return createNode_2008(domainElement, containerView, index, persisted, preferencesHint);
+ case DefaultNamedElementEditPart.VISUAL_ID:
+ return createNamedElement_2012(domainElement, containerView, index, persisted, preferencesHint);
+ case ModelEditPartCN.VISUAL_ID:
+ return createModel_49(domainElement, containerView, index, persisted, preferencesHint);
+ case PackageEditPartCN.VISUAL_ID:
+ return createPackage_36(domainElement, containerView, index, persisted, preferencesHint);
+ case DeviceEditPartCN.VISUAL_ID:
+ return createDevice_16(domainElement, containerView, index, persisted, preferencesHint);
+ case NestedDeviceEditPartCN.VISUAL_ID:
+ return createDevice_44(domainElement, containerView, index, persisted, preferencesHint);
+ case ExecutionEnvironmentEditPartCN.VISUAL_ID:
+ return createExecutionEnvironment_21(domainElement, containerView, index, persisted, preferencesHint);
+ case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
+ return createExecutionEnvironment_46(domainElement, containerView, index, persisted, preferencesHint);
+ case NodeEditPartCN.VISUAL_ID:
+ return createNode_23(domainElement, containerView, index, persisted, preferencesHint);
+ case NestedNodeEditPartCN.VISUAL_ID:
+ return createNode_42(domainElement, containerView, index, persisted, preferencesHint);
+ case ArtifactEditPartCN.VISUAL_ID:
+ return createArtifact_25(domainElement, containerView, index, persisted, preferencesHint);
+ case ArtifactEditPartACN.VISUAL_ID:
+ return createArtifact_28(domainElement, containerView, index, persisted, preferencesHint);
+ case NestedArtifactNodeEditPartCN.VISUAL_ID:
+ return createArtifact_40(domainElement, containerView, index, persisted, preferencesHint);
+ case CommentEditPartCN.VISUAL_ID:
+ return createComment_54(domainElement, containerView, index, persisted, preferencesHint);
+ case ConstraintEditPartCN.VISUAL_ID:
+ return createConstraint_56(domainElement, containerView, index, persisted, preferencesHint);
+ }
+ // can't happen, provided #provides(CreateNodeViewOperation) is correct
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ IElementType elementType = getSemanticElementType(semanticAdapter);
+ String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
+ switch (UMLVisualIDRegistry.getVisualID(elementTypeHint)) {
+ case LinkDescriptorEditPart.VISUAL_ID:
+ return createLink_4005(containerView, index, persisted, preferencesHint);
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return createCommentAnnotatedElement_4008(containerView, index, persisted, preferencesHint);
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return createConstraintConstrainedElement_4009(containerView, index, persisted, preferencesHint);
+ case DeploymentEditPart.VISUAL_ID:
+ return createDeployment_4001(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
+ case ManifestationEditPart.VISUAL_ID:
+ return createManifestation_4002(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
+ case GeneralizationEditPart.VISUAL_ID:
+ return createGeneralization_4003(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
+ case DependencyEditPart.VISUAL_ID:
+ return createDependency_4004(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
+ case DependencyBranchEditPart.VISUAL_ID:
+ return createDependency_4010(getSemanticElement(semanticAdapter), containerView, index, persisted, preferencesHint);
+ }
+ // can never happen, provided #provides(CreateEdgeViewOperation) is correct
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createDependency_2011(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(DependencyNodeEditPart.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, "DependencyNode");
+ Node label7 = createLabel(node, UMLVisualIDRegistry.getType(MultiDependencyLabelEditPart.VISUAL_ID));
+ label7.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location7 = (Location) label7.getLayoutConstraint();
+ location7.setX(0);
+ location7.setY(5);
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createModel_2010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ModelEditPart.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, "Model");
+ Node label48 = createLabel(node, UMLVisualIDRegistry.getType(ModelNameEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ModelPackageableElementCompartmentEditPart.VISUAL_ID), false, true, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Model");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createPackage_2009(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(PackageEditPart.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, "Package");
+ Node label35 = createLabel(node, UMLVisualIDRegistry.getType(PackageNameEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(PackagePackageableElementCompartmentEditPart.VISUAL_ID), false, true, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Package");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createConstraint_2005(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ConstraintEditPart.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, "Constraint");
+ Node label2 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID));
+ Node label3 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintSpecificationEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createComment_2001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(CommentEditPart.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, "Comment");
+ Node label1 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createExecutionEnvironment_2002(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ExecutionEnvironmentEditPart.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, "ExecutionEnvironment");
+ Node label5 = createLabel(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentNameEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID), false, true, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ExecutionEnvironment");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createDevice_2003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(DeviceEditPart.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, "Device");
+ Node label6 = createLabel(node, UMLVisualIDRegistry.getType(DeviceNameEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(DeviceCompositeCompartmentEditPart.VISUAL_ID), false, true, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Device");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createArtifact_2006(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ArtifactEditPart.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, "Artifact");
+ Node label8 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactNameEditPart.VISUAL_ID));
+ Node label61 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactFloatingLabelEditPart.VISUAL_ID));
+ label61.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location61 = (Location) label61.getLayoutConstraint();
+ location61.setX(25);
+ location61.setY(0);
+ createCompartment(node, UMLVisualIDRegistry.getType(ArtifactCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Artifact");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createNode_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(NodeEditPart.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, "Node");
+ Node label9 = createLabel(node, UMLVisualIDRegistry.getType(NodeNameEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(NodeCompositeCompartmentEditPart.VISUAL_ID), false, true, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Node");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createNamedElement_2012(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(DefaultNamedElementEditPart.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, "DefaultNamedElement");
+ Node label53 = createLabel(node, UMLVisualIDRegistry.getType(DefaultNamedElementNameEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createModel_49(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ModelEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Model");
+ Node label50 = createLabel(node, UMLVisualIDRegistry.getType(ModelNameEditPartCN.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ModelPackageableElementCompartmentEditPartCN.VISUAL_ID), false, true, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Model");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createPackage_36(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(PackageEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Package");
+ Node label37 = createLabel(node, UMLVisualIDRegistry.getType(PackageNameEditPartCN.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(PackagePackageableElementCompartmentEditPartCN.VISUAL_ID), false, true, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Package");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createDevice_16(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(DeviceEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Device");
+ Node label20 = createLabel(node, UMLVisualIDRegistry.getType(DeviceNameEditPartCN.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createDevice_44(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(NestedDeviceEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Device");
+ Node label45 = createLabel(node, UMLVisualIDRegistry.getType(NestedDeviceNameEditPartCN.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(DeviceCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Device");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createExecutionEnvironment_21(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ExecutionEnvironmentEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExecutionEnvironment");
+ Node label22 = createLabel(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentNameEditPartCN.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createExecutionEnvironment_46(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(NestedExecutionEnvironmentEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExecutionEnvironment");
+ Node label47 = createLabel(node, UMLVisualIDRegistry.getType(NestedExecutionEnvironmentNameEditPartCN.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "ExecutionEnvironment");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createNode_23(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(NodeEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Node");
+ Node label24 = createLabel(node, UMLVisualIDRegistry.getType(NodeNameEditPartCN.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createNode_42(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(NestedNodeEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Node");
+ Node label43 = createLabel(node, UMLVisualIDRegistry.getType(NestedNodeNameEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(NodeCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Node");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createArtifact_25(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ArtifactEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Artifact");
+ Node label27 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactNameEditPartCN.VISUAL_ID));
+ Node label59 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactFloatingLabelEditPartCN.VISUAL_ID));
+ label59.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location59 = (Location) label59.getLayoutConstraint();
+ location59.setX(25);
+ location59.setY(0);
+ createCompartment(node, UMLVisualIDRegistry.getType(ArtifactCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Artifact");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createArtifact_28(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ArtifactEditPartACN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Artifact");
+ Node label29 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactNameEditPartACN.VISUAL_ID));
+ Node label60 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactFloatingLabelEditPartACN.VISUAL_ID));
+ label60.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location60 = (Location) label60.getLayoutConstraint();
+ location60.setX(25);
+ location60.setY(0);
+ createCompartment(node, UMLVisualIDRegistry.getType(ArtifactCompositeCompartmentEditPartACN.VISUAL_ID), true, true, false, false);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Artifact");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createArtifact_40(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(NestedArtifactNodeEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Artifact");
+ Node label41 = createLabel(node, UMLVisualIDRegistry.getType(NestedArtifactNameEditPart.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createComment_54(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(CommentEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment");
+ Node label55 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPartCN.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Node createConstraint_56(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ConstraintEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
+ Node label57 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID));
+ Node label58 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintSpecificationEditPartCN.VISUAL_ID));
+ return node;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createLink_4005(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(LinkDescriptorEditPart.VISUAL_ID));
+ 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;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createCommentAnnotatedElement_4008(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(CommentAnnotatedElementEditPart.VISUAL_ID));
+ edge.setElement(null);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "CommentAnnotatedElement");
+ // 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;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createConstraintConstrainedElement_4009(View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(ConstraintConstrainedElementEditPart.VISUAL_ID));
+ edge.setElement(null);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ConstraintConstrainedElement");
+ // 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;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createDeployment_4001(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(DeploymentEditPart.VISUAL_ID));
+ edge.setElement(domainElement);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Deployment");
+ // 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);
+ // }
+ Node label13 = createLabel(edge, UMLVisualIDRegistry.getType(DeploymentNameEditPart.VISUAL_ID));
+ label13.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location13 = (Location) label13.getLayoutConstraint();
+ location13.setX(0);
+ location13.setY(60);
+ Node label14 = createLabel(edge, UMLVisualIDRegistry.getType(DeploymentAppliedStereotypeEditPart.VISUAL_ID));
+ label14.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location14 = (Location) label14.getLayoutConstraint();
+ location14.setX(0);
+ location14.setY(60);
+
+ PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "Deployment");
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createManifestation_4002(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(ManifestationEditPart.VISUAL_ID));
+ edge.setElement(domainElement);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Manifestation");
+ // 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);
+ // }
+ Node label10 = createLabel(edge, UMLVisualIDRegistry.getType(ManifestationNameEditPart.VISUAL_ID));
+ label10.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location10 = (Location) label10.getLayoutConstraint();
+ location10.setX(0);
+ location10.setY(60);
+ Node label11 = createLabel(edge, UMLVisualIDRegistry.getType(ManifestationAppliedStereotypeEditPart.VISUAL_ID));
+ label11.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location11 = (Location) label11.getLayoutConstraint();
+ location11.setX(0);
+ location11.setY(30);
+
+ PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "Manifestation");
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createGeneralization_4003(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(GeneralizationEditPart.VISUAL_ID));
+ 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) {
+ // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
+ // }
+ Node label4 = createLabel(edge, UMLVisualIDRegistry.getType(GeneralizationAppliedStereotypeEditPart.VISUAL_ID));
+ label4.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location4 = (Location) label4.getLayoutConstraint();
+ location4.setX(0);
+ location4.setY(60);
+
+ PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "Generalization");
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createDependency_4004(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(DependencyEditPart.VISUAL_ID));
+ edge.setElement(domainElement);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "DependencyLink");
+ // 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);
+ // }
+ Node label12 = createLabel(edge, UMLVisualIDRegistry.getType(DependencyNameEditPart.VISUAL_ID));
+ label12.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location12 = (Location) label12.getLayoutConstraint();
+ location12.setX(0);
+ location12.setY(40);
+ Node label15 = createLabel(edge, UMLVisualIDRegistry.getType(DependencyAppliedStereotypeEditPart.VISUAL_ID));
+ label15.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location15 = (Location) label15.getLayoutConstraint();
+ location15.setX(0);
+ location15.setY(60);
+
+ PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "DependencyLink");
+ return edge;
+ }
+
+ /**
+ * @generated
+ */
+ public Edge createDependency_4010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Connector edge = NotationFactory.eINSTANCE.createConnector();
+ edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
+ List<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
+ points.add(new RelativeBendpoint());
+ points.add(new RelativeBendpoint());
+ bendpoints.setPoints(points);
+ edge.setBendpoints(bendpoints);
+ ViewUtil.insertChildView(containerView, edge, index, persisted);
+ edge.setType(UMLVisualIDRegistry.getType(DependencyBranchEditPart.VISUAL_ID));
+ edge.setElement(domainElement);
+ // initializePreferences
+ final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
+
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "DependencyBranchLink");
+ // 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;
+ }
+
+ /**
+ * @generated
+ */
+ protected void stampShortcut(View containerView, Node target) {
+ if (!DeploymentDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) {
+ EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
+ shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
+ shortcutAnnotation.getDetails().put("modelID", DeploymentDiagramEditPart.MODEL_ID); //$NON-NLS-1$
+ target.getEAnnotations().add(shortcutAnnotation);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Node createLabel(View owner, String hint) {
+ DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode();
+ rv.setType(hint);
+ ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
+ return rv;
+ }
+
+ /**
+ * @generated
+ */
+ protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) {
+ // SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
+ // rv.setShowTitle(showTitle);
+ // rv.setCollapsed(isCollapsed);
+ Node rv;
+ if (canCollapse) {
+ rv = NotationFactory.eINSTANCE.createBasicCompartment();
+ } else {
+ rv = NotationFactory.eINSTANCE.createDecorationNode();
+ }
+
+ rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+
+ if (hasTitle) {
+ TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle();
+ rv.getStyles().add(ts);
+ }
+ if (canSort) {
+ rv.getStyles().add(NotationFactory.eINSTANCE.createSortingStyle());
+ }
+ if (canFilter) {
+ rv.getStyles().add(NotationFactory.eINSTANCE.createFilteringStyle());
+ }
+ rv.setType(hint);
+ ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
+ return rv;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getSemanticElement(IAdaptable semanticAdapter) {
+ if (semanticAdapter == null) {
+ return null;
+ }
+ EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
+ if (eObject != null) {
+ return EMFCoreUtil.resolve(TransactionUtil.getEditingDomain(eObject), eObject);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected IElementType getSemanticElementType(IAdaptable semanticAdapter) {
+ if (semanticAdapter == null) {
+ return null;
+ }
+ return (IElementType) semanticAdapter.getAdapter(IElementType.class);
+ }
+
+ /**
+ * @generated
+ */
+ 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);
+ viewFontStyle.setFontName(fontData.getName());
+ 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());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void initForegroundFromPrefs(View view, final IPreferenceStore store, String elementName) {
+ String lineColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_LINE);
+ org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(store, lineColorConstant);
+ ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.RGBToInteger(lineRGB));
+ }
+
+ /**
+ * @generated
+ */
+ private void initBackgroundFromPrefs(View view, final IPreferenceStore store, String elementName) {
+ 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());
+
+ ;
+ 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.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/sheet/UMLPropertySection.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/sheet/UMLPropertySection.java
index ff6ecb2e31d..fcc55381e8f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/sheet/UMLPropertySection.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/sheet/UMLPropertySection.java
@@ -1,32 +1,32 @@
-/**
- * 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.deployment.sheet;
-
-import org.eclipse.gmf.tooling.runtime.sheet.DefaultPropertySection;
-import org.eclipse.ui.views.properties.IPropertySourceProvider;
-
-/**
- * @generated
- */
-public class UMLPropertySection extends DefaultPropertySection implements IPropertySourceProvider {
-
- /**
- * Modify/unwrap selection.
- *
- * @generated
- */
- @Override
- protected Object transformSelection(Object selected) {
- selected = /*super.*/transformSelectionToDomain(selected);
- return selected;
- }
-}
+/**
+ * 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.deployment.sheet;
+
+import org.eclipse.gmf.tooling.runtime.sheet.DefaultPropertySection;
+import org.eclipse.ui.views.properties.IPropertySourceProvider;
+
+/**
+ * @generated
+ */
+public class UMLPropertySection extends DefaultPropertySection implements IPropertySourceProvider {
+
+ /**
+ * Modify/unwrap selection.
+ *
+ * @generated
+ */
+ @Override
+ protected Object transformSelection(Object selected) {
+ selected = /* super. */transformSelectionToDomain(selected);
+ return selected;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/sheet/UMLSheetLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/sheet/UMLSheetLabelProvider.java
index 70462415b75..68380e6bde4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/sheet/UMLSheetLabelProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/sheet/UMLSheetLabelProvider.java
@@ -1,88 +1,88 @@
-/**
- * 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.deployment.sheet;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.viewers.BaseLabelProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @generated
- */
-public class UMLSheetLabelProvider extends BaseLabelProvider implements ILabelProvider {
-
- /**
- * @generated
- */
- @Override
- public String getText(Object element) {
- element = unwrap(element);
- IElementType etype = getElementType(getView(element));
- return etype == null ? "" : etype.getDisplayName();
- }
-
- /**
- * @generated
- */
- @Override
- public Image getImage(Object element) {
- IElementType etype = getElementType(getView(unwrap(element)));
- return etype == null ? null : UMLElementTypes.getImage(etype);
- }
-
- /**
- * @generated
- */
- private Object unwrap(Object element) {
- if (element instanceof IStructuredSelection) {
- return ((IStructuredSelection) element).getFirstElement();
- }
- return element;
- }
-
- /**
- * @generated
- */
- private View getView(Object element) {
- if (element instanceof View) {
- return (View) element;
- }
- if (element instanceof IAdaptable) {
- return (View) ((IAdaptable) element).getAdapter(View.class);
- }
- return null;
- }
-
- /**
- * @generated
- */
- private IElementType getElementType(View view) {
- // For intermediate views climb up the containment hierarchy to find the one associated with an element type.
- while (view != null) {
- int vid = UMLVisualIDRegistry.getVisualID(view);
- IElementType etype =
- UMLElementTypes.getElementType(vid);
- if (etype != null) {
- return etype;
- }
- view = view.eContainer() instanceof View ?
- (View) view.eContainer() : null;
- }
- return null;
- }
-}
+/**
+ * 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.deployment.sheet;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.BaseLabelProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.uml.diagram.deployment.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @generated
+ */
+public class UMLSheetLabelProvider extends BaseLabelProvider implements ILabelProvider {
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getText(Object element) {
+ element = unwrap(element);
+ IElementType etype = getElementType(getView(element));
+ return etype == null ? "" : etype.getDisplayName();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Image getImage(Object element) {
+ IElementType etype = getElementType(getView(unwrap(element)));
+ return etype == null ? null : UMLElementTypes.getImage(etype);
+ }
+
+ /**
+ * @generated
+ */
+ private Object unwrap(Object element) {
+ if (element instanceof IStructuredSelection) {
+ return ((IStructuredSelection) element).getFirstElement();
+ }
+ return element;
+ }
+
+ /**
+ * @generated
+ */
+ private View getView(Object element) {
+ if (element instanceof View) {
+ return (View) element;
+ }
+ if (element instanceof IAdaptable) {
+ return (View) ((IAdaptable) element).getAdapter(View.class);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private IElementType getElementType(View view) {
+ // For intermediate views climb up the containment hierarchy to find the one associated with an element type.
+ while (view != null) {
+ int vid = UMLVisualIDRegistry.getVisualID(view);
+ IElementType etype =
+ UMLElementTypes.getElementType(vid);
+ if (etype != null) {
+ return etype;
+ }
+ view = view.eContainer() instanceof View ?
+ (View) view.eContainer() : null;
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/ActivityAsInteractionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/ActivityAsInteractionFigure.java
index 3c6efdf59e5..d1811a5ba1b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/ActivityAsInteractionFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/ActivityAsInteractionFigure.java
@@ -39,7 +39,7 @@ public class ActivityAsInteractionFigure extends ActivityFigure {
public ActivityAsInteractionFigure() {
createContents();
- this.corner = 0;
+ // this.corner = 0; //use of roundedCompartmentFigure on ActivityFigure witch have corner set to 0 by default
}
protected void createContents() {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionUseFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionUseFigure.java
index 81cbabb9f60..3a80a13451a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionUseFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionUseFigure.java
@@ -44,7 +44,7 @@ public class InteractionUseFigure extends CallBehaviorActionFigure {
public InteractionUseFigure() {
createContents();
- this.corner = 0;
+ this.setCornerDimensions(new Dimension());
}
protected void createContents() {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionWithSnapshotFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionWithSnapshotFigure.java
index 89970a58b33..ccf64408eb9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionWithSnapshotFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/figures/InteractionWithSnapshotFigure.java
@@ -1,127 +1,127 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.interactionoverview.figures;
-
-import java.util.List;
-
-import org.eclipse.draw2d.AbstractLayout;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.ImageFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.papyrus.uml.diagram.interactionoverview.utils.CreateDiagramImage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-
-
-public class InteractionWithSnapshotFigure extends InteractionUseFigure {
-
- protected static String HEADER_NAME = "SD";
-
- protected ImageFigure imageFigure;
-
- protected Image originalSnapshot;
-
- protected Image currentSnapshot;
-
- public InteractionWithSnapshotFigure() {
- this.corner = 0;
- originalSnapshot = null;
- currentSnapshot = null;
- }
-
- @Override
- protected void createContents() {
- add(createInteractionFigureHeader());
- add(createImagePane());
- setLayoutManager(new InteractionLayoutManager());
- interactionHeader.setText(HEADER_NAME);
- }
-
- protected class InteractionLayoutManager extends AbstractLayout {
-
- @Override
- public void layout(final IFigure container) {
- final List childrenList = container.getChildren();
- for (int i = 0; i < container.getChildren().size(); i++) {
- final IFigure currentFigure = (IFigure) childrenList.get(i);
- if (currentFigure.equals(interactionLabelContainer) || currentFigure.equals(imageFigure)) {
- final Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds());
- bound.setSize(((IFigure) childrenList.get(i)).getPreferredSize());
- if (i > 0) {
- bound.y = ((IFigure) childrenList.get(i - 1)).getBounds().getBottomLeft().y + 1;
- } else {
- bound.y = getBounds().y;
- }
- ((IFigure) childrenList.get(i)).setBounds(bound);
-
- }
- }
-
- }
-
- @Override
- protected Dimension calculatePreferredSize(final IFigure container, final int wHint, final int hHint) {
- return new Dimension(-1, -1);
- }
-
- }
-
- @Override
- public WrappingLabel getNameLabel() {
- return interactionHeader;
- }
-
- protected IFigure createImagePane() {
- return imageFigure = new ImageFigure();
- }
-
-
- public void setSnapshot(final Image image) {
- if (image != null) {
- originalSnapshot = image;
- currentSnapshot = new Image(Display.getDefault(), image, SWT.IMAGE_COPY);
- imageFigure.setImage(image);
- }
- }
-
- public void updateSnapshot(final Rectangle newBounds) {
- if (originalSnapshot != null) {
- final Image newImage = CreateDiagramImage.resize(originalSnapshot, newBounds.width, newBounds.height);
- imageFigure.setImage(newImage);
- currentSnapshot.dispose();
- currentSnapshot = newImage;
- }
- }
-
- // Warning before using this method, a method to set the image has to be use right after
- // in the case of undoing "update snapshot" command it calls a refresh to act like the editor just opened
- public void resetImage() {
- imageFigure.setImage(null);
- originalSnapshot.dispose();
- currentSnapshot.dispose();
- }
-
- public ImageFigure getImageFigure() {
- return imageFigure;
- }
-
- public boolean isImageSizeFitsImageFigure() {
- return (isImageFigureHasBound() && getBounds().width == imageFigure.getBounds().height);
- }
-
- private boolean isImageFigureHasBound() {
- return imageFigure.getBounds().height != 0 && imageFigure.getBounds().width != 0;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.interactionoverview.figures;
+
+import java.util.List;
+
+import org.eclipse.draw2d.AbstractLayout;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.ImageFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.papyrus.uml.diagram.interactionoverview.utils.CreateDiagramImage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+
+
+public class InteractionWithSnapshotFigure extends InteractionUseFigure {
+
+ protected static String HEADER_NAME = "SD";
+
+ protected ImageFigure imageFigure;
+
+ protected Image originalSnapshot;
+
+ protected Image currentSnapshot;
+
+ public InteractionWithSnapshotFigure() {
+ this.setCornerDimensions(new Dimension());
+ originalSnapshot = null;
+ currentSnapshot = null;
+ }
+
+ @Override
+ protected void createContents() {
+ add(createInteractionFigureHeader());
+ add(createImagePane());
+ setLayoutManager(new InteractionLayoutManager());
+ interactionHeader.setText(HEADER_NAME);
+ }
+
+ protected class InteractionLayoutManager extends AbstractLayout {
+
+ @Override
+ public void layout(final IFigure container) {
+ final List childrenList = container.getChildren();
+ for (int i = 0; i < container.getChildren().size(); i++) {
+ final IFigure currentFigure = (IFigure) childrenList.get(i);
+ if (currentFigure.equals(interactionLabelContainer) || currentFigure.equals(imageFigure)) {
+ final Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds());
+ bound.setSize(((IFigure) childrenList.get(i)).getPreferredSize());
+ if (i > 0) {
+ bound.y = ((IFigure) childrenList.get(i - 1)).getBounds().getBottomLeft().y + 1;
+ } else {
+ bound.y = getBounds().y;
+ }
+ ((IFigure) childrenList.get(i)).setBounds(bound);
+
+ }
+ }
+
+ }
+
+ @Override
+ protected Dimension calculatePreferredSize(final IFigure container, final int wHint, final int hHint) {
+ return new Dimension(-1, -1);
+ }
+
+ }
+
+ @Override
+ public WrappingLabel getNameLabel() {
+ return interactionHeader;
+ }
+
+ protected IFigure createImagePane() {
+ return imageFigure = new ImageFigure();
+ }
+
+
+ public void setSnapshot(final Image image) {
+ if (image != null) {
+ originalSnapshot = image;
+ currentSnapshot = new Image(Display.getDefault(), image, SWT.IMAGE_COPY);
+ imageFigure.setImage(image);
+ }
+ }
+
+ public void updateSnapshot(final Rectangle newBounds) {
+ if (originalSnapshot != null) {
+ final Image newImage = CreateDiagramImage.resize(originalSnapshot, newBounds.width, newBounds.height);
+ imageFigure.setImage(newImage);
+ currentSnapshot.dispose();
+ currentSnapshot = newImage;
+ }
+ }
+
+ // Warning before using this method, a method to set the image has to be use right after
+ // in the case of undoing "update snapshot" command it calls a refresh to act like the editor just opened
+ public void resetImage() {
+ imageFigure.setImage(null);
+ originalSnapshot.dispose();
+ currentSnapshot.dispose();
+ }
+
+ public ImageFigure getImageFigure() {
+ return imageFigure;
+ }
+
+ public boolean isImageSizeFitsImageFigure() {
+ return (isImageFigureHasBound() && getBounds().width == imageFigure.getBounds().height);
+ }
+
+ private boolean isImageFigureHasBound() {
+ return imageFigure.getBounds().height != 0 && imageFigure.getBounds().width != 0;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/figure/StereotypeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/figure/StereotypeFigure.java
index 871a40c0791..8a56eff8313 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/figure/StereotypeFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/figure/StereotypeFigure.java
@@ -1,37 +1,37 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://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.custom.figure;
-
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
-
-/**
- * Figure for representation of Stereotype
- */
-public class StereotypeFigure extends ClassifierFigure {
-
- /**
- * the tag
- */
- private static String TAG_LABEL = "Stereotype"; //$NON-NLS-1$
-
- /**
- *
- * Constructor.
- *
- */
- public StereotypeFigure() {
- super(TAG_LABEL);
-
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://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.custom.figure;
+
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure;
+
+/**
+ * Figure for representation of Stereotype
+ */
+public class StereotypeFigure extends ClassFigure {
+
+ /**
+ * the tag
+ */
+ private static String TAG_LABEL = "Stereotype"; //$NON-NLS-1$
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public StereotypeFigure() {
+ super(TAG_LABEL);
+
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen
index 12a04d27146..d36b8048546 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen
@@ -458,7 +458,7 @@
metamodelType="/0/@diagram/@topLevelNodes.3/@elementType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure">
<attributes
xsi:type="gmfgen:DefaultSizeAttributes"
width="100"
@@ -539,7 +539,7 @@
editHelperClassName="MetaclassEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure">
<attributes
xsi:type="gmfgen:DefaultSizeAttributes"
width="100"
@@ -1312,7 +1312,7 @@
editHelperClassName="ClassEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure">
<attributes
xsi:type="gmfgen:DefaultSizeAttributes"
width="100"
@@ -1392,7 +1392,7 @@
metamodelType="/0/@diagram/@childNodes.8/@elementType"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure">
<attributes
xsi:type="gmfgen:DefaultSizeAttributes"
width="100"
@@ -3687,11 +3687,11 @@
comment="Manage the class"
genView="/0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.2 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.8"
name="Extended class editpart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart">
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.ClassEditPart">
<propRefreshHook
comment="set the figure active when the feature of the of a class is true"
triggeringCondition="resolveSemanticElement().equals(event.getNotifier()) &amp;&amp; (event.getFeature() instanceof org.eclipse.emf.ecore.EAttribute)&amp;&amp; ((org.eclipse.emf.ecore.EAttribute) (event.getFeature())).getName().equals(&quot;isActive&quot;)"
- action="((org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure) getFigure()).setActive(event.getNewBooleanValue())"/>
+ action="((org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure) getFigure()).setActive(event.getNewBooleanValue())"/>
</extensionNodes>
<extensionNodes
xsi:type="papyrusgmfgenextension:ExtendedGenView"
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml
index 5fa58d47dbc..4634881a719 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml
@@ -2,7 +2,7 @@
<?eclipse version="3.0"?>
<!--
Copyright (c) 2010, 2014 CEA and others.
-
+
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
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
index dc6802523d3..c4369ad0c88 100644
--- 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
@@ -38,7 +38,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorder
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.common.figure.node.ClassFigure;
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;
@@ -136,7 +136,7 @@ public class ClassEditPart extends ClassifierEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new ClassifierFigure();
+ return primaryShape = new ClassFigure();
}
/**
@@ -145,8 +145,8 @@ public class ClassEditPart extends ClassifierEditPart {
* @generated
*/
@Override
- public ClassifierFigure getPrimaryShape() {
- return (ClassifierFigure) primaryShape;
+ public ClassFigure getPrimaryShape() {
+ return (ClassFigure) primaryShape;
}
/**
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
index 82033ae29cd..0c08cbf3946 100644
--- 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
@@ -36,7 +36,7 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorder
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.common.figure.node.ClassFigure;
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;
@@ -133,7 +133,7 @@ public class ClassEditPartCN extends ClassifierEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new ClassifierFigure();
+ return primaryShape = new ClassFigure();
}
/**
@@ -142,8 +142,8 @@ public class ClassEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
- public ClassifierFigure getPrimaryShape() {
- return (ClassifierFigure) primaryShape;
+ public ClassFigure getPrimaryShape() {
+ return (ClassFigure) primaryShape;
}
/**
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 104564ba3bc..753145f086a 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
@@ -29,12 +29,12 @@ import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.ClassEditPart;
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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomMetaclassItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.edit.policies.MetaclassItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
@@ -43,7 +43,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class MetaclassEditPart extends ClassifierEditPart {
+public class MetaclassEditPart extends ClassEditPart {
/**
* @generated
@@ -122,7 +122,7 @@ public class MetaclassEditPart extends ClassifierEditPart {
// set the figure active when the feature of the of a class is true
if (resolveSemanticElement() != null) {
if (resolveSemanticElement().equals(event.getNotifier()) && (event.getFeature() instanceof EAttribute) && ((EAttribute) (event.getFeature())).getName().equals("isActive")) {
- ((ClassifierFigure) getFigure()).setActive(event.getNewBooleanValue());
+ ((ClassFigure) getFigure()).setActive(event.getNewBooleanValue());
refreshVisuals();
}
}
@@ -134,7 +134,7 @@ public class MetaclassEditPart extends ClassifierEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new ClassifierFigure();
+ return primaryShape = new ClassFigure();
}
/**
@@ -143,8 +143,8 @@ public class MetaclassEditPart extends ClassifierEditPart {
* @generated
*/
@Override
- public ClassifierFigure getPrimaryShape() {
- return (ClassifierFigure) primaryShape;
+ public ClassFigure getPrimaryShape() {
+ return (ClassFigure) primaryShape;
}
/**
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 176f71637f0..47ae47bff22 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
@@ -29,12 +29,12 @@ import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.ClassEditPart;
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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassFigure;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomMetaclassItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.policies.MetaclassItemSemanticEditPolicyCN;
import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
@@ -43,7 +43,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class MetaclassEditPartCN extends ClassifierEditPart {
+public class MetaclassEditPartCN extends ClassEditPart {
/**
* @generated
@@ -122,7 +122,7 @@ public class MetaclassEditPartCN extends ClassifierEditPart {
// set the figure active when the feature of the of a class is true
if (resolveSemanticElement() != null) {
if (resolveSemanticElement().equals(event.getNotifier()) && (event.getFeature() instanceof EAttribute) && ((EAttribute) (event.getFeature())).getName().equals("isActive")) {
- ((ClassifierFigure) getFigure()).setActive(event.getNewBooleanValue());
+ ((ClassFigure) getFigure()).setActive(event.getNewBooleanValue());
refreshVisuals();
}
}
@@ -134,7 +134,7 @@ public class MetaclassEditPartCN extends ClassifierEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new ClassifierFigure();
+ return primaryShape = new ClassFigure();
}
/**
@@ -143,8 +143,8 @@ public class MetaclassEditPartCN extends ClassifierEditPart {
* @generated
*/
@Override
- public ClassifierFigure getPrimaryShape() {
- return (ClassifierFigure) primaryShape;
+ public ClassFigure getPrimaryShape() {
+ return (ClassFigure) primaryShape;
}
/**
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 5ce46ae1fb1..3d21fc1a4ea 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
@@ -32,13 +32,13 @@ import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.ClassEditPart;
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.ShowHideClassifierContentsEditPolicy;
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.common.figure.node.ClassFigure;
import org.eclipse.papyrus.uml.diagram.profile.custom.figure.StereotypeFigure;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomStereotypeItemSemanticEditPolicy;
@@ -50,7 +50,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class StereotypeEditPart extends ClassifierEditPart {
+public class StereotypeEditPart extends ClassEditPart {
/**
* @generated
@@ -132,7 +132,7 @@ public class StereotypeEditPart extends ClassifierEditPart {
// set the figure active when the feature of the of a class is true
if (resolveSemanticElement() != null) {
if (resolveSemanticElement().equals(event.getNotifier()) && (event.getFeature() instanceof EAttribute) && ((EAttribute) (event.getFeature())).getName().equals("isActive")) {
- ((ClassifierFigure) getFigure()).setActive(event.getNewBooleanValue());
+ ((ClassFigure) getFigure()).setActive(event.getNewBooleanValue());
refreshVisuals();
}
}
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 6c1e1d1dec2..bfc4c73f7c1 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
@@ -32,13 +32,13 @@ import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.ClassEditPart;
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.ShowHideClassifierContentsEditPolicy;
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.common.figure.node.ClassFigure;
import org.eclipse.papyrus.uml.diagram.profile.custom.figure.StereotypeFigure;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomStereotypeItemSemanticEditPolicyCN;
@@ -50,7 +50,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class StereotypeEditPartCN extends ClassifierEditPart {
+public class StereotypeEditPartCN extends ClassEditPart {
/**
* @generated
@@ -132,7 +132,7 @@ public class StereotypeEditPartCN extends ClassifierEditPart {
// set the figure active when the feature of the of a class is true
if (resolveSemanticElement() != null) {
if (resolveSemanticElement().equals(event.getNotifier()) && (event.getFeature() instanceof EAttribute) && ((EAttribute) (event.getFeature())).getName().equals("isActive")) {
- ((ClassifierFigure) getFigure()).setActive(event.getNewBooleanValue());
+ ((ClassFigure) getFigure()).setActive(event.getNewBooleanValue());
refreshVisuals();
}
}
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
new file mode 100644
index 00000000000..c0a0e2dd9bd
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdateCommand.java
@@ -0,0 +1,88 @@
+/**
+ * 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.part;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.commands.IHandlerListener;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @generated
+ */
+public class UMLDiagramUpdateCommand implements IHandler {
+
+ /**
+ * @generated
+ */
+ public void addHandlerListener(IHandlerListener handlerListener) {
+ }
+
+ /**
+ * @generated
+ */
+ public void dispose() {
+ }
+
+ /**
+ * @generated
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+ if (structuredSelection.size() != 1) {
+ return null;
+ }
+ if (structuredSelection.getFirstElement() instanceof EditPart && ((EditPart) structuredSelection.getFirstElement()).getModel() instanceof View) {
+ EObject modelElement = ((View) ((EditPart) structuredSelection.getFirstElement()).getModel()).getElement();
+ List<?> editPolicies = CanonicalEditPolicy.getRegisteredEditPolicies(modelElement);
+ for (Iterator<?> it = editPolicies.iterator(); it.hasNext();) {
+ CanonicalEditPolicy nextEditPolicy = (CanonicalEditPolicy) it.next();
+ nextEditPolicy.refresh();
+ }
+
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean isEnabled() {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean isHandled() {
+ return true;
+ }
+
+ /**
+ * @generated
+ */
+ public void removeHandlerListener(IHandlerListener handlerListener) {
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF
index e3388fbd970..02a8f5134f4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF
@@ -76,12 +76,12 @@ Require-Bundle: org.eclipse.core.expressions,
org.eclipse.ui.views,
org.eclipse.uml2.uml,
org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0"
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.core.databinding.observable
Bundle-Vendor: %providerName
Ant-Version: Apache Ant 1.7.0
Eclipse-LazyStart: true
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.papyrus.uml.diagram.statemachine.part.UMLDiagramEditorPlugin
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.statemachine;singleton:=true
-
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.statemachine; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomPseudostateEntryPointEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomPseudostateEntryPointEditPart.java
new file mode 100644
index 00000000000..4c7ff130aa2
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomPseudostateEntryPointEditPart.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointEditPart;
+
+/**
+ * @author Mickael ADAM
+ *
+ */
+public class CustomPseudostateEntryPointEditPart extends PseudostateEntryPointEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public CustomPseudostateEntryPointEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart#getDefaultIsOvalValue()
+ *
+ * @return
+ */
+ @Override
+ protected boolean getDefaultIsOvalValue() {
+ return true;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomPseudostateExitPointEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomPseudostateExitPointEditPart.java
new file mode 100644
index 00000000000..7113ec79db3
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomPseudostateExitPointEditPart.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointEditPart;
+
+/**
+ * @author Mickael ADAM
+ *
+ */
+public class CustomPseudostateExitPointEditPart extends PseudostateExitPointEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public CustomPseudostateExitPointEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart#getDefaultIsOvalValue()
+ *
+ * @return
+ */
+ @Override
+ protected boolean getDefaultIsOvalValue() {
+ return true;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateEditPart.java
index 06b5bcf1eb6..30416c04930 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateEditPart.java
@@ -30,4 +30,23 @@ public class CustomStateEditPart extends StateEditPart {
}
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return 20;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return 20;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateMachineEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateMachineEditPart.java
index 126db798a14..d3ab234e509 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateMachineEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateMachineEditPart.java
@@ -31,4 +31,24 @@ public class CustomStateMachineEditPart extends StateMachineEditPart {
}
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerHeight()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultCornerHeight() {
+ return 20;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultCornerWidth()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultCornerWidth() {
+ return 20;
+ }
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/factory/CustomUMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/factory/CustomUMLEditPartFactory.java
index 7043965b0de..0c0eedd4d80 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/factory/CustomUMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/factory/CustomUMLEditPartFactory.java
@@ -18,6 +18,8 @@ import org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part.CustomConne
import org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part.CustomConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part.CustomFinalStateEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part.CustomPackageEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part.CustomPseudostateEntryPointEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part.CustomPseudostateExitPointEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part.CustomRegionCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part.CustomRegionEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.edit.part.CustomStateCompartmentEditPart;
@@ -32,6 +34,8 @@ import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ConnectionPointRe
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.RegionCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.RegionEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateCompartmentEditPart;
@@ -81,6 +85,10 @@ public class CustomUMLEditPartFactory extends UMLEditPartFactory {
return new CustomTransitionEditPart(view);
case ConstraintEditPart.VISUAL_ID:
return new CustomConstraintEditPart(view);
+ case PseudostateEntryPointEditPart.VISUAL_ID:
+ return new CustomPseudostateEntryPointEditPart(view);
+ case PseudostateExitPointEditPart.VISUAL_ID:
+ return new CustomPseudostateExitPointEditPart(view);
}
}
return super.createEditPart(context, model);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/FinalStateFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/FinalStateFigure.java
deleted file mode 100644
index 0a8216c9e9d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/FinalStateFigure.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures;
-
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Insets;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-
-public class FinalStateFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
- /**
- * {@inheritDoc}
- */
- @Override
- protected Border getDefaultBorder(Color borderColor) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Dimension getPreferredSize(int wHint, int hHint) {
- // TODO Auto-generated method stub
- return new Dimension(20, 20);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Label getStereotypesLabel() {
- return new Label();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void paintFigure(Graphics graphics) {
- final int space = 3;
- Rectangle f = Rectangle.SINGLETON;
- // to be in adequation with the figure node plate
- Rectangle r = getBounds().getCopy().shrink(new Insets(0, 0, 1, 1));
- graphics.setBackgroundColor(getForegroundColor());
- graphics.setLineWidth(1);
- graphics.drawOval(r);
- f.x = r.x + space;
- f.y = r.y + space;
- f.width = r.width - space * 2 + 1;
- f.height = r.height - space * 2 + 1;
- graphics.setBackgroundColor(getForegroundColor());
- graphics.fillOval(f);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypeDisplay(String stereotypes, Image image) {
- // TODO Auto-generated method stub
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInBrace(String stereotypeProperties) {
- // TODO Auto-generated method stub
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
- // TODO Auto-generated method stub
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateChoiceFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateChoiceFigure.java
deleted file mode 100644
index 83ce9dbba23..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateChoiceFigure.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures;
-
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Insets;
-import org.eclipse.draw2d.geometry.PointList;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-
-public class PseudostateChoiceFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
- /**
- *
- * {@inheritDoc}
- */
- @Override
- protected Border getDefaultBorder(Color borderColor) {
- return null;
- }
-
- /**
- *
- * {@inheritDoc}
- */
- @Override
- public Dimension getPreferredSize(int wHint, int hHint) {
- // TODO Auto-generated method stub
- return new Dimension(20, 20);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Label getStereotypesLabel() {
- return new Label();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void paintFigure(Graphics graphics) {
- graphics.pushState();
- Rectangle r = getBounds().getCopy().shrink(new Insets(0, 0, 1, 1));
- int lineWidth = graphics.getLineWidth();
- r.x = r.x + lineWidth / 2;
- r.y = r.y + lineWidth / 2;
- r.width = r.width - lineWidth - 1;
- r.height = r.height - lineWidth - 1;
- PointList pl = new PointList();
- pl.addPoint(r.getTop());
- pl.addPoint(r.getRight());
- pl.addPoint(r.getBottom());
- pl.addPoint(r.getLeft());
- if (isUsingGradient()) {
- graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- // graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- } else {
- graphics.setBackgroundColor(getBackgroundColor());
- // graphics.setForegroundColor(getBackgroundColor);
- }
- graphics.fillPolygon(pl);
- graphics.setLineWidth(1);
- graphics.setBackgroundColor(getForegroundColor());
- graphics.drawPolygon(pl);
- graphics.popState();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypeDisplay(String stereotypes, Image image) {
- // TODO Auto-generated method stub
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInBrace(String stereotypeProperties) {
- // TODO Auto-generated method stub
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
- // TODO Auto-generated method stub
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateDeepHistoryFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateDeepHistoryFigure.java
deleted file mode 100644
index 21a75bbf9b5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateDeepHistoryFigure.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures;
-
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Insets;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-
-public class PseudostateDeepHistoryFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
- /**
- * {@inheritDoc}
- */
- @Override
- protected Border getDefaultBorder(Color borderColor) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Dimension getPreferredSize(int wHint, int hHint) {
- // TODO Auto-generated method stub
- return new Dimension(22, 22);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Label getStereotypesLabel() {
- return new Label();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void paintFigure(Graphics graphics) {
- // to be in adequation with the figure node plate
- Rectangle r = getBounds().getCopy().shrink(new Insets(1, 1, 1, 1));
- graphics.setBackgroundColor(getForegroundColor());
- graphics.setLineWidth(1);
- graphics.drawOval(r);
- // 'H' letter
- graphics.drawLine(bounds.getCenter().getTranslated((int) (-bounds.width * 0.25), (int) (-bounds.height * 0.25)), bounds.getCenter().getTranslated((int) (-bounds.width * 0.25), (int) (bounds.height * 0.25)));
- graphics.drawLine(bounds.getCenter().getTranslated((int) (bounds.width * 0.05), (int) (-bounds.height * 0.25)), bounds.getCenter().getTranslated((int) (bounds.width * 0.05), (int) (bounds.height * 0.25)));
- graphics.drawLine(bounds.getCenter().getTranslated((int) (-bounds.width * 0.25), 0), bounds.getCenter().getTranslated((int) (bounds.width * 0.05), 0));
- // '*' character
- graphics.drawLine(bounds.getCenter().getTranslated((int) (bounds.width * 0.25), (int) (-bounds.height * 0.25)), bounds.getCenter().getTranslated((int) (bounds.width * 0.25), (int) (-bounds.height * 0.05)));
- graphics.drawLine(bounds.getCenter().getTranslated((int) (bounds.width * 0.15), (int) (-bounds.height * 0.20)), bounds.getCenter().getTranslated((int) (bounds.width * 0.35), (int) (-bounds.height * 0.10)));
- graphics.drawLine(bounds.getCenter().getTranslated((int) (bounds.width * 0.35), (int) (-bounds.height * 0.20)), bounds.getCenter().getTranslated((int) (bounds.width * 0.15), (int) (-bounds.height * 0.10)));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypeDisplay(String stereotypes, Image image) {
- // TODO Auto-generated method stub
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInBrace(String stereotypeProperties) {
- // TODO Auto-generated method stub
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
- // TODO Auto-generated method stub
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateEntryPointFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateEntryPointFigure.java
deleted file mode 100644
index 12f3282fa41..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateEntryPointFigure.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures;
-
-import java.util.Iterator;
-
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.AffixedNamedElementFigure;
-
-/**
- * PseudostateEntryPointFigure.
- *
- */
-public class PseudostateEntryPointFigure extends AffixedNamedElementFigure {
- /**
- * Default Constructor.
- */
- public PseudostateEntryPointFigure() {
- super();
- Dimension dim1 = new Dimension(22, 22);
- this.setPreferredSize(new Dimension(dim1));
- this.setMaximumSize(new Dimension(dim1));
- this.setMinimumSize(new Dimension(dim1));
- this.setSize(dim1);
- }
-
- @Override
- public void paint(Graphics graphics) {
- graphics.pushState();
- IFigure ancestor = getParent();
- while ((ancestor != null) && !(ancestor instanceof RegionFigure)) {
- ancestor = ancestor.getParent();
- }
- if (ancestor != null) {
- if (((RegionFigure) ancestor).getBorderColor() != null) {
- graphics.setForegroundColor(((RegionFigure) ancestor).getBorderColor());
- }
- if (((RegionFigure) ancestor).getBackgroundColor() != null) {
- graphics.setBackgroundColor(((RegionFigure) ancestor).getBackgroundColor());
- }
- } else {
- ancestor = getParent();
- Iterator<?> it = ancestor.getChildren().iterator();
- boolean found = false;
- while (it.hasNext() && !found) {
- ancestor = (IFigure) it.next();
- if (ancestor instanceof StateMachineFigure) {
- found = true;
- }
- }
- if (found) {
- if (((StateMachineFigure) ancestor).getBorderColor() != null) {
- graphics.setForegroundColor(((StateMachineFigure) ancestor).getBorderColor());
- }
- if (((StateMachineFigure) ancestor).getBackgroundColor() != null) {
- graphics.setBackgroundColor(((StateMachineFigure) ancestor).getBackgroundColor());
- }
- }
- }
- graphics.setLineWidth(1);
- Rectangle r = Rectangle.SINGLETON;
- r.setBounds(getBounds());
- r.width -= 2;
- r.height -= 2;
- graphics.drawOval(r);
- r.shrink(1, 1);
- graphics.fillOval(r);
- graphics.popState();
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateExitPointFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateExitPointFigure.java
index e1065b29490..94aa3adde8f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateExitPointFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateExitPointFigure.java
@@ -11,12 +11,7 @@
*/
package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures;
-import java.util.Iterator;
-
import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.papyrus.uml.diagram.common.figure.node.AffixedNamedElementFigure;
/**
@@ -29,60 +24,17 @@ public class PseudostateExitPointFigure extends AffixedNamedElementFigure {
*/
public PseudostateExitPointFigure() {
super();
- Dimension dim1 = new Dimension(22, 22);
- this.setPreferredSize(new Dimension(dim1));
- this.setMaximumSize(new Dimension(dim1));
- this.setMinimumSize(new Dimension(dim1));
- this.setSize(dim1);
}
@Override
public void paint(Graphics graphics) {
+ super.paint(graphics);
graphics.pushState();
- IFigure ancestor = getParent();
- while ((ancestor != null) && !(ancestor instanceof RegionFigure)) {
- ancestor = ancestor.getParent();
- }
- if (ancestor != null) {
- if (((RegionFigure) ancestor).getBorderColor() != null) {
- graphics.setForegroundColor(((RegionFigure) ancestor).getBorderColor());
- }
- if (((RegionFigure) ancestor).getBackgroundColor() != null) {
- graphics.setBackgroundColor(((RegionFigure) ancestor).getBackgroundColor());
- }
- } else {
- ancestor = getParent();
- Iterator<?> it = ancestor.getChildren().iterator();
- boolean found = false;
- while (it.hasNext() && !found) {
- ancestor = (IFigure) it.next();
- if (ancestor instanceof StateMachineFigure) {
- found = true;
- }
- }
- if (found) {
- if (((StateMachineFigure) ancestor).getBorderColor() != null) {
- graphics.setForegroundColor(((StateMachineFigure) ancestor).getBorderColor());
- }
- if (((StateMachineFigure) ancestor).getBackgroundColor() != null) {
- graphics.setBackgroundColor(((StateMachineFigure) ancestor).getBackgroundColor());
- }
- }
- }
- graphics.setLineWidth(1);
- Rectangle r = Rectangle.SINGLETON;
- r.setBounds(getBounds());
- r.width -= 2;
- r.height -= 2;
- graphics.drawOval(r);
- r.shrink(1, 1);
- graphics.fillOval(r);
- // intersection coordinates.
+ // Draw the cross.
int x = (int) (bounds.width / (2 * Math.sqrt(2)));
int y = (int) (bounds.height / (2 * Math.sqrt(2)));
- // cross.
- graphics.drawLine(bounds.getCenter().translate(x - 1, -y), bounds.getCenter().translate(-x, y - 2));
- graphics.drawLine(bounds.getCenter().translate(-x, -y), bounds.getCenter().translate(x - 1, y - 2));
+ graphics.drawLine(bounds.getCenter().translate(x, -y), bounds.getCenter().translate(-x, y));
+ graphics.drawLine(bounds.getCenter().translate(-x, -y), bounds.getCenter().translate(x, y));
graphics.popState();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateInitialFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateInitialFigure.java
deleted file mode 100644
index 2b4a6df2922..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateInitialFigure.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures;
-
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-
-public class PseudostateInitialFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Border getDefaultBorder(Color borderColor) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Dimension getPreferredSize(int wHint, int hHint) {
- return new Dimension(20, 20);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Label getStereotypesLabel() {
- return new Label();
- }
-
- // public PseudostateInitialFigure() {
- // super();
- // Dimension dim1 = new Dimension(20, 20);
- // this.setPreferredSize(new Dimension(dim1));
- // this.setMaximumSize(new Dimension(dim1));
- // this.setMinimumSize(new Dimension(dim1));
- // this.setSize(dim1);
- // }
- //
- // /**
- // * Fills the circle.
- // *
- // * @param graphics
- // * the graphics
- // *
- // * @see org.eclipse.draw2d.Shape#fillShape(org.eclipse.draw2d.Graphics)
- // */
- // protected void fillShape(Graphics graphics) {
- // graphics.pushState();
- // graphics.setBackgroundColor(ColorConstants.black);
- // graphics.fillOval(getBounds());
- // graphics.popState();
- //
- // }
- /**
- * {@inheritDoc}
- */
- @Override
- public void paintFigure(Graphics graphics) {
- Rectangle r = getBounds().getCopy();
- graphics.setBackgroundColor(getForegroundColor());
- graphics.fillOval(r);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypeDisplay(String stereotypes, Image image) {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInBrace(String stereotypeProperties) {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateJoinForkFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateJoinForkFigure.java
deleted file mode 100644
index 34f5d2e8ebf..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateJoinForkFigure.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures;
-
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Insets;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-
-public class PseudostateJoinForkFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
- /**
- * {@inheritDoc}
- */
- @Override
- protected Border getDefaultBorder(Color borderColor) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Dimension getPreferredSize(int wHint, int hHint) {
- return new Dimension(10, 10);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Label getStereotypesLabel() {
- return new Label();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void paintFigure(Graphics graphics) {
- Rectangle r = getBounds().getCopy().shrink(new Insets(0, 0, 1, 1));
- if (isUsingGradient()) {
- graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- // graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- } else {
- graphics.setBackgroundColor(getBackgroundColor());
- // graphics.setForegroundColor(getForegroundColor());
- }
- graphics.fillRectangle(r);
- graphics.setLineWidth(1);
- graphics.drawRectangle(r);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypeDisplay(String stereotypes, Image image) {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInBrace(String stereotypeProperties) {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateJunctionFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateJunctionFigure.java
deleted file mode 100644
index f03e9589de6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateJunctionFigure.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures;
-
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-
-public class PseudostateJunctionFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Border getDefaultBorder(Color borderColor) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Dimension getPreferredSize(int wHint, int hHint) {
- return new Dimension(10, 10);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Label getStereotypesLabel() {
- return new Label();
- }
-
- // public PseudostateJunctionFigure() {
- // super();
- // Dimension dim1 = new Dimension(22, 22);
- // this.setPreferredSize(new Dimension(dim1));
- // this.setMaximumSize(new Dimension(dim1));
- // this.setMinimumSize(new Dimension(dim1));
- // this.setSize(dim1);
- // }
- //
- // protected void fillShape(Graphics graphics) {
- // graphics.pushState();
- // graphics.setBackgroundColor(ColorConstants.black);
- // graphics.fillOval(getBounds());
- // graphics.popState();
- // }
- /**
- * {@inheritDoc}
- */
- @Override
- public void paintFigure(Graphics graphics) {
- Rectangle r = getBounds().getCopy();
- graphics.setBackgroundColor(getForegroundColor());
- graphics.fillOval(r);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypeDisplay(String stereotypes, Image image) {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInBrace(String stereotypeProperties) {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateShallowHistoryFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateShallowHistoryFigure.java
deleted file mode 100644
index b3c8ca168a6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateShallowHistoryFigure.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures;
-
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Insets;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-
-public class PseudostateShallowHistoryFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
- /**
- * {@inheritDoc}
- */
- @Override
- protected Border getDefaultBorder(Color borderColor) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Dimension getPreferredSize(int wHint, int hHint) {
- // TODO Auto-generated method stub
- return new Dimension(22, 22);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Label getStereotypesLabel() {
- return new Label();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void paintFigure(Graphics graphics) {
- // to be in adequation with the figure node plate
- Rectangle r = getBounds().getCopy().shrink(new Insets(1, 1, 1, 1));
- graphics.setLineWidth(1);
- graphics.setBackgroundColor(getForegroundColor());
- graphics.drawOval(r);
- // 'H' letter
- graphics.drawLine(bounds.getCenter().getTranslated((int) (-bounds.width * 0.15), (int) (-bounds.height * 0.25)), bounds.getCenter().getTranslated((int) (-bounds.width * 0.15), (int) (bounds.height * 0.25)));
- graphics.drawLine(bounds.getCenter().getTranslated((int) (bounds.width * 0.15), (int) (-bounds.height * 0.25)), bounds.getCenter().getTranslated((int) (bounds.width * 0.15), (int) (bounds.height * 0.25)));
- graphics.drawLine(bounds.getCenter().getTranslated((int) (-bounds.width * 0.15), 0), bounds.getCenter().getTranslated((int) (bounds.width * 0.15), 0));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypeDisplay(String stereotypes, Image image) {
- // TODO Auto-generated method stub
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInBrace(String stereotypeProperties) {
- // TODO Auto-generated method stub
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
- // TODO Auto-generated method stub
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateTerminateFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateTerminateFigure.java
deleted file mode 100644
index 61d41b155bc..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/PseudostateTerminateFigure.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures;
-
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Insets;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusNodeFigure;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * PseudostateTerminateFigure.
- *
- */
-public class PseudostateTerminateFigure extends PapyrusNodeFigure implements IPapyrusNodeUMLElementFigure {
- /**
- * {@inheritDoc}
- */
- @Override
- protected Border getDefaultBorder(Color borderColor) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Dimension getPreferredSize(int wHint, int hHint) {
- return new Dimension(20, 20);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Label getStereotypesLabel() {
- return new Label();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void paintFigure(Graphics graphics) {
- graphics.setForegroundColor(getForegroundColor());
- Rectangle r = getBounds().getCopy().shrink(new Insets(0, 0, 1, 1));
- if (isUsingGradient()) {
- graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- // graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- } else {
- graphics.setBackgroundColor(getBackgroundColor());
- // graphics.setForegroundColor(getForegroundColor());
- }
- graphics.setLineWidth(1);
- // intersection coordinates.
- int x = (int) (r.width / (2 * Math.sqrt(2)));
- int y = (int) (r.height / (2 * Math.sqrt(2)));
- // cross.
- graphics.drawLine(r.getCenter().translate(x, -y), r.getCenter().translate(-x, y));
- graphics.drawLine(r.getCenter().translate(-x, -y), r.getCenter().translate(x, y));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypeDisplay(String stereotypes, Image image) {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInBrace(String stereotypeProperties) {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setStereotypePropertiesInCompartment(String stereotypeProperties) {
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateFigure.java
index 02849d46437..07838b55d7d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateFigure.java
@@ -15,15 +15,12 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.CompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
/**
* Represents a classifier.
*/
-public class StateFigure extends CompartmentFigure {
-
- int arcwidth = 20;
+public class StateFigure extends RoundedCompartmentFigure {
protected String submachineStateName = "";
@@ -56,9 +53,6 @@ public class StateFigure extends CompartmentFigure {
*/
public StateFigure(String tagLabel) {
super(COMPARTMENT, tagLabel);
- shadowborder = new RoundedShadowBorder(getForegroundColor());
- setBorder(shadowborder);
- ((AutomaticCompartmentLayoutManager) getLayoutManager()).setAddExtraHeight(false);
}
public void setSubmachineStateName(String text) {
@@ -69,13 +63,6 @@ public class StateFigure extends CompartmentFigure {
isSubmachineState = b;
}
-
- protected void refreshName() {
- if (isSubmachineState) {
- nameLabel.setText(submachineStateName);
- }
- }
-
/**
* Get the state compartment figure
*
@@ -85,12 +72,4 @@ public class StateFigure extends CompartmentFigure {
return getCompartment(STATE_COMPARTMENT);
}
- @Override
- public void setShadow(boolean shadow) {
- super.setShadow(shadow);
- if (!shadow) {
- RoundedBorder bord = new RoundedBorder(arcwidth, arcwidth);
- this.setBorder(bord);
- }
- }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateMachineFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateMachineFigure.java
index c1a2a11021b..c002da11637 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateMachineFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/figures/StateMachineFigure.java
@@ -14,21 +14,14 @@ package org.eclipse.papyrus.uml.diagram.statemachine.custom.figures;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gmf.runtime.draw2d.ui.graphics.ColorRegistry;
-import org.eclipse.gmf.runtime.notation.GradientStyle;
import org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.CompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
/**
* Represents a classifier.
*/
-public class StateMachineFigure extends CompartmentFigure {
-
- int arcwidth = 20;
+public class StateMachineFigure extends RoundedCompartmentFigure {
/** The StateMachine Compartment */
private final static String STATEMACHINE_COMPARTMENT = "stateMachineCompartment";
@@ -57,8 +50,8 @@ public class StateMachineFigure extends CompartmentFigure {
*/
public StateMachineFigure(String tagLabel) {
super(COMPARTMENT, tagLabel);
- shadowborder = new RoundedShadowBorder(getForegroundColor());
- setBorder(shadowborder);
+ // shadowborder = new RoundedShadowBorder(getForegroundColor());
+ // setBorder(shadowborder);
((AutomaticCompartmentLayoutManager) getLayoutManager()).setAddExtraHeight(false);
}
@@ -71,63 +64,63 @@ public class StateMachineFigure extends CompartmentFigure {
return getCompartment(STATEMACHINE_COMPARTMENT);
}
- @Override
- protected void paintBackground(Graphics graphics, Rectangle rectangle) {
- if (isUsingGradient()) {
- applyTransparency(graphics);
- boolean isVertical = (getGradientStyle() == GradientStyle.VERTICAL) ? true : false;
- if (isVertical && rectangle.height > ((3 * arcwidth) / 2)) {
- Rectangle rect1 = new Rectangle(rectangle.getLocation(), new Dimension(rectangle.width, arcwidth));
- Rectangle rect2 = new Rectangle(rectangle.x, rectangle.y + rectangle.height - arcwidth, rectangle.width, arcwidth);
- ;
- graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- graphics.fillRoundRectangle(rect1, arcwidth, arcwidth);
- graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
- graphics.fillRoundRectangle(rect2, arcwidth, arcwidth);
-
-
- graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
- graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- Rectangle rect = new Rectangle(rectangle.x, rectangle.y + arcwidth / 2, rectangle.width, rectangle.height - arcwidth);
- graphics.fillGradient(rect, true);
- } else if (!isVertical && rectangle.width > ((3 * arcwidth) / 2)) {
- Rectangle rect1 = new Rectangle(rectangle.getLocation(), new Dimension(arcwidth, rectangle.height));
- Rectangle rect2 = new Rectangle(rectangle.x + rectangle.width - arcwidth, rectangle.y, arcwidth, rectangle.height);
- graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- graphics.fillRoundRectangle(rect1, arcwidth, arcwidth);
- graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
- graphics.fillRoundRectangle(rect2, arcwidth, arcwidth);
-
-
- graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
- graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- Rectangle rect = new Rectangle(rectangle.x + arcwidth / 2, rectangle.y, rectangle.width - arcwidth, rectangle.height);
- graphics.fillGradient(rect, false);
- } else {
- graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
- graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
- graphics.fillRoundRectangle(rectangle, arcwidth, arcwidth);
- }
- } else {
- graphics.setBackgroundColor(getBackgroundColor());
- graphics.setForegroundColor(getForegroundColor());
- graphics.fillRoundRectangle(rectangle, arcwidth, arcwidth);
- }
- }
-
- @Override
- public void paintFigure(Graphics graphics) {
- paintBackground(graphics, getBounds());
-
- shadowborder.setColor(getForegroundColor());
- }
-
- @Override
- public void setShadow(boolean shadow) {
- super.setShadow(shadow);
- if (!shadow) {
- RoundedBorder bord = new RoundedBorder(arcwidth, arcwidth);
- this.setBorder(bord);
- }
- }
+ // @Override
+ // protected void paintBackground(Graphics graphics, Rectangle rectangle) {
+ // if (isUsingGradient()) {
+ // applyTransparency(graphics);
+ // boolean isVertical = (getGradientStyle() == GradientStyle.VERTICAL) ? true : false;
+ // if (isVertical && rectangle.height > ((3 * arcwidth) / 2)) {
+ // Rectangle rect1 = new Rectangle(rectangle.getLocation(), new Dimension(rectangle.width, arcwidth));
+ // Rectangle rect2 = new Rectangle(rectangle.x, rectangle.y + rectangle.height - arcwidth, rectangle.width, arcwidth);
+ // ;
+ // graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ // graphics.fillRoundRectangle(rect1, arcwidth, arcwidth);
+ // graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ // graphics.fillRoundRectangle(rect2, arcwidth, arcwidth);
+ //
+ //
+ // graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ // graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ // Rectangle rect = new Rectangle(rectangle.x, rectangle.y + arcwidth / 2, rectangle.width, rectangle.height - arcwidth);
+ // graphics.fillGradient(rect, true);
+ // } else if (!isVertical && rectangle.width > ((3 * arcwidth) / 2)) {
+ // Rectangle rect1 = new Rectangle(rectangle.getLocation(), new Dimension(arcwidth, rectangle.height));
+ // Rectangle rect2 = new Rectangle(rectangle.x + rectangle.width - arcwidth, rectangle.y, arcwidth, rectangle.height);
+ // graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ // graphics.fillRoundRectangle(rect1, arcwidth, arcwidth);
+ // graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ // graphics.fillRoundRectangle(rect2, arcwidth, arcwidth);
+ //
+ //
+ // graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ // graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ // Rectangle rect = new Rectangle(rectangle.x + arcwidth / 2, rectangle.y, rectangle.width - arcwidth, rectangle.height);
+ // graphics.fillGradient(rect, false);
+ // } else {
+ // graphics.setBackgroundColor(ColorRegistry.getInstance().getColor(getGradientColor1()));
+ // graphics.setForegroundColor(ColorRegistry.getInstance().getColor(getGradientColor2()));
+ // graphics.fillRoundRectangle(rectangle, arcwidth, arcwidth);
+ // }
+ // } else {
+ // graphics.setBackgroundColor(getBackgroundColor());
+ // graphics.setForegroundColor(getForegroundColor());
+ // graphics.fillRoundRectangle(rectangle, arcwidth, arcwidth);
+ // }
+ // }
+
+ // @Override
+ // public void paintFigure(Graphics graphics) {
+ // paintBackground(graphics, getBounds());
+ //
+ // shadowborder.setColor(getForegroundColor());
+ // }
+ //
+ // @Override
+ // public void setShadow(boolean shadow) {
+ // super.setShadow(shadow);
+ // if (!shadow) {
+ // RoundedBorder bord = new RoundedBorder(arcwidth, arcwidth);
+ // this.setBorder(bord);
+ // }
+ // }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.gmfgen
index c973450bfcf..ca38b23687b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.gmfgen
@@ -1,2653 +1,2765 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
- xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
- <gmfgen:GenEditorGenerator
- packageNamePrefix="org.eclipse.papyrus.uml.diagram.statemachine"
- modelID="PapyrusUMLStateMachineDiagram"
- diagramFileExtension="PapyrusUMLStateMachine_diagram"
- domainFileExtension="PapyrusUMLStateMachine"
- dynamicTemplates="true"
- templateDirectory="/org.eclipse.papyrus.def/xtend/"
- copyrightText="Copyright (c) 2014 CEA LIST.&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation">
- <audits>
- <categories
- id="org.eclipse.uml2.uml.util.UMLValidator.validateInternalTransition"
- name="validateInternalTransition"
- description="Validate internal transition"
- path="/0/@audits/@categories.0"
- audits="/0/@audits/@rules.0"/>
- <rules
- name="validateInternalTransitionEnd"
- description="Validate that internal transition has the same state for source and target"
- id="org.eclipse.uml2.uml.util.UMLValidator.validateInternalTransition_sameTargetAndSrouce"
- rule="/0/@expressionProviders/@providers.1/@expressions.0"
- message="Validate that internal transition has the same state for source and target"
- useInLiveMode="true"
- category="/0/@audits/@categories.0">
- <target
- xsi:type="gmfgen:GenDomainElementTarget"
- contextSelector="/0/@audits/@clientContexts.0">
- <element
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition"/>
- </target>
- </rules>
- <clientContexts
- ruleTargets="/0/@audits/@rules.0/@target"/>
- </audits>
- <diagram
- visualID="1000"
- editPartClassName="PackageEditPart"
- itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PackageCanonicalEditPolicy"
- iconProviderPriority="Low"
- creationWizardIconPath="icons/UMLDiagramFile.gif"
- creationWizardCategoryID="org.eclipse.ui.Examples"
- editingDomainID="org.eclipse.papyrus.uml.diagram.statemachine.EditingDomain"
- validationEnabled="true"
- validationDecorators="true"
- liveValidationUIFeedback="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Package_1000"
- editHelperClassName="PackageEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPackageCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPackageXYLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy"/>
- <domainDiagramElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <childNodes
- visualID="3000"
- editPartClassName="RegionEditPart"
- itemSemanticEditPolicyClassName="RegionItemSemanticEditPolicy"
- canonicalEditPolicyClassName="RegionCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.0"
- graphicalNodeEditPolicyClassName="RegionGraphicalNodeEditPolicy"
- createCommandClassName="RegionCreateCommand"
- containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@childNodes.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="RegionEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.RegionFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionComponentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/region"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/region"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- </childNodes>
- <childNodes
- visualID="5000"
- editPartClassName="FinalStateEditPart"
- itemSemanticEditPolicyClassName="FinalStateItemSemanticEditPolicy"
- canonicalEditPolicyClassName="FinalStateCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="FinalStateGraphicalNodeEditPolicy"
- createCommandClassName="FinalStateCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.FinalState_5000"
- displayName="FinalState"
- editHelperClassName="FinalStateEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.FinalStateFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="16"
- height="16"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/FinalState"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5001"
- editPartClassName="FinalStateNameEditPart"
- itemSemanticEditPolicyClassName="FinalStateNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5002"
- editPartClassName="FinalStateStereotypeEditPart"
- itemSemanticEditPolicyClassName="FinalStateStereotypeItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern=""
- editorPattern="&lt;&lt;0>>"
- editPattern="&lt;&lt;0>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="6000"
- editPartClassName="StateEditPart"
- itemSemanticEditPolicyClassName="StateItemSemanticEditPolicy"
- canonicalEditPolicyClassName="StateCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.17 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13"
- compartments="/0/@diagram/@compartments.2"
- graphicalNodeEditPolicyClassName="StateGraphicalNodeEditPolicy"
- createCommandClassName="StateCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.State_6000"
- displayName="State"
- editHelperClassName="StateEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.StateFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateItemSemanticEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="6001"
- editPartClassName="StateNameEditPart"
- itemSemanticEditPolicyClassName="StateNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="8000"
- editPartClassName="PseudostateInitialEditPart"
- itemSemanticEditPolicyClassName="PseudostateInitialItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PseudostateInitialCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PseudostateInitialNodeGraphicalNodeEditPolicy"
- createCommandClassName="PseudostateInitialCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_8000"
- displayName="Pseudostate"
- editHelperClassName="PseudostateEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateInitialFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="4"
- height="4"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.10">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="8001"
- editPartClassName="PseudostateInitialNameEditPart"
- itemSemanticEditPolicyClassName="PseudostateInitialNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="8002"
- editPartClassName="PseudostateInitialStereotypeEditPart"
- itemSemanticEditPolicyClassName="PseudostateInitialStereotypeltemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern="&lt;&lt;0>>"
- editPattern="&lt;&lt;0>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="9000"
- editPartClassName="PseudostateJoinEditPart"
- itemSemanticEditPolicyClassName="PseudostateJoinItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PseudostateJoinCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PseudostateJoinNodeGraphicalNodeEditPolicy"
- createCommandClassName="PseudostateJoinCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_9000"
- displayName="Pseudostate"
- editHelperClassName="PseudostateEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateJoinForkFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="4"
- height="4"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPseudostateForkJoinResizeEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.13">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.3">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="9001"
- editPartClassName="PseudostateJoinNameEditPart"
- itemSemanticEditPolicyClassName="PseudostateJoinNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="9002"
- editPartClassName="PseudostateJoinStereotypeEditPart"
- itemSemanticEditPolicyClassName="PseudostateJoinStereotypeItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern="&lt;&lt;0>>"
- editPattern="&lt;&lt;0>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="10000"
- editPartClassName="PseudostateForkEditPart"
- itemSemanticEditPolicyClassName="PseudostateForkItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PseudostateForkCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PseudostateForkNodeGraphicalNodeEditPolicy"
- createCommandClassName="PseudostateForkCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_10000"
- displayName="Pseudostate"
- editHelperClassName="PseudostateEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateJoinForkFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="4"
- height="4"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPseudostateForkJoinResizeEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.14">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.4">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="10001"
- editPartClassName="PseudostateForkNameEditPart"
- itemSemanticEditPolicyClassName="PseudostateForkNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="10002"
- editPartClassName="PseudostateForkStereotypeEditPart"
- itemSemanticEditPolicyClassName="PseudostateForkStereotypeltemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern="&lt;&lt;0>>"
- editPattern="&lt;&lt;0>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="11000"
- editPartClassName="PseudostateChoiceEditPart"
- itemSemanticEditPolicyClassName="PseudostateChoiceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PseudostateChoiceCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PseudostateChoiceNodeGraphicalNodeEditPolicy"
- createCommandClassName="PseudostateChoiceCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_11000"
- displayName="Pseudostate"
- editHelperClassName="PseudostateEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateChoiceFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="4"
- height="4"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.16">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.6">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="11001"
- editPartClassName="PseudostateChoiceNameEditPart"
- itemSemanticEditPolicyClassName="PseudostateChoiceNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="11002"
- editPartClassName="PseudostateChoiceStereotypeEditPart"
- itemSemanticEditPolicyClassName="PseudostateChoiceStereotypeItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern="&lt;&lt;0>>"
- editPattern="&lt;&lt;0>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="12000"
- editPartClassName="PseudostateJunctionEditPart"
- itemSemanticEditPolicyClassName="PseudostateJunctionItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PseudostateJunctionCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PseudostateJunctionNodeGraphicalNodeEditPolicy"
- createCommandClassName="PseudostateJunctionCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_12000"
- displayName="Pseudostate"
- editHelperClassName="PseudostateEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateJunctionFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="4"
- height="4"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.15">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.5">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="12001"
- editPartClassName="PseudostateJunctionNameEditPart"
- itemSemanticEditPolicyClassName="PseudostateJunctionNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="12002"
- editPartClassName="PseudostateJunctionStereotypeEditPart"
- itemSemanticEditPolicyClassName="PseudostateJunctionStereotypeItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern="&lt;&lt;0>>"
- editPattern="&lt;&lt;0>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="13000"
- editPartClassName="PseudostateShallowHistoryEditPart"
- itemSemanticEditPolicyClassName="PseudostateShallowHistoryItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PseudostateShallowHistoryCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PseudostateShallowHistoryNodeGraphicalNodeEditPolicy"
- createCommandClassName="PseudostateShallowHistoryCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_13000"
- displayName="Pseudostate"
- editHelperClassName="PseudostateEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateShallowHistoryFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="4"
- height="4"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.12">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.2">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="13001"
- editPartClassName="PseudostateShallowHistoryNameEditPart"
- itemSemanticEditPolicyClassName="PseudostateShallowHistoryNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="13002"
- editPartClassName="PseudostateShallowHistoryStereotypeEditPart"
- itemSemanticEditPolicyClassName="PseudostateShallowHistoryStereotypeItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern="&lt;&lt;0>>"
- editPattern="&lt;&lt;0>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="14000"
- editPartClassName="PseudostateDeepHistoryEditPart"
- itemSemanticEditPolicyClassName="PseudostateDeepHistoryItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PseudostateDeepHistoryCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PseudostateDeepHistoryNodeGraphicalNodeEditPolicy"
- createCommandClassName="PseudostateDeepHistoryCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_14000"
- displayName="Pseudostate"
- editHelperClassName="PseudostateEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateDeepHistoryFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="4"
- height="4"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.11">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="14001"
- editPartClassName="PseudostateDeepHistoryNameEditPart"
- itemSemanticEditPolicyClassName="PseudostateDeepHistoryNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="14002"
- editPartClassName="PseudostateDeepHistoryStereotypeEditPart"
- itemSemanticEditPolicyClassName="PseudostateDeepHistoryStereotypeItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern="&lt;&lt;0>>"
- editPattern="&lt;&lt;0>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="15000"
- editPartClassName="PseudostateTerminateEditPart"
- itemSemanticEditPolicyClassName="PseudostateTerminateItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PseudostateTerminateCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PseudostateTerminateNodeGraphicalNodeEditPolicy"
- createCommandClassName="PseudostateTerminateCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_15000"
- displayName="Pseudostate"
- editHelperClassName="PseudostateEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateTerminateFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="4"
- height="4"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.19">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.9">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="15001"
- editPartClassName="PseudostateTerminateNameEditPart"
- itemSemanticEditPolicyClassName="PseudostateTerminateNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="15002"
- editPartClassName="PseudostateTerminateStereotypeEditPart"
- itemSemanticEditPolicyClassName="PseudostateTerminateStereotypeItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern="&lt;&lt;0>>"
- editPattern="&lt;&lt;0>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="16000"
- editPartClassName="PseudostateEntryPointEditPart"
- itemSemanticEditPolicyClassName="PseudostateEntryPointItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PseudostateEntryPointCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PseudostateEntryPointNodeGraphicalNodeEditPolicy"
- createCommandClassName="PseudostateEntryPointCreateCommand"
- containers="/0/@diagram/@topLevelNodes.0 /0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@childNodes.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_16000"
- displayName="Pseudostate"
- editHelperClassName="PseudostateEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateEntryPointFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="4"
- height="4"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.17">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/connectionPoint"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/connectionPoint"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.7">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="16001"
- editPartClassName="PseudostateEntryPointNameEditPart"
- itemSemanticEditPolicyClassName="PseudostateEntryPointNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="16002"
- editPartClassName="PseudostateEntryPointStereotypeEditPart"
- itemSemanticEditPolicyClassName="PseudostateEntryPointStereotypeltemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern="&lt;&lt;0>>"
- editPattern="&lt;&lt;0>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="17000"
- editPartClassName="PseudostateExitPointEditPart"
- itemSemanticEditPolicyClassName="PseudostateExitPointItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PseudostateExitPointCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="PseudostateExitPointNodeGraphicalNodeEditPolicy"
- createCommandClassName="PseudostateExitPointCreateCommand"
- containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_17000"
- displayName="Pseudostate"
- editHelperClassName="PseudostateEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateExitPointFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="4"
- height="4"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.18">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/connectionPoint"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/connectionPoint"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.8">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="17001"
- editPartClassName="PseudostateExitPointNameEditPart"
- itemSemanticEditPolicyClassName="PseudostateExitPointNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="17002"
- editPartClassName="PseudostateExitPointStereotypeEditPart"
- itemSemanticEditPolicyClassName="PseudostateExitPointStereotypeItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern="&lt;&lt;0>>"
- editPattern="&lt;&lt;0>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildSideAffixedNode"
- visualID="18000"
- editPartClassName="ConnectionPointReferenceEditPart"
- itemSemanticEditPolicyClassName="ConnectionPointReferenceItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ConnectionPointReferenceCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ConnectionPointReferenceNodeGraphicalNodeEditPolicy"
- createCommandClassName="ConnectionPointReferenceCreateCommand"
- containers="/0/@diagram/@childNodes.2 /0/@diagram/@compartments.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.ConnectionPointReference_18000"
- displayName="ConnectionPointReference"
- editHelperClassName="ConnectionPointReferenceEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.ConnectionPointReferenceFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="4"
- height="4"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ConnectionPointReference"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/connection"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/connection"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="18001"
- editPartClassName="ConnectionPointReferenceNameEditPart"
- itemSemanticEditPolicyClassName="ConnectionPointReferenceNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="3"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="18002"
- editPartClassName="ConnectionPointReferenceStereotypeEditPart"
- itemSemanticEditPolicyClassName="ConnectionPointReferenceItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="25"
- y="-10"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- editorPattern="&lt;&lt;0>>"
- editPattern="&lt;&lt;0>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="666"
- editPartClassName="CommentEditPart"
- itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="CommentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicy"
- createCommandClassName="CommentCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.StateMachineComment"
- displayName="Comment"
- editHelperClassName="CommentEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.22">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="6666">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCornerBentFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="668"
- editPartClassName="ConstraintEditPart"
- itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ConstraintCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicy"
- createCommandClassName="ConstraintCreateCommand"
- containers="/0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Constraint_668"
- displayName="Constraint"
- editHelperClassName="ConstraintEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.21">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="6668"
- editPartClassName="ConstraintNameLabelEditPart"
- itemSemanticEditPolicyClassName="ConstraintNameLabelItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6669"
- editPartClassName="ConstraintBodyEditPart"
- itemSemanticEditPolicyClassName="ConstraintBodyItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.4"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="680"
- editPartClassName="InternalTransitionEditPart"
- itemSemanticEditPolicyClassName="InternalTransitionItemSemanticEditPolicy"
- canonicalEditPolicyClassName="InternalTransitionCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="InternalTransitionGraphicalNodeEditPolicy"
- createCommandClassName="InternalTransitionCreateCommand"
- containers="/0/@diagram/@childNodes.2"
- labelReadOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.InternalTransition_680"
- displayName="InternalTransition"
- metamodelType="/0/@diagram/@links.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Vertex/incoming"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Vertex/incoming"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.5">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition/guard"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="690"
- editPartClassName="EntryStateBehaviorEditPart"
- itemSemanticEditPolicyClassName="EntryStateBehaviorItemSemanticEditPolicy"
- canonicalEditPolicyClassName="EntryStateBehaviorCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="EntryStateBehaviorGraphicalNodeEditPolicy"
- createCommandClassName="EntryStateBehaviorCreateCommand"
- containers="/0/@diagram/@childNodes.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.EntryStateBehavior_690"
- displayName="EntryStateBehavior"
- editHelperClassName="EntryStateBehaviorEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.2">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/entry"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/entry"/>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.6">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/entry"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="691"
- editPartClassName="DoActivityStateBehaviorStateEditPart"
- itemSemanticEditPolicyClassName="DoActivityStateBehaviorStateItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DoActivityStateBehaviorCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DoActivityStateBehaviorStateGraphicalNodeEditPolicy"
- createCommandClassName="DoActivityStateBehaviorStateCreateCommand"
- containers="/0/@diagram/@childNodes.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.DoActivityStateBehavior_691"
- displayName="DoActivityStateBehavior"
- editHelperClassName="DoActivityStateBehaviorEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.3">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/doActivity"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/doActivity"/>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.7">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/doActivity"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="692"
- editPartClassName="ExitStateBehaviorEditPart"
- itemSemanticEditPolicyClassName="ExitStateBehaviorItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ExitStateBehaviorCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ExitStateBehaviorGraphicalNodeEditPolicy"
- createCommandClassName="ExitStateBehaviorCreateCommand"
- containers="/0/@diagram/@childNodes.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.ExitStateBehavior_692"
- displayName="ExitStateBehavior"
- editHelperClassName="ExitStateBehaviorEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <modelFacet
- modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.1">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/exit"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/exit"/>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.8">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/exit"/>
- </labelModelFacet>
- </childNodes>
- <topLevelNodes
- visualID="2000"
- editPartClassName="StateMachineEditPart"
- itemSemanticEditPolicyClassName="StateMachineItemSemanticEditPolicy"
- canonicalEditPolicyClassName="StateMachineCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"
- compartments="/0/@diagram/@compartments.1"
- graphicalNodeEditPolicyClassName="StateMachineGraphicalNodeEditPolicy"
- createCommandClassName="StateMachineCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="StateMachineEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.StateMachineFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="200"
- height="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenReferenceNewElementSpec">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/region"/>
- <newElementInitializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </newElementInitializers>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="2001"
- editPartClassName="StateMachineNameEditPart"
- itemSemanticEditPolicyClassName="StateMachineNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <links
- visualID="7000"
- editPartClassName="TransitionEditPart"
- itemSemanticEditPolicyClassName="TransitionItemSemanticEditPolicy"
- createCommandClassName="TransitionCreateCommand"
- reorientCommandClassName="TransitionReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Transition_7000"
- displayName="Transition"
- editHelperClassName="TransitionEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.TransitionFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/transition"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.20">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition/source"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition/target"/>
- </modelFacet>
- <labels
- visualID="7001"
- editPartClassName="TransitionNameEditPart"
- itemSemanticEditPolicyClassName="TransitionNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="7002"
- editPartClassName="TransitionGuardEditPart"
- itemSemanticEditPolicyClassName="TransitionGuardItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition/guard"/>
- </modelFacet>
- </labels>
- <labels
- visualID="7003"
- editPartClassName="TransitionStereotypeEditPart"
- itemSemanticEditPolicyClassName="TransitionStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="19000"
- editPartClassName="GeneralizationEditPart"
- itemSemanticEditPolicyClassName="GeneralizationItemSemanticEditPolicy"
- incomingCreationAllowed="true"
- createCommandClassName="GeneralizationCreateCommand"
- reorientCommandClassName="GeneralizationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Generalization_19000"
- displayName="Generalization"
- editHelperClassName="GeneralizationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.GeneralizationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/general"/>
- </modelFacet>
- <labels
- visualID="19002"
- editPartClassName="GeneralizationStereotypeEditPart"
- itemSemanticEditPolicyClassName="GeneralizationStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/isSubstitutable"/>
- </modelFacet>
- </labels>
- </links>
- <links
- visualID="667"
- editPartClassName="CommentAnnotatedElementEditPart"
- itemSemanticEditPolicyClassName="CommentAnnotatedElementItemSemanticEditPolicy"
- createCommandClassName="CommentAnnotatedElementCreateCommand"
- reorientCommandClassName="CommentAnnotatedElementReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
- </modelFacet>
- </links>
- <links
- visualID="670"
- editPartClassName="ConstraintConstrainedElementEditPart"
- itemSemanticEditPolicyClassName="ConstraintConstrainedElementItemSemanticEditPolicy"
- createCommandClassName="ConstraintConstrainedElementCreateCommand"
- reorientCommandClassName="ConstraintConstrainedElementReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
- </modelFacet>
- </links>
- <links
- visualID="8500"
- editPartClassName="ContextLinkEditPart"
- itemSemanticEditPolicyClassName="ContextLinkItemSemanticEditPolicy"
- createCommandClassName="ContextLinkCreateCommand"
- reorientCommandClassName="ContextLinkReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.CustomContextLinkFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/context"/>
- </modelFacet>
- <labels
- visualID="8501"
- editPartClassName="ContextLinkAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ContextLinkAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.NoSemanticParserEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="&lt;&lt;{0}>>"
- editorPattern="&lt;&lt;{0}>>"
- editPattern="&lt;&lt;{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </links>
- <compartments
- visualID="3002"
- editPartClassName="RegionCompartmentEditPart"
- itemSemanticEditPolicyClassName="RegionCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="RegionCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15"
- title="RegionCompartment"
- canCollapse="false"
- hideIfEmpty="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.0"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getRegionCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionCompartmentCreationEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionCompartmentXYLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionCompartmentItemSemanticEditPolicy"/>
- </compartments>
- <compartments
- visualID="2002"
- editPartClassName="StateMachineCompartmentEditPart"
- itemSemanticEditPolicyClassName="StateMachineCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="StateMachineCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"
- title="StateMachineCompartment"
- canCollapse="false"
- hideIfEmpty="false"
- needsTitle="false"
- node="/0/@diagram/@topLevelNodes.0"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getStateMachineCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineCompartmentXYLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="6002"
- editPartClassName="StateCompartmentEditPart"
- itemSemanticEditPolicyClassName="StateCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="StateCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.13"
- title="StateCompartment"
- canCollapse="false"
- hideIfEmpty="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.2"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getStateCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="&quot;RemoveOrphanView&quot;"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateCompartmentXYLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateCompartmentCreationEditPolicy"/>
- </compartments>
- <palette>
- <groups
- title="Nodes"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createNodesGroup"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Region"
- description="Region"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Region.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Region.gif"
- createMethodName="createRegionCreationTool"
- genNodes="/0/@diagram/@childNodes.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="State"
- description="State"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/State.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/State.gif"
- createMethodName="createStateCreationTool"
- genNodes="/0/@diagram/@childNodes.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Initial"
- description="Initial"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_initial.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_initial.gif"
- createMethodName="createInitialCreationTool"
- genNodes="/0/@diagram/@childNodes.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="FinalState"
- description="FinalState"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FinalState.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FinalState.gif"
- createMethodName="createFinalStateCreationTool"
- genNodes="/0/@diagram/@childNodes.1"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="ShallowHistory"
- description="ShallowHistory"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_shallowHistory.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_shallowHistory.gif"
- createMethodName="createShallowHistoryCreationTool"
- genNodes="/0/@diagram/@childNodes.8"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="DeepHistory"
- description="DeepHistory"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_deepHistory.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_deepHistory.gif"
- createMethodName="createDeepHistoryCreationTool"
- genNodes="/0/@diagram/@childNodes.9"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Fork"
- description="Fork"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_fork.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_fork.gif"
- createMethodName="createForkCreationTool"
- genNodes="/0/@diagram/@childNodes.5"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Join"
- description="Join"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_join.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_join.gif"
- createMethodName="createJoinCreationTool"
- genNodes="/0/@diagram/@childNodes.4"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Choice"
- description="Choice"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_choice.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_choice.gif"
- createMethodName="createChoiceCreationTool"
- genNodes="/0/@diagram/@childNodes.6"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Junction"
- description="Junction"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_junction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_junction.gif"
- createMethodName="createJunctionCreationTool"
- genNodes="/0/@diagram/@childNodes.7"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="EntryPoint"
- description="EntryPoint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_entryPoint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_entryPoint.gif"
- createMethodName="createEntryPointCreationTool"
- genNodes="/0/@diagram/@childNodes.11"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="ExitPoint"
- description="ExitPoint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_exitPoint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_exitPoint.gif"
- createMethodName="createExitPointCreationTool"
- genNodes="/0/@diagram/@childNodes.12"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Terminate"
- description="Terminate"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_terminate.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_terminate.gif"
- createMethodName="createTerminateCreationTool"
- genNodes="/0/@diagram/@childNodes.10"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="ConnectionPointReference"
- description="ConnectionPointReference"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectionPointReference.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectionPointReference.gif"
- createMethodName="createConnectionPointReferenceCreationTool"
- genNodes="/0/@diagram/@childNodes.13"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Comment"
- description="Comment"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- createMethodName="createStateMachineCommentCreationTool"
- genNodes="/0/@diagram/@childNodes.14"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Constraint"
- description="Create Constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- createMethodName="createConstraintCreationTool"
- genNodes="/0/@diagram/@childNodes.15"/>
- </groups>
- <groups
- title="Edges"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createEdgesGroup"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Transition"
- description="Transition"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Transition_local.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Transition_local.gif"
- createMethodName="createTransitionCreationTool"
- qualifiedToolName=""
- genLinks="/0/@diagram/@links.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Link"
- description="Creation of a link for comment, constraint"
- largeIconPath="icons/obj16/Link.gif"
- smallIconPath="icons/obj16/Link.gif"
- createMethodName="createCommentlinkCreationTool"
- genLinks="/0/@diagram/@links.2 /0/@diagram/@links.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="ContextLink"
- description="Creation of a context link for a Constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- genLinks="/0/@diagram/@links.4"/>
- </groups>
- </palette>
- <preferencePages
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.general"
- name="UML Diagram">
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.appearance"
- name="Appearance"
- kind="Appearance"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.connections"
- name="Connections"
- kind="Connections"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.printing"
- name="Printing"
- kind="Printing"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
- name="Rulers And Grid"
- kind="RulersAndGrid"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.pathmaps"
- name="Pathmaps"
- kind="Pathmaps"/>
- </preferencePages>
- </diagram>
- <plugin
- iD="org.eclipse.papyrus.uml.diagram.statemachine"
- name="PapyrusUMLStateMachineDiagram"
- provider="Papyrus"/>
- <editor
- iconPath="icons/UMLDiagramFile.gif"/>
- <diagramUpdater/>
- <propertySheet>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="appearance"/>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="diagram"
- label="Rulers &amp; Grid"/>
- <tabs
- xsi:type="gmfgen:GenCustomPropertyTab"
- iD="domain"
- label="Core">
- <filter
- xsi:type="gmfgen:TypeTabFilter">
- <types>org.eclipse.gmf.runtime.notation.View</types>
- <types>org.eclipse.gef.EditPart</types>
- <generatedTypes>abstractNavigatorItem</generatedTypes>
- </filter>
- </tabs>
- <tabs
- xsi:type="gmfgen:GenCustomPropertyTab"
- iD="domain"
- label="Core">
- <filter
- xsi:type="gmfgen:TypeTabFilter">
- <types>org.eclipse.gmf.runtime.notation.View</types>
- <types>org.eclipse.gef.EditPart</types>
- <generatedTypes>abstractNavigatorItem</generatedTypes>
- </filter>
- </tabs>
- <tabs
- xsi:type="gmfgen:GenCustomPropertyTab"
- iD="domain"
- label="Core">
- <filter
- xsi:type="gmfgen:TypeTabFilter">
- <types>org.eclipse.gmf.runtime.notation.View</types>
- <types>org.eclipse.gef.EditPart</types>
- <generatedTypes>abstractNavigatorItem</generatedTypes>
- </filter>
- </tabs>
- </propertySheet>
- <domainGenModel
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
- <expressionProviders
- expressionsPackageName="org.eclipse.papyrus.uml.diagram.statemachine.custom.expressions">
- <providers
- xsi:type="gmfgen:GenJavaExpressionProvider"
- injectExpressionBody="true">
- <expressions
- body="return org.eclipse.uml2.uml.PseudostateKind.INITIAL_LITERAL;"/>
- <expressions
- body="return org.eclipse.uml2.uml.PseudostateKind.DEEP_HISTORY_LITERAL;"/>
- <expressions
- body="return org.eclipse.uml2.uml.PseudostateKind.SHALLOW_HISTORY_LITERAL;"/>
- <expressions
- body="return org.eclipse.uml2.uml.PseudostateKind.JOIN_LITERAL;"/>
- <expressions
- body="return org.eclipse.uml2.uml.PseudostateKind.FORK_LITERAL;"/>
- <expressions
- body="return org.eclipse.uml2.uml.PseudostateKind.JUNCTION_LITERAL;"/>
- <expressions
- body="return org.eclipse.uml2.uml.PseudostateKind.CHOICE_LITERAL;"/>
- <expressions
- body="return org.eclipse.uml2.uml.PseudostateKind.ENTRY_POINT_LITERAL;"/>
- <expressions
- body="return org.eclipse.uml2.uml.PseudostateKind.EXIT_POINT_LITERAL;"/>
- <expressions
- body="return org.eclipse.uml2.uml.PseudostateKind.TERMINATE_LITERAL;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="// Test if the pseudostate is an initial&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.INITIAL_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="// Test if the pseudostate is a deepHistory&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.DEEP_HISTORY_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="// Test if the pseudostate is a shallowHistory&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.SHALLOW_HISTORY_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="// Test if the pseudostate is a join&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.JOIN_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="// Test if the pseudostate is a fork&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.FORK_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="// Test if the pseudostate is a junction&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.JUNCTION_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="// Test if the pseudostate is a choice&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.CHOICE_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="// Test if the pseudostate is an entryPoint&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.ENTRY_POINT_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="// Test if the pseudostate is an exitPoint&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.EXIT_POINT_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="// Test if the pseudostate is a terminate&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.TERMINATE_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
- <expressions
- body="return org.eclipse.papyrus.uml.tools.utils.NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());"/>
- <expressions
- body="org.eclipse.uml2.uml.LiteralString literalString=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();&#xD;&#xA;literalString.setValue(&quot;&quot;);&#xD;&#xA;return literalString;"/>
- <expressions
- body="return &quot;&quot;;"/>
- </providers>
- <providers
- xsi:type="gmfgen:GenExpressionInterpreter"
- className="UMLOCLFactory">
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="(kind = TransitionKind::internal) implies (source.oclIsKindOf (State) and source = target)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(State)&#xD;&#xA;then self.owner.oclAsType(State).exit->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(State)&#xD;&#xA;then self.owner.oclAsType(State).entry->includes(self)&#xD;&#xA;else false endif"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if self.owner.oclIsKindOf(State)&#xD;&#xA;then self.owner.oclAsType(State).doActivity->includes(self)&#xD;&#xA;else false endif"/>
- </providers>
- </expressionProviders>
- <labelParsers
- extensibleViaService="true">
- <implementations
- xsi:type="gmfgen:PredefinedParser"
- uses="/0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@labels.0/@modelFacet /0/@diagram/@childNodes.1/@labels.0/@modelFacet /0/@diagram/@links.0/@labels.0/@modelFacet /0/@diagram/@childNodes.3/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.5/@labels.0/@modelFacet /0/@diagram/@childNodes.6/@labels.0/@modelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.11/@labels.0/@modelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet /0/@diagram/@childNodes.13/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.0/@modelFacet /0/@diagram/@childNodes.15/@labels.0/@modelFacet /0/@diagram/@links.4/@labels.0/@modelFacet"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.0/@labels.2/@modelFacet /0/@diagram/@childNodes.1/@labels.1/@modelFacet /0/@diagram/@childNodes.3/@labels.1/@modelFacet /0/@diagram/@childNodes.4/@labels.1/@modelFacet /0/@diagram/@childNodes.5/@labels.1/@modelFacet /0/@diagram/@childNodes.6/@labels.1/@modelFacet /0/@diagram/@childNodes.7/@labels.1/@modelFacet /0/@diagram/@childNodes.8/@labels.1/@modelFacet /0/@diagram/@childNodes.9/@labels.1/@modelFacet /0/@diagram/@childNodes.10/@labels.1/@modelFacet /0/@diagram/@childNodes.11/@labels.1/@modelFacet /0/@diagram/@childNodes.12/@labels.1/@modelFacet /0/@diagram/@childNodes.13/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.0/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.statemachine.custom.parsers.TransitionPropertiesParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.14/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.15/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.16/@labelModelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.statemachine.custom.parsers.InternalTransitionParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.17/@labelModelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.statemachine.custom.parsers.EntryStateBehaviorParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.18/@labelModelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.statemachine.custom.parsers.DoActivityStateBehaviorParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.19/@labelModelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.statemachine.custom.parsers.ExitStateBehaviorParser"/>
- </labelParsers>
- <contextMenus
- context="/0/@diagram">
- <items
- xsi:type="gmfgen:LoadResourceAction"/>
- </contextMenus>
- </gmfgen:GenEditorGenerator>
- <papyrusgmfgenextension:PapyrusExtensionRootNode
- comment="Papyrus specific extension for GMFGen">
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Add super class to a selected set of generated EditParts"
- genView="/0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.0"
- name="NamedElementEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Label in charge to display applied stereotypes on links"
- genView="/0/@diagram/@links.0 /0/@diagram/@links.1"
- name="UMLConnectionNodeEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
- comment="ExternalLabel locator"
- classpath="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator"
- genExternalNodeLabel="/0/@diagram/@childNodes.1/@labels.1 /0/@diagram/@childNodes.3/@labels.1 /0/@diagram/@childNodes.4/@labels.1 /0/@diagram/@childNodes.5/@labels.1 /0/@diagram/@childNodes.6/@labels.1 /0/@diagram/@childNodes.7/@labels.1 /0/@diagram/@childNodes.8/@labels.1 /0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@childNodes.10/@labels.1 /0/@diagram/@childNodes.11/@labels.1 /0/@diagram/@childNodes.1/@labels.0 /0/@diagram/@childNodes.3/@labels.0 /0/@diagram/@childNodes.4/@labels.0 /0/@diagram/@childNodes.5/@labels.0 /0/@diagram/@childNodes.6/@labels.0 /0/@diagram/@childNodes.7/@labels.0 /0/@diagram/@childNodes.8/@labels.0 /0/@diagram/@childNodes.9/@labels.0 /0/@diagram/@childNodes.10/@labels.0 /0/@diagram/@childNodes.11/@labels.0 /0/@diagram/@childNodes.12/@labels.0 /0/@diagram/@childNodes.13/@labels.0"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Manages stereotype shown with External Label"
- genView="/0/@diagram/@childNodes.1/@labels.1 /0/@diagram/@childNodes.3/@labels.1 /0/@diagram/@childNodes.4/@labels.1 /0/@diagram/@childNodes.5/@labels.1 /0/@diagram/@childNodes.6/@labels.1 /0/@diagram/@childNodes.7/@labels.1 /0/@diagram/@childNodes.8/@labels.1 /0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@childNodes.10/@labels.1 /0/@diagram/@childNodes.11/@labels.1 /0/@diagram/@childNodes.12/@labels.1 /0/@diagram/@childNodes.13/@labels.1"
- name="StereotypeLabel"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocator"
- comment="Affixed EntryExitPoints ConnectionPointReferences Locator"
- classpath="org.eclipse.papyrus.uml.diagram.statemachine.custom.locators.CustomEntryExitPointPositionLocator"
- genChildSideAffixedNode="/0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificDiagramUpdater"
- comment="Region compartment custom DiagramUpdater"
- classpath="org.eclipse.papyrus.uml.diagram.statemachine.custom.parts.RegionCompartmentDiagramUpdater"
- genNode="/0/@diagram/@compartments.0"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Manage named element figure relying on Affixed Node"
- genView="/0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13"
- name="AffixedNode"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractBorderEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="elements that intherit form UMLNodeEditpart"
- genView="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10"
- name="UMLNodeEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- genView="/0/@diagram/@childNodes.15"
- name="ConstraintEditPart extension"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Add extension for PapyrusLabelEditPart"
- genView="/0/@diagram/@childNodes.1/@labels.0 /0/@diagram/@childNodes.3/@labels.0 /0/@diagram/@childNodes.4/@labels.0 /0/@diagram/@childNodes.5/@labels.0 /0/@diagram/@childNodes.6/@labels.0 /0/@diagram/@childNodes.7/@labels.0 /0/@diagram/@childNodes.8/@labels.0 /0/@diagram/@childNodes.9/@labels.0 /0/@diagram/@childNodes.10/@labels.0 /0/@diagram/@childNodes.11/@labels.0 /0/@diagram/@childNodes.12/@labels.0"
- name="PapyrusLabelEditPart"
- superOwnedEditPart="org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart"/>
- </papyrusgmfgenextension:PapyrusExtensionRootNode>
-</xmi:XMI>
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
+ xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
+ <gmfgen:GenEditorGenerator
+ packageNamePrefix="org.eclipse.papyrus.uml.diagram.statemachine"
+ modelID="PapyrusUMLStateMachineDiagram"
+ diagramFileExtension="PapyrusUMLStateMachine_diagram"
+ domainFileExtension="PapyrusUMLStateMachine"
+ dynamicTemplates="true"
+ templateDirectory="/org.eclipse.papyrus.def/xtend/"
+ copyrightText="Copyright (c) 2014 CEA LIST.&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation">
+ <audits>
+ <categories
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateInternalTransition"
+ name="validateInternalTransition"
+ description="Validate internal transition"
+ path="/0/@audits/@categories.0"
+ audits="/0/@audits/@rules.0"/>
+ <rules
+ name="validateInternalTransitionEnd"
+ description="Validate that internal transition has the same state for source and target"
+ id="org.eclipse.uml2.uml.util.UMLValidator.validateInternalTransition_sameTargetAndSrouce"
+ rule="/0/@expressionProviders/@providers.1/@expressions.0"
+ message="Validate that internal transition has the same state for source and target"
+ useInLiveMode="true"
+ category="/0/@audits/@categories.0">
+ <target
+ xsi:type="gmfgen:GenDomainElementTarget"
+ contextSelector="/0/@audits/@clientContexts.0">
+ <element
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition"/>
+ </target>
+ </rules>
+ <clientContexts
+ ruleTargets="/0/@audits/@rules.0/@target"/>
+ </audits>
+ <diagram
+ visualID="1000"
+ editPartClassName="PackageEditPart"
+ itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PackageCanonicalEditPolicy"
+ iconProviderPriority="Low"
+ creationWizardIconPath="icons/UMLDiagramFile.gif"
+ creationWizardCategoryID="org.eclipse.ui.Examples"
+ editingDomainID="org.eclipse.papyrus.uml.diagram.statemachine.EditingDomain"
+ validationEnabled="true"
+ validationDecorators="true"
+ liveValidationUIFeedback="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Package_1000"
+ editHelperClassName="PackageEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPackageCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPackageXYLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy"/>
+ <domainDiagramElement
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <childNodes
+ visualID="3000"
+ editPartClassName="RegionEditPart"
+ itemSemanticEditPolicyClassName="RegionItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="RegionCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.0"
+ graphicalNodeEditPolicyClassName="RegionGraphicalNodeEditPolicy"
+ createCommandClassName="RegionCreateCommand"
+ containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@childNodes.2">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="RegionEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.RegionFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.COMPONENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionComponentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/region"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/region"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ </childNodes>
+ <childNodes
+ visualID="5000"
+ editPartClassName="FinalStateEditPart"
+ itemSemanticEditPolicyClassName="FinalStateItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="FinalStateCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="FinalStateGraphicalNodeEditPolicy"
+ createCommandClassName="FinalStateCreateCommand"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.FinalState_5000"
+ displayName="FinalState"
+ editHelperClassName="FinalStateEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/FinalState"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5001"
+ editPartClassName="FinalStateFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="FinalStateFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5002"
+ editPartClassName="FinalStateStereotypeEditPart"
+ itemSemanticEditPolicyClassName="FinalStateStereotypeItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern=""
+ editorPattern="&lt;&lt;0>>"
+ editPattern="&lt;&lt;0>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="6000"
+ editPartClassName="StateEditPart"
+ itemSemanticEditPolicyClassName="StateItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="StateCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.17 /0/@diagram/@childNodes.18 /0/@diagram/@childNodes.19 /0/@diagram/@childNodes.16 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13"
+ compartments="/0/@diagram/@compartments.2"
+ graphicalNodeEditPolicyClassName="StateGraphicalNodeEditPolicy"
+ createCommandClassName="StateCreateCommand"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.State_6000"
+ displayName="State"
+ editHelperClassName="StateEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.StateFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateItemSemanticEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="6001"
+ editPartClassName="StateNameEditPart"
+ itemSemanticEditPolicyClassName="StateNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="19003"
+ editPartClassName="StateFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="StateFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="8000"
+ editPartClassName="PseudostateInitialEditPart"
+ itemSemanticEditPolicyClassName="PseudostateInitialItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PseudostateInitialCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PseudostateInitialNodeGraphicalNodeEditPolicy"
+ createCommandClassName="PseudostateInitialCreateCommand"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_8000"
+ displayName="Pseudostate"
+ editHelperClassName="PseudostateEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.10">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8001"
+ editPartClassName="PseudostateInitialFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="PseudostateFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="8002"
+ editPartClassName="PseudostateInitialStereotypeEditPart"
+ itemSemanticEditPolicyClassName="PseudostateInitialStereotypeltemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern="&lt;&lt;0>>"
+ editPattern="&lt;&lt;0>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="9000"
+ editPartClassName="PseudostateJoinEditPart"
+ itemSemanticEditPolicyClassName="PseudostateJoinItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PseudostateJoinCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PseudostateJoinNodeGraphicalNodeEditPolicy"
+ createCommandClassName="PseudostateJoinCreateCommand"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_9000"
+ displayName="Pseudostate"
+ editHelperClassName="PseudostateEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="10"
+ height="40"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPseudostateForkJoinResizeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.13">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.3">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="9001"
+ editPartClassName="PseudostateJoinFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="PseudostateFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="9002"
+ editPartClassName="PseudostateJoinStereotypeEditPart"
+ itemSemanticEditPolicyClassName="PseudostateJoinStereotypeItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern="&lt;&lt;0>>"
+ editPattern="&lt;&lt;0>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="10000"
+ editPartClassName="PseudostateForkEditPart"
+ itemSemanticEditPolicyClassName="PseudostateForkItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PseudostateForkCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PseudostateForkNodeGraphicalNodeEditPolicy"
+ createCommandClassName="PseudostateForkCreateCommand"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_10000"
+ displayName="Pseudostate"
+ editHelperClassName="PseudostateEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="10"
+ height="40"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPseudostateForkJoinResizeEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.14">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.4">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="10001"
+ editPartClassName="PseudostateForkNameEditPart"
+ itemSemanticEditPolicyClassName="PseudostateForkNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="10002"
+ editPartClassName="PseudostateForkStereotypeEditPart"
+ itemSemanticEditPolicyClassName="PseudostateForkStereotypeltemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern="&lt;&lt;0>>"
+ editPattern="&lt;&lt;0>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="11000"
+ editPartClassName="PseudostateChoiceEditPart"
+ itemSemanticEditPolicyClassName="PseudostateChoiceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PseudostateChoiceCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PseudostateChoiceNodeGraphicalNodeEditPolicy"
+ createCommandClassName="PseudostateChoiceCreateCommand"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_11000"
+ displayName="Pseudostate"
+ editHelperClassName="PseudostateEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="60"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.16">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.6">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="11001"
+ editPartClassName="PseudostateChoiceFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="PseudostateFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="50"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="11002"
+ editPartClassName="PseudostateChoiceStereotypeEditPart"
+ itemSemanticEditPolicyClassName="PseudostateChoiceStereotypeItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern="&lt;&lt;0>>"
+ editPattern="&lt;&lt;0>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="12000"
+ editPartClassName="PseudostateJunctionEditPart"
+ itemSemanticEditPolicyClassName="PseudostateJunctionItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PseudostateJunctionCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PseudostateJunctionNodeGraphicalNodeEditPolicy"
+ createCommandClassName="PseudostateJunctionCreateCommand"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_12000"
+ displayName="Pseudostate"
+ editHelperClassName="PseudostateEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="10"
+ height="10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.15">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.5">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="12001"
+ editPartClassName="PseudostateJunctionFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="PseudostateFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="12002"
+ editPartClassName="PseudostateJunctionStereotypeEditPart"
+ itemSemanticEditPolicyClassName="PseudostateJunctionStereotypeItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern="&lt;&lt;0>>"
+ editPattern="&lt;&lt;0>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="13000"
+ editPartClassName="PseudostateShallowHistoryEditPart"
+ itemSemanticEditPolicyClassName="PseudostateShallowHistoryItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PseudostateShallowHistoryCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PseudostateShallowHistoryNodeGraphicalNodeEditPolicy"
+ createCommandClassName="PseudostateShallowHistoryCreateCommand"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_13000"
+ displayName="Pseudostate"
+ editHelperClassName="PseudostateEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.12">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.2">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="13001"
+ editPartClassName="PseudostateShallowHistoryFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="PseudostateFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="13002"
+ editPartClassName="PseudostateShallowHistoryStereotypeEditPart"
+ itemSemanticEditPolicyClassName="PseudostateShallowHistoryStereotypeItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern="&lt;&lt;0>>"
+ editPattern="&lt;&lt;0>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="14000"
+ editPartClassName="PseudostateDeepHistoryEditPart"
+ itemSemanticEditPolicyClassName="PseudostateDeepHistoryItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PseudostateDeepHistoryCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PseudostateDeepHistoryNodeGraphicalNodeEditPolicy"
+ createCommandClassName="PseudostateDeepHistoryCreateCommand"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_14000"
+ displayName="Pseudostate"
+ editHelperClassName="PseudostateEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.11">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="14001"
+ editPartClassName="PseudostateDeepHistoryFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="PseudostateFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="14002"
+ editPartClassName="PseudostateDeepHistoryStereotypeEditPart"
+ itemSemanticEditPolicyClassName="PseudostateDeepHistoryStereotypeItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern="&lt;&lt;0>>"
+ editPattern="&lt;&lt;0>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="15000"
+ editPartClassName="PseudostateTerminateEditPart"
+ itemSemanticEditPolicyClassName="PseudostateTerminateItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PseudostateTerminateCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PseudostateTerminateNodeGraphicalNodeEditPolicy"
+ createCommandClassName="PseudostateTerminateCreateCommand"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_15000"
+ displayName="Pseudostate"
+ editHelperClassName="PseudostateEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="4"
+ height="4"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.19">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/subvertex"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.9">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="15001"
+ editPartClassName="PseudostateTerminateFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="PseudostateFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="15002"
+ editPartClassName="PseudostateTerminateStereotypeEditPart"
+ itemSemanticEditPolicyClassName="PseudostateTerminateStereotypeItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern="&lt;&lt;0>>"
+ editPattern="&lt;&lt;0>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="16000"
+ editPartClassName="PseudostateEntryPointEditPart"
+ itemSemanticEditPolicyClassName="PseudostateEntryPointItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PseudostateEntryPointCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PseudostateEntryPointNodeGraphicalNodeEditPolicy"
+ createCommandClassName="PseudostateEntryPointCreateCommand"
+ containers="/0/@diagram/@topLevelNodes.0 /0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@childNodes.2">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_16000"
+ displayName="Pseudostate"
+ editHelperClassName="PseudostateEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.17">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/connectionPoint"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/connectionPoint"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.7">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="16001"
+ editPartClassName="PseudostateEntryPointFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="PseudostateFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="16002"
+ editPartClassName="PseudostateEntryPointStereotypeEditPart"
+ itemSemanticEditPolicyClassName="PseudostateEntryPointStereotypeltemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern="&lt;&lt;0>>"
+ editPattern="&lt;&lt;0>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="17000"
+ editPartClassName="PseudostateExitPointEditPart"
+ itemSemanticEditPolicyClassName="PseudostateExitPointItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PseudostateExitPointCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="PseudostateExitPointNodeGraphicalNodeEditPolicy"
+ createCommandClassName="PseudostateExitPointCreateCommand"
+ containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.2">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_17000"
+ displayName="Pseudostate"
+ editHelperClassName="PseudostateEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateExitPointFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.18">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/connectionPoint"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/connectionPoint"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.8">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Pseudostate/kind"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="17001"
+ editPartClassName="PseudostateExitPointFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="PseudostateFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="17002"
+ editPartClassName="PseudostateExitPointStereotypeEditPart"
+ itemSemanticEditPolicyClassName="PseudostateExitPointStereotypeItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern="&lt;&lt;0>>"
+ editPattern="&lt;&lt;0>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildSideAffixedNode"
+ visualID="18000"
+ editPartClassName="ConnectionPointReferenceEditPart"
+ itemSemanticEditPolicyClassName="ConnectionPointReferenceItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ConnectionPointReferenceCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ConnectionPointReferenceNodeGraphicalNodeEditPolicy"
+ createCommandClassName="ConnectionPointReferenceCreateCommand"
+ containers="/0/@diagram/@childNodes.2 /0/@diagram/@compartments.2">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.ConnectionPointReference_18000"
+ displayName="ConnectionPointReference"
+ editHelperClassName="ConnectionPointReferenceEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.ConnectionPointReferenceFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="4"
+ height="4"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ConnectionPointReference"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/connection"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/connection"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="18001"
+ editPartClassName="ConnectionPointReferenceNameEditPart"
+ itemSemanticEditPolicyClassName="ConnectionPointReferenceNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="3"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="18002"
+ editPartClassName="ConnectionPointReferenceStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ConnectionPointReferenceItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="25"
+ y="-10"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ editorPattern="&lt;&lt;0>>"
+ editPattern="&lt;&lt;0>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="666"
+ editPartClassName="CommentEditPart"
+ itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="CommentCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicy"
+ createCommandClassName="CommentCreateCommand"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.StateMachineComment"
+ displayName="Comment"
+ editHelperClassName="CommentEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.22">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="6666">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCornerBentFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3"
+ viewPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="668"
+ editPartClassName="ConstraintEditPart"
+ itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ConstraintCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicy"
+ createCommandClassName="ConstraintCreateCommand"
+ containers="/0/@diagram/@compartments.0">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Constraint_668"
+ displayName="Constraint"
+ editHelperClassName="ConstraintEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.21">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="6668"
+ editPartClassName="ConstraintNameLabelEditPart"
+ itemSemanticEditPolicyClassName="ConstraintNameLabelItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6669"
+ editPartClassName="ConstraintBodyEditPart"
+ itemSemanticEditPolicyClassName="ConstraintBodyItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.4"
+ viewPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="680"
+ editPartClassName="InternalTransitionEditPart"
+ itemSemanticEditPolicyClassName="InternalTransitionItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="InternalTransitionCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="InternalTransitionGraphicalNodeEditPolicy"
+ createCommandClassName="InternalTransitionCreateCommand"
+ containers="/0/@diagram/@childNodes.2"
+ labelReadOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.InternalTransition_680"
+ displayName="InternalTransition"
+ metamodelType="/0/@diagram/@links.0/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Vertex/incoming"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Vertex/incoming"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.5">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition/guard"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="690"
+ editPartClassName="EntryStateBehaviorEditPart"
+ itemSemanticEditPolicyClassName="EntryStateBehaviorItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="EntryStateBehaviorCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="EntryStateBehaviorGraphicalNodeEditPolicy"
+ createCommandClassName="EntryStateBehaviorCreateCommand"
+ containers="/0/@diagram/@childNodes.2">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.EntryStateBehavior_690"
+ displayName="EntryStateBehavior"
+ editHelperClassName="EntryStateBehaviorEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.2">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/entry"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/entry"/>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.6">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/entry"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="691"
+ editPartClassName="DoActivityStateBehaviorStateEditPart"
+ itemSemanticEditPolicyClassName="DoActivityStateBehaviorStateItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="DoActivityStateBehaviorCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="DoActivityStateBehaviorStateGraphicalNodeEditPolicy"
+ createCommandClassName="DoActivityStateBehaviorStateCreateCommand"
+ containers="/0/@diagram/@childNodes.2">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.DoActivityStateBehavior_691"
+ displayName="DoActivityStateBehavior"
+ editHelperClassName="DoActivityStateBehaviorEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.3">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/doActivity"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/doActivity"/>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.7">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/doActivity"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="692"
+ editPartClassName="ExitStateBehaviorEditPart"
+ itemSemanticEditPolicyClassName="ExitStateBehaviorItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ExitStateBehaviorCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ExitStateBehaviorGraphicalNodeEditPolicy"
+ createCommandClassName="ExitStateBehaviorCreateCommand"
+ containers="/0/@diagram/@childNodes.2">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.ExitStateBehavior_692"
+ displayName="ExitStateBehavior"
+ editHelperClassName="ExitStateBehaviorEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.CenteredWrappedLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <modelFacet
+ modelElementSelector="/0/@expressionProviders/@providers.1/@expressions.1">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Behavior"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/exit"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/exit"/>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.8">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/State/exit"/>
+ </labelModelFacet>
+ </childNodes>
+ <topLevelNodes
+ visualID="2000"
+ editPartClassName="StateMachineEditPart"
+ itemSemanticEditPolicyClassName="StateMachineItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="StateMachineCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"
+ compartments="/0/@diagram/@compartments.1"
+ graphicalNodeEditPolicyClassName="StateMachineGraphicalNodeEditPolicy"
+ createCommandClassName="StateMachineCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="StateMachineEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.StateMachineFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="200"
+ height="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenReferenceNewElementSpec">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StateMachine/region"/>
+ <newElementInitializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </newElementInitializers>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="2001"
+ editPartClassName="StateMachineNameEditPart"
+ itemSemanticEditPolicyClassName="StateMachineNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <links
+ visualID="7000"
+ editPartClassName="TransitionEditPart"
+ itemSemanticEditPolicyClassName="TransitionItemSemanticEditPolicy"
+ createCommandClassName="TransitionCreateCommand"
+ reorientCommandClassName="TransitionReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Transition_7000"
+ displayName="Transition"
+ editHelperClassName="TransitionEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.TransitionFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Region/transition"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.20">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition/source"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition/target"/>
+ </modelFacet>
+ <labels
+ visualID="7001"
+ editPartClassName="TransitionNameEditPart"
+ itemSemanticEditPolicyClassName="TransitionNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="7002"
+ editPartClassName="TransitionGuardEditPart"
+ itemSemanticEditPolicyClassName="TransitionGuardItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.2">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Transition/guard"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="7003"
+ editPartClassName="TransitionStereotypeEditPart"
+ itemSemanticEditPolicyClassName="TransitionStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.1"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="19000"
+ editPartClassName="GeneralizationEditPart"
+ itemSemanticEditPolicyClassName="GeneralizationItemSemanticEditPolicy"
+ incomingCreationAllowed="true"
+ createCommandClassName="GeneralizationCreateCommand"
+ reorientCommandClassName="GeneralizationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Generalization_19000"
+ displayName="Generalization"
+ editHelperClassName="GeneralizationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.GeneralizationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/general"/>
+ </modelFacet>
+ <labels
+ visualID="19002"
+ editPartClassName="GeneralizationStereotypeEditPart"
+ itemSemanticEditPolicyClassName="GeneralizationStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/isSubstitutable"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <links
+ visualID="667"
+ editPartClassName="CommentAnnotatedElementEditPart"
+ itemSemanticEditPolicyClassName="CommentAnnotatedElementItemSemanticEditPolicy"
+ createCommandClassName="CommentAnnotatedElementCreateCommand"
+ reorientCommandClassName="CommentAnnotatedElementReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="670"
+ editPartClassName="ConstraintConstrainedElementEditPart"
+ itemSemanticEditPolicyClassName="ConstraintConstrainedElementItemSemanticEditPolicy"
+ createCommandClassName="ConstraintConstrainedElementCreateCommand"
+ reorientCommandClassName="ConstraintConstrainedElementReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="8500"
+ editPartClassName="ContextLinkEditPart"
+ itemSemanticEditPolicyClassName="ContextLinkItemSemanticEditPolicy"
+ createCommandClassName="ContextLinkCreateCommand"
+ reorientCommandClassName="ContextLinkReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.CustomContextLinkFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomAppliedStereotypeContextLinkLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/context"/>
+ </modelFacet>
+ <labels
+ visualID="8501"
+ editPartClassName="ContextLinkAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ContextLinkAppliedStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.NoSemanticParserEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern="&lt;&lt;{0}>>"
+ editorPattern="&lt;&lt;{0}>>"
+ editPattern="&lt;&lt;{0}>>">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </links>
+ <compartments
+ visualID="3002"
+ editPartClassName="RegionCompartmentEditPart"
+ itemSemanticEditPolicyClassName="RegionCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="RegionCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.15"
+ title="RegionCompartment"
+ canCollapse="false"
+ hideIfEmpty="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.0"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getRegionCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionCompartmentCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionCompartmentXYLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionCompartmentItemSemanticEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="2002"
+ editPartClassName="StateMachineCompartmentEditPart"
+ itemSemanticEditPolicyClassName="StateMachineCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="StateMachineCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"
+ title="StateMachineCompartment"
+ canCollapse="false"
+ hideIfEmpty="false"
+ needsTitle="false"
+ node="/0/@diagram/@topLevelNodes.0"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getStateMachineCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineCompartmentXYLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="6002"
+ editPartClassName="StateCompartmentEditPart"
+ itemSemanticEditPolicyClassName="StateCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="StateCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.13"
+ title="StateCompartment"
+ canCollapse="false"
+ hideIfEmpty="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.2"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getStateCompartmentFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="&quot;RemoveOrphanView&quot;"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateCompartmentXYLayoutEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateCompartmentCreationEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
+ </compartments>
+ <palette>
+ <groups
+ title="Nodes"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createNodesGroup"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Region"
+ description="Region"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Region.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Region.gif"
+ createMethodName="createRegionCreationTool"
+ genNodes="/0/@diagram/@childNodes.0"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="State"
+ description="State"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/State.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/State.gif"
+ createMethodName="createStateCreationTool"
+ genNodes="/0/@diagram/@childNodes.2"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Initial"
+ description="Initial"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_initial.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_initial.gif"
+ createMethodName="createInitialCreationTool"
+ genNodes="/0/@diagram/@childNodes.3"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="FinalState"
+ description="FinalState"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FinalState.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FinalState.gif"
+ createMethodName="createFinalStateCreationTool"
+ genNodes="/0/@diagram/@childNodes.1"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="ShallowHistory"
+ description="ShallowHistory"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_shallowHistory.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_shallowHistory.gif"
+ createMethodName="createShallowHistoryCreationTool"
+ genNodes="/0/@diagram/@childNodes.8"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="DeepHistory"
+ description="DeepHistory"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_deepHistory.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_deepHistory.gif"
+ createMethodName="createDeepHistoryCreationTool"
+ genNodes="/0/@diagram/@childNodes.9"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Fork"
+ description="Fork"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_fork.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_fork.gif"
+ createMethodName="createForkCreationTool"
+ genNodes="/0/@diagram/@childNodes.5"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Join"
+ description="Join"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_join.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_join.gif"
+ createMethodName="createJoinCreationTool"
+ genNodes="/0/@diagram/@childNodes.4"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Choice"
+ description="Choice"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_choice.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_choice.gif"
+ createMethodName="createChoiceCreationTool"
+ genNodes="/0/@diagram/@childNodes.6"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Junction"
+ description="Junction"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_junction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_junction.gif"
+ createMethodName="createJunctionCreationTool"
+ genNodes="/0/@diagram/@childNodes.7"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="EntryPoint"
+ description="EntryPoint"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_entryPoint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_entryPoint.gif"
+ createMethodName="createEntryPointCreationTool"
+ genNodes="/0/@diagram/@childNodes.11"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="ExitPoint"
+ description="ExitPoint"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_exitPoint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_exitPoint.gif"
+ createMethodName="createExitPointCreationTool"
+ genNodes="/0/@diagram/@childNodes.12"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Terminate"
+ description="Terminate"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_terminate.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_terminate.gif"
+ createMethodName="createTerminateCreationTool"
+ genNodes="/0/@diagram/@childNodes.10"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="ConnectionPointReference"
+ description="ConnectionPointReference"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectionPointReference.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectionPointReference.gif"
+ createMethodName="createConnectionPointReferenceCreationTool"
+ genNodes="/0/@diagram/@childNodes.13"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Comment"
+ description="Comment"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ createMethodName="createStateMachineCommentCreationTool"
+ genNodes="/0/@diagram/@childNodes.14"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Constraint"
+ description="Create Constraint"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ createMethodName="createConstraintCreationTool"
+ genNodes="/0/@diagram/@childNodes.15"/>
+ </groups>
+ <groups
+ title="Edges"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ createMethodName="createEdgesGroup"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Transition"
+ description="Transition"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Transition_local.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Transition_local.gif"
+ createMethodName="createTransitionCreationTool"
+ qualifiedToolName=""
+ genLinks="/0/@diagram/@links.0"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Link"
+ description="Creation of a link for comment, constraint"
+ largeIconPath="icons/obj16/Link.gif"
+ smallIconPath="icons/obj16/Link.gif"
+ createMethodName="createCommentlinkCreationTool"
+ genLinks="/0/@diagram/@links.2 /0/@diagram/@links.3"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="ContextLink"
+ description="Creation of a context link for a Constraint"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ genLinks="/0/@diagram/@links.4"/>
+ </groups>
+ </palette>
+ <preferencePages
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.general"
+ name="UML Diagram">
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.appearance"
+ name="Appearance"
+ kind="Appearance"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.connections"
+ name="Connections"
+ kind="Connections"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.printing"
+ name="Printing"
+ kind="Printing"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
+ name="Rulers And Grid"
+ kind="RulersAndGrid"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.pathmaps"
+ name="Pathmaps"
+ kind="Pathmaps"/>
+ </preferencePages>
+ </diagram>
+ <plugin
+ iD="org.eclipse.papyrus.uml.diagram.statemachine"
+ name="PapyrusUMLStateMachineDiagram"
+ provider="Papyrus"
+ version="1.1.0.qualifier"/>
+ <editor
+ iconPath="icons/UMLDiagramFile.gif"/>
+ <diagramUpdater/>
+ <propertySheet>
+ <tabs
+ xsi:type="gmfgen:GenStandardPropertyTab"
+ iD="appearance"/>
+ <tabs
+ xsi:type="gmfgen:GenStandardPropertyTab"
+ iD="diagram"
+ label="Rulers &amp; Grid"/>
+ <tabs
+ xsi:type="gmfgen:GenCustomPropertyTab"
+ iD="domain"
+ label="Core">
+ <filter
+ xsi:type="gmfgen:TypeTabFilter">
+ <types>org.eclipse.gmf.runtime.notation.View</types>
+ <types>org.eclipse.gef.EditPart</types>
+ <generatedTypes>abstractNavigatorItem</generatedTypes>
+ </filter>
+ </tabs>
+ <tabs
+ xsi:type="gmfgen:GenCustomPropertyTab"
+ iD="domain"
+ label="Core">
+ <filter
+ xsi:type="gmfgen:TypeTabFilter">
+ <types>org.eclipse.gmf.runtime.notation.View</types>
+ <types>org.eclipse.gef.EditPart</types>
+ <generatedTypes>abstractNavigatorItem</generatedTypes>
+ </filter>
+ </tabs>
+ <tabs
+ xsi:type="gmfgen:GenCustomPropertyTab"
+ iD="domain"
+ label="Core">
+ <filter
+ xsi:type="gmfgen:TypeTabFilter">
+ <types>org.eclipse.gmf.runtime.notation.View</types>
+ <types>org.eclipse.gef.EditPart</types>
+ <generatedTypes>abstractNavigatorItem</generatedTypes>
+ </filter>
+ </tabs>
+ </propertySheet>
+ <domainGenModel
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
+ <expressionProviders
+ expressionsPackageName="org.eclipse.papyrus.uml.diagram.statemachine.custom.expressions">
+ <providers
+ xsi:type="gmfgen:GenJavaExpressionProvider"
+ injectExpressionBody="true">
+ <expressions
+ body="return org.eclipse.uml2.uml.PseudostateKind.INITIAL_LITERAL;"/>
+ <expressions
+ body="return org.eclipse.uml2.uml.PseudostateKind.DEEP_HISTORY_LITERAL;"/>
+ <expressions
+ body="return org.eclipse.uml2.uml.PseudostateKind.SHALLOW_HISTORY_LITERAL;"/>
+ <expressions
+ body="return org.eclipse.uml2.uml.PseudostateKind.JOIN_LITERAL;"/>
+ <expressions
+ body="return org.eclipse.uml2.uml.PseudostateKind.FORK_LITERAL;"/>
+ <expressions
+ body="return org.eclipse.uml2.uml.PseudostateKind.JUNCTION_LITERAL;"/>
+ <expressions
+ body="return org.eclipse.uml2.uml.PseudostateKind.CHOICE_LITERAL;"/>
+ <expressions
+ body="return org.eclipse.uml2.uml.PseudostateKind.ENTRY_POINT_LITERAL;"/>
+ <expressions
+ body="return org.eclipse.uml2.uml.PseudostateKind.EXIT_POINT_LITERAL;"/>
+ <expressions
+ body="return org.eclipse.uml2.uml.PseudostateKind.TERMINATE_LITERAL;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="// Test if the pseudostate is an initial&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.INITIAL_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="// Test if the pseudostate is a deepHistory&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.DEEP_HISTORY_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="// Test if the pseudostate is a shallowHistory&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.SHALLOW_HISTORY_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="// Test if the pseudostate is a join&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.JOIN_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="// Test if the pseudostate is a fork&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.FORK_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="// Test if the pseudostate is a junction&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.JUNCTION_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="// Test if the pseudostate is a choice&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.CHOICE_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="// Test if the pseudostate is an entryPoint&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.ENTRY_POINT_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="// Test if the pseudostate is an exitPoint&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.EXIT_POINT_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="// Test if the pseudostate is a terminate&#xD;&#xA;&#x9;&#x9;if (domainElement instanceof org.eclipse.uml2.uml.Pseudostate) {&#xD;&#xA;&#x9;&#x9;&#x9;org.eclipse.uml2.uml.PseudostateKind kind = ((org.eclipse.uml2.uml.Pseudostate) domainElement).getKind();&#xA;&#x9;&#x9;&#x9;if(kind.equals(org.eclipse.uml2.uml.PseudostateKind.TERMINATE_LITERAL))&#xA;&#x9;&#x9;&#x9;&#x9;return true;&#xA;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;return false;"/>
+ <expressions
+ body="return org.eclipse.papyrus.uml.tools.utils.NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());"/>
+ <expressions
+ body="org.eclipse.uml2.uml.LiteralString literalString=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();&#xD;&#xA;literalString.setValue(&quot;&quot;);&#xD;&#xA;return literalString;"/>
+ <expressions
+ body="return &quot;&quot;;"/>
+ </providers>
+ <providers
+ xsi:type="gmfgen:GenExpressionInterpreter"
+ className="UMLOCLFactory">
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="(kind = TransitionKind::internal) implies (source.oclIsKindOf (State) and source = target)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(State)&#xD;&#xA;then self.owner.oclAsType(State).exit->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(State)&#xD;&#xA;then self.owner.oclAsType(State).entry->includes(self)&#xD;&#xA;else false endif"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if self.owner.oclIsKindOf(State)&#xD;&#xA;then self.owner.oclAsType(State).doActivity->includes(self)&#xD;&#xA;else false endif"/>
+ </providers>
+ </expressionProviders>
+ <labelParsers
+ extensibleViaService="true">
+ <implementations
+ xsi:type="gmfgen:PredefinedParser"
+ uses="/0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@labels.0/@modelFacet /0/@diagram/@links.0/@labels.0/@modelFacet /0/@diagram/@childNodes.5/@labels.0/@modelFacet /0/@diagram/@childNodes.13/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.0/@modelFacet /0/@diagram/@childNodes.15/@labels.0/@modelFacet /0/@diagram/@links.4/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@labels.1/@modelFacet /0/@diagram/@childNodes.1/@labels.0/@modelFacet /0/@diagram/@childNodes.3/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.6/@labels.0/@modelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.11/@labels.0/@modelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.0/@labels.2/@modelFacet /0/@diagram/@childNodes.1/@labels.1/@modelFacet /0/@diagram/@childNodes.3/@labels.1/@modelFacet /0/@diagram/@childNodes.4/@labels.1/@modelFacet /0/@diagram/@childNodes.5/@labels.1/@modelFacet /0/@diagram/@childNodes.6/@labels.1/@modelFacet /0/@diagram/@childNodes.7/@labels.1/@modelFacet /0/@diagram/@childNodes.8/@labels.1/@modelFacet /0/@diagram/@childNodes.9/@labels.1/@modelFacet /0/@diagram/@childNodes.10/@labels.1/@modelFacet /0/@diagram/@childNodes.11/@labels.1/@modelFacet /0/@diagram/@childNodes.12/@labels.1/@modelFacet /0/@diagram/@childNodes.13/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.0/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.statemachine.custom.parsers.TransitionPropertiesParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.14/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.15/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.16/@labelModelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.statemachine.custom.parsers.InternalTransitionParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.17/@labelModelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.statemachine.custom.parsers.EntryStateBehaviorParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.18/@labelModelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.statemachine.custom.parsers.DoActivityStateBehaviorParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@childNodes.19/@labelModelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.statemachine.custom.parsers.ExitStateBehaviorParser"/>
+ </labelParsers>
+ <contextMenus
+ context="/0/@diagram">
+ <items
+ xsi:type="gmfgen:LoadResourceAction"/>
+ </contextMenus>
+ </gmfgen:GenEditorGenerator>
+ <papyrusgmfgenextension:PapyrusExtensionRootNode
+ comment="Papyrus specific extension for GMFGen">
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Add super class to a selected set of generated EditParts"
+ genView="/0/@diagram/@childNodes.0"
+ name="NamedElementEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Label in charge to display applied stereotypes on links"
+ genView="/0/@diagram/@links.0 /0/@diagram/@links.1"
+ name="UMLConnectionNodeEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
+ comment="ExternalLabel locator"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator"
+ genExternalNodeLabel="/0/@diagram/@childNodes.1/@labels.1 /0/@diagram/@childNodes.3/@labels.1 /0/@diagram/@childNodes.4/@labels.1 /0/@diagram/@childNodes.5/@labels.1 /0/@diagram/@childNodes.6/@labels.1 /0/@diagram/@childNodes.7/@labels.1 /0/@diagram/@childNodes.8/@labels.1 /0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@childNodes.10/@labels.1 /0/@diagram/@childNodes.11/@labels.1 /0/@diagram/@childNodes.13/@labels.0"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Manages stereotype shown with External Label"
+ genView="/0/@diagram/@childNodes.1/@labels.1 /0/@diagram/@childNodes.3/@labels.1 /0/@diagram/@childNodes.4/@labels.1 /0/@diagram/@childNodes.5/@labels.1 /0/@diagram/@childNodes.6/@labels.1 /0/@diagram/@childNodes.7/@labels.1 /0/@diagram/@childNodes.8/@labels.1 /0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@childNodes.10/@labels.1 /0/@diagram/@childNodes.11/@labels.1 /0/@diagram/@childNodes.12/@labels.1 /0/@diagram/@childNodes.13/@labels.1"
+ name="StereotypeLabel"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocator"
+ comment="Affixed EntryExitPoints ConnectionPointReferences Locator"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.PortPositionLocator"
+ genChildSideAffixedNode="/0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificDiagramUpdater"
+ comment="Region compartment custom DiagramUpdater"
+ classpath="org.eclipse.papyrus.uml.diagram.statemachine.custom.parts.RegionCompartmentDiagramUpdater"
+ genNode="/0/@diagram/@compartments.0"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Manage named element figure relying on Affixed Node"
+ genView="/0/@diagram/@childNodes.13"
+ name="AffixedNode"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractBorderEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ genView="/0/@diagram/@childNodes.15"
+ name="ConstraintEditPart extension"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add superclass for floating Label"
+ genView="/0/@diagram/@childNodes.2/@labels.1 /0/@diagram/@childNodes.1/@labels.0 /0/@diagram/@childNodes.3/@labels.0 /0/@diagram/@childNodes.4/@labels.0 /0/@diagram/@childNodes.6/@labels.0 /0/@diagram/@childNodes.7/@labels.0 /0/@diagram/@childNodes.8/@labels.0 /0/@diagram/@childNodes.9/@labels.0 /0/@diagram/@childNodes.10/@labels.0 /0/@diagram/@childNodes.5/@labels.0 /0/@diagram/@childNodes.11/@labels.0 /0/@diagram/@childNodes.12/@labels.0"
+ name="FloatingLabelEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ genView="/0/@diagram/@childNodes.2 /0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.1 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.4"
+ name="RoundedCompartmentEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
+ comment="Locator for external Floating label of RoundedCompartment EP"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator"
+ genExternalNodeLabel="/0/@diagram/@childNodes.2/@labels.1 /0/@diagram/@childNodes.1/@labels.0 /0/@diagram/@childNodes.3/@labels.0 /0/@diagram/@childNodes.4/@labels.0 /0/@diagram/@childNodes.6/@labels.0 /0/@diagram/@childNodes.7/@labels.0 /0/@diagram/@childNodes.8/@labels.0 /0/@diagram/@childNodes.9/@labels.0 /0/@diagram/@childNodes.10/@labels.0 /0/@diagram/@childNodes.5/@labels.0 /0/@diagram/@childNodes.11/@labels.0 /0/@diagram/@childNodes.12/@labels.0"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="extend view for affixed node"
+ genView="/0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12"
+ name="RoundedBorderNamedElementEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart"/>
+ </papyrusgmfgenextension:PapyrusExtensionRootNode>
+</xmi:XMI>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml
index 69e5f2a0e33..119cb6e3402 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml
@@ -16,527 +16,527 @@
<plugin>
- <extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
- <?gmfgen generated="true"?>
- <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLMarkerNavigationProvider">
- <MarkerType name="org.eclipse.papyrus.uml.diagram.statemachine.diagnostic"/>
- <Priority name="Lowest"/>
- </MarkerNavigationProvider>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
+ <?gmfgen generated="true"?>
+ <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLMarkerNavigationProvider">
+ <MarkerType name="org.eclipse.papyrus.uml.diagram.statemachine.diagnostic"/>
+ <Priority name="Lowest"/>
+ </MarkerNavigationProvider>
+ </extension>
- <extension id="diagnostic" name="PapyrusUMLStateMachineDiagram problems" point="org.eclipse.core.resources.markers">
- <?gmfgen generated="true"?>
- <super type="org.eclipse.core.resources.problemmarker"/>
- <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
- <persistent value="true"/>
+ <extension id="diagnostic" name="PapyrusUMLStateMachineDiagram problems" point="org.eclipse.core.resources.markers">
+ <?gmfgen generated="true"?>
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
+ <persistent value="true"/>
</extension>
- <extension point="org.eclipse.core.runtime.preferences" id="prefs">
- <?gmfgen generated="true"?>
- <initializer class="org.eclipse.papyrus.uml.diagram.statemachine.preferences.DiagramPreferenceInitializer"/>
- </extension>
+ <extension point="org.eclipse.core.runtime.preferences" id="prefs">
+ <?gmfgen generated="true"?>
+ <initializer class="org.eclipse.papyrus.uml.diagram.statemachine.preferences.DiagramPreferenceInitializer"/>
+ </extension>
- <extension point="org.eclipse.ui.preferencePages" id="prefpages">
- <?gmfgen generated="true"?>
-<page
- id="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLStateMachineDiagram"
- name="PapyrusUMLStateMachineDiagram Diagram"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
- class="org.eclipse.papyrus.uml.diagram.statemachine.preferences.DiagramGeneralPreferencePage">
-</page>
-<page
- id="org.eclipse.papyrus.uml.diagram.statemachine.preferences.DiagramPrintingPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.printing"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLStateMachineDiagram"
- class="org.eclipse.papyrus.uml.diagram.statemachine.preferences.DiagramPrintingPreferencePage">
-</page>
-<page
- id="org.eclipse.papyrus.uml.diagram.statemachine.preferences.DiagramRulersAndGridPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLStateMachineDiagram"
- class="org.eclipse.papyrus.uml.diagram.statemachine.preferences.DiagramRulersAndGridPreferencePage">
-</page>
- </extension>
+ <extension point="org.eclipse.ui.preferencePages" id="prefpages">
+ <?gmfgen generated="true"?>
+<page
+ id="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLStateMachineDiagram"
+ name="PapyrusUMLStateMachineDiagram Diagram"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
+ class="org.eclipse.papyrus.uml.diagram.statemachine.preferences.DiagramGeneralPreferencePage">
+</page>
+<page
+ id="org.eclipse.papyrus.uml.diagram.statemachine.preferences.DiagramPrintingPreferencePage"
+ name="%prefpage.org.eclipse.uml2.uml.diagram.printing"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLStateMachineDiagram"
+ class="org.eclipse.papyrus.uml.diagram.statemachine.preferences.DiagramPrintingPreferencePage">
+</page>
+<page
+ id="org.eclipse.papyrus.uml.diagram.statemachine.preferences.DiagramRulersAndGridPreferencePage"
+ name="%prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.PapyrusUMLStateMachineDiagram"
+ class="org.eclipse.papyrus.uml.diagram.statemachine.preferences.DiagramRulersAndGridPreferencePage">
+</page>
+ </extension>
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
- <?gmfgen generated="true"?>
- <propertyContributor
- contributorId="org.eclipse.papyrus.uml.diagram.statemachine"
- labelProvider="org.eclipse.papyrus.uml.diagram.statemachine.sheet.UMLSheetLabelProvider">
- <propertyCategory category="domain"/>
- <propertyCategory category="visual"/>
- <propertyCategory category="extra"/>
- </propertyContributor>
- </extension>
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
+ <?gmfgen generated="true"?>
+ <propertyContributor
+ contributorId="org.eclipse.papyrus.uml.diagram.statemachine"
+ labelProvider="org.eclipse.papyrus.uml.diagram.statemachine.sheet.UMLSheetLabelProvider">
+ <propertyCategory category="domain"/>
+ <propertyCategory category="visual"/>
+ <propertyCategory category="extra"/>
+ </propertyContributor>
+ </extension>
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
- <?gmfgen generated="true"?>
- <propertyTabs contributorId="org.eclipse.papyrus.uml.diagram.statemachine">
- <propertyTab
- category="visual"
- id="property.tab.AppearancePropertySection"
- label="%tab.appearance"/>
- <propertyTab
- category="visual"
- id="property.tab.DiagramPropertySection"
- label="%tab.diagram"/>
- <propertyTab
- category="domain"
- id="property.tab.domain"
- label="%tab.domain"/>
- <propertyTab
- category="domain"
- id="property.tab.domain"
- label="%tab.domain"/>
- <propertyTab
- category="domain"
- id="property.tab.domain"
- label="%tab.domain"/>
- </propertyTabs>
- </extension>
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
+ <?gmfgen generated="true"?>
+ <propertyTabs contributorId="org.eclipse.papyrus.uml.diagram.statemachine">
+ <propertyTab
+ category="visual"
+ id="property.tab.AppearancePropertySection"
+ label="%tab.appearance"/>
+ <propertyTab
+ category="visual"
+ id="property.tab.DiagramPropertySection"
+ label="%tab.diagram"/>
+ <propertyTab
+ category="domain"
+ id="property.tab.domain"
+ label="%tab.domain"/>
+ <propertyTab
+ category="domain"
+ id="property.tab.domain"
+ label="%tab.domain"/>
+ <propertyTab
+ category="domain"
+ id="property.tab.domain"
+ label="%tab.domain"/>
+ </propertyTabs>
+ </extension>
- <extension point="org.eclipse.ui.views.properties.tabbed.propertySections" id="propsections">
- <?gmfgen generated="true"?>
- <propertySections contributorId="org.eclipse.papyrus.uml.diagram.statemachine">
- <propertySection id="property.section.ConnectorAppearancePropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.ShapeColorAndFontPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.DiagramColorsAndFontsPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.RulerGridPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection"
- tab="property.tab.DiagramPropertySection">
- </propertySection>
- <propertySection
- id="property.section.domain"
- tab="property.tab.domain"
- class="org.eclipse.papyrus.uml.diagram.statemachine.sheet.UMLPropertySection">
- <input type="org.eclipse.gmf.runtime.notation.View"/>
- <input type="org.eclipse.gef.EditPart"/>
- </propertySection>
- <propertySection
- id="property.section.domain"
- tab="property.tab.domain"
- class="org.eclipse.papyrus.uml.diagram.statemachine.sheet.UMLPropertySection">
- <input type="org.eclipse.gmf.runtime.notation.View"/>
- <input type="org.eclipse.gef.EditPart"/>
- </propertySection>
- <propertySection
- id="property.section.domain"
- tab="property.tab.domain"
- class="org.eclipse.papyrus.uml.diagram.statemachine.sheet.UMLPropertySection">
- <input type="org.eclipse.gmf.runtime.notation.View"/>
- <input type="org.eclipse.gef.EditPart"/>
- </propertySection>
- </propertySections>
- </extension>
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertySections" id="propsections">
+ <?gmfgen generated="true"?>
+ <propertySections contributorId="org.eclipse.papyrus.uml.diagram.statemachine">
+ <propertySection id="property.section.ConnectorAppearancePropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.ShapeColorAndFontPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.DiagramColorsAndFontsPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.RulerGridPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection"
+ tab="property.tab.DiagramPropertySection">
+ </propertySection>
+ <propertySection
+ id="property.section.domain"
+ tab="property.tab.domain"
+ class="org.eclipse.papyrus.uml.diagram.statemachine.sheet.UMLPropertySection">
+ <input type="org.eclipse.gmf.runtime.notation.View"/>
+ <input type="org.eclipse.gef.EditPart"/>
+ </propertySection>
+ <propertySection
+ id="property.section.domain"
+ tab="property.tab.domain"
+ class="org.eclipse.papyrus.uml.diagram.statemachine.sheet.UMLPropertySection">
+ <input type="org.eclipse.gmf.runtime.notation.View"/>
+ <input type="org.eclipse.gef.EditPart"/>
+ </propertySection>
+ <propertySection
+ id="property.section.domain"
+ tab="property.tab.domain"
+ class="org.eclipse.papyrus.uml.diagram.statemachine.sheet.UMLPropertySection">
+ <input type="org.eclipse.gmf.runtime.notation.View"/>
+ <input type="org.eclipse.gef.EditPart"/>
+ </propertySection>
+ </propertySections>
+ </extension>
<?gmfgen generated="true"?>
- <extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
- <?gmfgen generated="true"?>
- <viewProvider class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLViewProvider">
- <Priority name="Lowest"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLStateMachineDiagram"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2000,3000,5000,6000,8000,9000,10000,11000,12000,13000,14000,15000,16000,17000,18000,666,668,680,690,691,692"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="7000,19000,667,670,8500"/>
- </viewProvider>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
+ <?gmfgen generated="true"?>
+ <viewProvider class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLViewProvider">
+ <Priority name="Lowest"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLStateMachineDiagram"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2000,3000,5000,6000,8000,9000,10000,11000,12000,13000,14000,15000,16000,17000,18000,666,668,680,690,691,692"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="7000,19000,667,670,8500"/>
+ </viewProvider>
+ </extension>
- <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
- <?gmfgen generated="true"?>
- <editpartProvider class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLEditPartProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
- <method name="getType()" value="PapyrusUMLStateMachineDiagram"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
- <method name="getType()" value="2000,3000,5000,6000,8000,9000,10000,11000,12000,13000,14000,15000,16000,17000,18000,666,668,680,690,691,692"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
- <method name="getType()" value="7000,19000,667,670,8500"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
- <method name="getType()" value="2001,5001,5002,6001,8001,8002,9001,9002,10001,10002,11001,11002,12001,12002,13001,13002,14001,14002,15001,15002,16001,16002,17001,17002,18001,18002,6666,6668,6669"/>
- </object>
- <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
- <method name="getType()" value="3002,2002,6002"/>
- </object>
- <context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
- </editpartProvider>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
+ <?gmfgen generated="true"?>
+ <editpartProvider class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLEditPartProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.notation.Diagram" id="generated-diagram">
+ <method name="getType()" value="PapyrusUMLStateMachineDiagram"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
+ <method name="getType()" value="2000,3000,5000,6000,8000,9000,10000,11000,12000,13000,14000,15000,16000,17000,18000,666,668,680,690,691,692"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
+ <method name="getType()" value="7000,19000,667,670,8500"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
+ <method name="getType()" value="2001,5001,5002,6001,19003,8001,8002,9001,9002,10001,10002,11001,11002,12001,12002,13001,13002,14001,14002,15001,15002,16001,16002,17001,17002,18001,18002,6666,6668,6669"/>
+ </object>
+ <object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
+ <method name="getType()" value="3002,2002,6002"/>
+ </object>
+ <context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
+ </editpartProvider>
+ </extension>
- <extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
- <?gmfgen generated="true"?>
- <IconProvider class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLIconProvider">
- <Priority name="Low"/>
- </IconProvider>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
+ <?gmfgen generated="true"?>
+ <IconProvider class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLIconProvider">
+ <Priority name="Low"/>
+ </IconProvider>
+ </extension>
- <extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
- <?gmfgen generated="true"?>
- <ParserProvider class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLParserProvider">
- <Priority name="Lowest"/>
- </ParserProvider>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
+ <?gmfgen generated="true"?>
+ <ParserProvider class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLParserProvider">
+ <Priority name="Lowest"/>
+ </ParserProvider>
+ </extension>
- <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
- <?gmfgen generated="true"?>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Package_1000"
- name="%metatype.name.Package_1000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Package"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PackageEditHelper">
- <param name="semanticHint" value="1000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.StateMachine_2000"
- name="%metatype.name.StateMachine_2000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="StateMachine"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.StateMachineEditHelper">
- <param name="semanticHint" value="2000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Region_3000"
- name="%metatype.name.Region_3000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Region"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.RegionEditHelper">
- <param name="semanticHint" value="3000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.FinalState_5000"
- name="%metatype.name.FinalState_5000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="FinalState"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.FinalStateEditHelper">
- <param name="semanticHint" value="5000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.State_6000"
- name="%metatype.name.State_6000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="State"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.StateEditHelper">
- <param name="semanticHint" value="6000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_8000"
- name="%metatype.name.Pseudostate_8000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Pseudostate"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
- <param name="semanticHint" value="8000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_9000"
- name="%metatype.name.Pseudostate_9000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Pseudostate"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
- <param name="semanticHint" value="9000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_10000"
- name="%metatype.name.Pseudostate_10000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Pseudostate"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
- <param name="semanticHint" value="10000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_11000"
- name="%metatype.name.Pseudostate_11000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Pseudostate"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
- <param name="semanticHint" value="11000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_12000"
- name="%metatype.name.Pseudostate_12000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Pseudostate"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
- <param name="semanticHint" value="12000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_13000"
- name="%metatype.name.Pseudostate_13000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Pseudostate"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
- <param name="semanticHint" value="13000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_14000"
- name="%metatype.name.Pseudostate_14000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Pseudostate"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
- <param name="semanticHint" value="14000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_15000"
- name="%metatype.name.Pseudostate_15000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Pseudostate"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
- <param name="semanticHint" value="15000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_16000"
- name="%metatype.name.Pseudostate_16000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Pseudostate"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
- <param name="semanticHint" value="16000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_17000"
- name="%metatype.name.Pseudostate_17000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Pseudostate"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
- <param name="semanticHint" value="17000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.ConnectionPointReference_18000"
- name="%metatype.name.ConnectionPointReference_18000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ConnectionPointReference"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.ConnectionPointReferenceEditHelper">
- <param name="semanticHint" value="18000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.StateMachineComment"
- name="%metatype.name.Comment_666"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Comment"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.CommentEditHelper">
- <param name="semanticHint" value="666"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Constraint_668"
- name="%metatype.name.Constraint_668"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Constraint"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.ConstraintEditHelper">
- <param name="semanticHint" value="668"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.statemachine.InternalTransition_680"
- name="%metatype.name.Transition_680"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.statemachine.Transition_7000"/>
- <param name="semanticHint" value="680"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.EntryStateBehavior_690"
- name="%metatype.name.Behavior_690"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Behavior"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.EntryStateBehaviorEditHelper">
- <param name="semanticHint" value="690"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.DoActivityStateBehavior_691"
- name="%metatype.name.Behavior_691"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Behavior"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.DoActivityStateBehaviorEditHelper">
- <param name="semanticHint" value="691"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.ExitStateBehavior_692"
- name="%metatype.name.Behavior_692"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Behavior"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.ExitStateBehaviorEditHelper">
- <param name="semanticHint" value="692"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Transition_7000"
- name="%metatype.name.Transition_7000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Transition"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.TransitionEditHelper">
- <param name="semanticHint" value="7000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.statemachine.Generalization_19000"
- name="%metatype.name.Generalization_19000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Generalization"
- edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.GeneralizationEditHelper">
- <param name="semanticHint" value="19000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.statemachine.CommentAnnotatedElement_667"
- name="%metatype.name.CommentAnnotatedElement_667"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="667"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.statemachine.ConstraintConstrainedElement_670"
- name="%metatype.name.ConstraintConstrainedElement_670"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="670"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.statemachine.ConstraintContext_8500"
- name="%metatype.name.ConstraintContext_8500"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="8500"/>
- </specializationType>
- </metamodel>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
+ <?gmfgen generated="true"?>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Package_1000"
+ name="%metatype.name.Package_1000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Package"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PackageEditHelper">
+ <param name="semanticHint" value="1000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.StateMachine_2000"
+ name="%metatype.name.StateMachine_2000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="StateMachine"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.StateMachineEditHelper">
+ <param name="semanticHint" value="2000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Region_3000"
+ name="%metatype.name.Region_3000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Region"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.RegionEditHelper">
+ <param name="semanticHint" value="3000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.FinalState_5000"
+ name="%metatype.name.FinalState_5000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="FinalState"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.FinalStateEditHelper">
+ <param name="semanticHint" value="5000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.State_6000"
+ name="%metatype.name.State_6000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="State"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.StateEditHelper">
+ <param name="semanticHint" value="6000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_8000"
+ name="%metatype.name.Pseudostate_8000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Pseudostate"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
+ <param name="semanticHint" value="8000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_9000"
+ name="%metatype.name.Pseudostate_9000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Pseudostate"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
+ <param name="semanticHint" value="9000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_10000"
+ name="%metatype.name.Pseudostate_10000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Pseudostate"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
+ <param name="semanticHint" value="10000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_11000"
+ name="%metatype.name.Pseudostate_11000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Pseudostate"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
+ <param name="semanticHint" value="11000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_12000"
+ name="%metatype.name.Pseudostate_12000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Pseudostate"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
+ <param name="semanticHint" value="12000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_13000"
+ name="%metatype.name.Pseudostate_13000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Pseudostate"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
+ <param name="semanticHint" value="13000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_14000"
+ name="%metatype.name.Pseudostate_14000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Pseudostate"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
+ <param name="semanticHint" value="14000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_15000"
+ name="%metatype.name.Pseudostate_15000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Pseudostate"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
+ <param name="semanticHint" value="15000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_16000"
+ name="%metatype.name.Pseudostate_16000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Pseudostate"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
+ <param name="semanticHint" value="16000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_17000"
+ name="%metatype.name.Pseudostate_17000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Pseudostate"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.PseudostateEditHelper">
+ <param name="semanticHint" value="17000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.ConnectionPointReference_18000"
+ name="%metatype.name.ConnectionPointReference_18000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="ConnectionPointReference"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.ConnectionPointReferenceEditHelper">
+ <param name="semanticHint" value="18000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.StateMachineComment"
+ name="%metatype.name.Comment_666"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Comment"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.CommentEditHelper">
+ <param name="semanticHint" value="666"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Constraint_668"
+ name="%metatype.name.Constraint_668"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Constraint"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.ConstraintEditHelper">
+ <param name="semanticHint" value="668"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.InternalTransition_680"
+ name="%metatype.name.Transition_680"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.statemachine.Transition_7000"/>
+ <param name="semanticHint" value="680"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.EntryStateBehavior_690"
+ name="%metatype.name.Behavior_690"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Behavior"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.EntryStateBehaviorEditHelper">
+ <param name="semanticHint" value="690"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.DoActivityStateBehavior_691"
+ name="%metatype.name.Behavior_691"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Behavior"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.DoActivityStateBehaviorEditHelper">
+ <param name="semanticHint" value="691"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.ExitStateBehavior_692"
+ name="%metatype.name.Behavior_692"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Behavior"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.ExitStateBehaviorEditHelper">
+ <param name="semanticHint" value="692"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Transition_7000"
+ name="%metatype.name.Transition_7000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Transition"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.TransitionEditHelper">
+ <param name="semanticHint" value="7000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.Generalization_19000"
+ name="%metatype.name.Generalization_19000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Generalization"
+ edithelper="org.eclipse.papyrus.uml.diagram.statemachine.edit.helpers.GeneralizationEditHelper">
+ <param name="semanticHint" value="19000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.CommentAnnotatedElement_667"
+ name="%metatype.name.CommentAnnotatedElement_667"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="667"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.ConstraintConstrainedElement_670"
+ name="%metatype.name.ConstraintConstrainedElement_670"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="670"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.statemachine.ConstraintContext_8500"
+ name="%metatype.name.ConstraintContext_8500"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="8500"/>
+ </specializationType>
+ </metamodel>
+ </extension>
- <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
- <?gmfgen generated="true"?>
- <clientContext id="org.eclipse.papyrus.uml.diagram.statemachine.TypeContext">
- <enablement>
- <test
- property="org.eclipse.gmf.runtime.emf.core.editingDomain"
- value="org.eclipse.papyrus.uml.diagram.statemachine.EditingDomain"/>
- </enablement>
- </clientContext>
- <binding context="org.eclipse.papyrus.uml.diagram.statemachine.TypeContext">
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Package_1000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.StateMachine_2000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Region_3000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.FinalState_5000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.State_6000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_8000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_9000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_10000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_11000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_12000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_13000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_14000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_15000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_16000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_17000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.ConnectionPointReference_18000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.StateMachineComment"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Constraint_668"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.InternalTransition_680"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.EntryStateBehavior_690"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.DoActivityStateBehavior_691"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.ExitStateBehavior_692"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Transition_7000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Generalization_19000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.CommentAnnotatedElement_667"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.ConstraintConstrainedElement_670"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.ConstraintContext_8500"/>
- <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
- </binding>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
+ <?gmfgen generated="true"?>
+ <clientContext id="org.eclipse.papyrus.uml.diagram.statemachine.TypeContext">
+ <enablement>
+ <test
+ property="org.eclipse.gmf.runtime.emf.core.editingDomain"
+ value="org.eclipse.papyrus.uml.diagram.statemachine.EditingDomain"/>
+ </enablement>
+ </clientContext>
+ <binding context="org.eclipse.papyrus.uml.diagram.statemachine.TypeContext">
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Package_1000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.StateMachine_2000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Region_3000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.FinalState_5000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.State_6000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_8000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_9000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_10000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_11000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_12000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_13000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_14000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_15000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_16000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Pseudostate_17000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.ConnectionPointReference_18000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.StateMachineComment"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Constraint_668"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.InternalTransition_680"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.EntryStateBehavior_690"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.DoActivityStateBehavior_691"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.ExitStateBehavior_692"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Transition_7000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.Generalization_19000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.CommentAnnotatedElement_667"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.ConstraintConstrainedElement_670"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.statemachine.ConstraintContext_8500"/>
+ <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
+ </binding>
+ </extension>
- <extension point="org.eclipse.ui.menus" id="context-menus">
- <?gmfgen generated="true"?>
- <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
- </menuContribution>
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
- </menuContribution -->
- <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
- <command commandId="org.eclipse.papyrus.uml.diagram.statemachine.LoadResourceAction">
- <visibleWhen>
- <and>
- <with variable="activePartId"><equals value="org.eclipse.papyrus.uml.diagram.statemachine.part.UMLDiagramEditorID"/></with>
- <with variable="selection"><iterate ifEmpty="false">
- <instanceof value="org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PackageEditPart"/>
- </iterate></with>
- </and>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
+ <extension point="org.eclipse.ui.menus" id="context-menus">
+ <?gmfgen generated="true"?>
+ <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
+ </menuContribution>
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
+ </menuContribution -->
+ <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
+ <command commandId="org.eclipse.papyrus.uml.diagram.statemachine.LoadResourceAction">
+ <visibleWhen>
+ <and>
+ <with variable="activePartId"><equals value="org.eclipse.papyrus.uml.diagram.statemachine.part.UMLDiagramEditorID"/></with>
+ <with variable="selection"><iterate ifEmpty="false">
+ <instanceof value="org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PackageEditPart"/>
+ </iterate></with>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
- <extension point="org.eclipse.ui.commands" id="menu-commands">
- <?gmfgen generated="true"?>
- <category id="org.eclipse.papyrus.uml.diagram.statemachine.part.UMLDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
- <command id="org.eclipse.papyrus.uml.diagram.statemachine.LoadResourceAction"
- name="Load Resource"
- categoryId="org.eclipse.papyrus.uml.diagram.statemachine.part.UMLDiagramEditorID"
- defaultHandler="org.eclipse.papyrus.uml.diagram.statemachine.part.LoadResourceAction"/>
- </extension>
+ <extension point="org.eclipse.ui.commands" id="menu-commands">
+ <?gmfgen generated="true"?>
+ <category id="org.eclipse.papyrus.uml.diagram.statemachine.part.UMLDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
+ <command id="org.eclipse.papyrus.uml.diagram.statemachine.LoadResourceAction"
+ name="Load Resource"
+ categoryId="org.eclipse.papyrus.uml.diagram.statemachine.part.UMLDiagramEditorID"
+ defaultHandler="org.eclipse.papyrus.uml.diagram.statemachine.part.LoadResourceAction"/>
+ </extension>
<!-- Diagram creation command and handler -->
<extension point="org.eclipse.ui.commands">
@@ -623,9 +623,9 @@
-<extension point="org.eclipse.ui.handlers" id="menu-handlers">
- <?gmfgen generated="true"?>
- </extension>
+<extension point="org.eclipse.ui.handlers" id="menu-handlers">
+ <?gmfgen generated="true"?>
+ </extension>
<extension
id="ui-context"
point="org.eclipse.ui.contexts">
@@ -636,51 +636,51 @@
parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
</context>
</extension>
-<extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
- <?gmfgen generated="true"?>
- <decoratorProvider class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLValidationDecoratorProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
- <context decoratorTargets="PRIMARY_VIEW"/>
- </decoratorProvider>
- </extension>
-<extension point="org.eclipse.emf.validation.constraintProviders">
- <?gmfgen generated="true"?>
- <category id="org.eclipse.uml2.uml.util.UMLValidator.validateInternalTransition" mandatory="false" name="validateInternalTransition">
- <![CDATA[Validate internal transition]]>
- </category>
- <constraintProvider cache="true">
- <package namespaceUri="http://www.eclipse.org/uml2/5.0.0/UML"/>
- <constraints categories="org.eclipse.uml2.uml.util.UMLValidator.validateInternalTransition">
- <constraint id="org.eclipse.uml2.uml.util.UMLValidator.validateInternalTransition_sameTargetAndSrouce"
- lang="OCL"
- name="validateInternalTransitionEnd"
- mode="Live"
- severity="ERROR" statusCode="200">
- <![CDATA[(kind = TransitionKind::internal) implies (source.oclIsKindOf (State) and source = target)]]>
- <description><![CDATA[Validate that internal transition has the same state for source and target]]></description>
- <message><![CDATA[Validate that internal transition has the same state for source and target]]></message>
- <target class="uml.Transition"/>
- </constraint>
- </constraints>
- </constraintProvider>
- </extension>
+<extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
+ <?gmfgen generated="true"?>
+ <decoratorProvider class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLValidationDecoratorProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
+ <context decoratorTargets="PRIMARY_VIEW"/>
+ </decoratorProvider>
+ </extension>
+<extension point="org.eclipse.emf.validation.constraintProviders">
+ <?gmfgen generated="true"?>
+ <category id="org.eclipse.uml2.uml.util.UMLValidator.validateInternalTransition" mandatory="false" name="validateInternalTransition">
+ <![CDATA[Validate internal transition]]>
+ </category>
+ <constraintProvider cache="true">
+ <package namespaceUri="http://www.eclipse.org/uml2/5.0.0/UML"/>
+ <constraints categories="org.eclipse.uml2.uml.util.UMLValidator.validateInternalTransition">
+ <constraint id="org.eclipse.uml2.uml.util.UMLValidator.validateInternalTransition_sameTargetAndSrouce"
+ lang="OCL"
+ name="validateInternalTransitionEnd"
+ mode="Live"
+ severity="ERROR" statusCode="200">
+ <![CDATA[(kind = TransitionKind::internal) implies (source.oclIsKindOf (State) and source = target)]]>
+ <description><![CDATA[Validate that internal transition has the same state for source and target]]></description>
+ <message><![CDATA[Validate that internal transition has the same state for source and target]]></message>
+ <target class="uml.Transition"/>
+ </constraint>
+ </constraints>
+ </constraintProvider>
+ </extension>
-<extension point="org.eclipse.emf.validation.constraintBindings">
- <?gmfgen generated="true"?>
- <clientContext default="false" id="org.eclipse.papyrus.uml.diagram.statemachineDefaultCtx">
- <selector class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLValidationProvider$DefaultCtx"/>
- </clientContext>
- <binding context="org.eclipse.papyrus.uml.diagram.statemachineDefaultCtx">
- <constraint ref="org.eclipse.papyrus.uml.diagram.statemachine.org.eclipse.uml2.uml.util.UMLValidator.validateInternalTransition_sameTargetAndSrouce"/>
- </binding>
+<extension point="org.eclipse.emf.validation.constraintBindings">
+ <?gmfgen generated="true"?>
+ <clientContext default="false" id="org.eclipse.papyrus.uml.diagram.statemachineDefaultCtx">
+ <selector class="org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLValidationProvider$DefaultCtx"/>
+ </clientContext>
+ <binding context="org.eclipse.papyrus.uml.diagram.statemachineDefaultCtx">
+ <constraint ref="org.eclipse.papyrus.uml.diagram.statemachine.org.eclipse.uml2.uml.util.UMLValidator.validateInternalTransition_sameTargetAndSrouce"/>
+ </binding>
+
+ </extension>
- </extension>
-
-<extension point="org.eclipse.emf.validation.ui.UIRegisteredClientContext">
- <?gmfgen generated="true"?>
- <clientContext id="org.eclipse.papyrus.uml.diagram.statemachineDefaultCtx"/>
- </extension>
+<extension point="org.eclipse.emf.validation.ui.UIRegisteredClientContext">
+ <?gmfgen generated="true"?>
+ <clientContext id="org.eclipse.papyrus.uml.diagram.statemachineDefaultCtx"/>
+ </extension>
<extension
point="org.eclipse.emf.transaction.listeners">
@@ -750,335 +750,335 @@
-<extension
- id="PapyrusUMLStateMachineDiagram.palettedefinition"
- name="PapyrusUMLStateMachineDiagram Predefined Entries"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Lowest"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.statemachine.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
-
- <entry
- defineOnly="true"
- description="Region"
- id="createRegionCreationTool"
- kind="tool"
- label="Region"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Region.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Region.gif">
- </entry>
- <entry
- defineOnly="true"
- description="State"
- id="createStateCreationTool"
- kind="tool"
- label="State"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/State.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/State.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Initial"
- id="createInitialCreationTool"
- kind="tool"
- label="Initial"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_initial.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_initial.gif">
- </entry>
- <entry
- defineOnly="true"
- description="FinalState"
- id="createFinalStateCreationTool"
- kind="tool"
- label="FinalState"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FinalState.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FinalState.gif">
- </entry>
- <entry
- defineOnly="true"
- description="ShallowHistory"
- id="createShallowHistoryCreationTool"
- kind="tool"
- label="ShallowHistory"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_shallowHistory.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_shallowHistory.gif">
- </entry>
- <entry
- defineOnly="true"
- description="DeepHistory"
- id="createDeepHistoryCreationTool"
- kind="tool"
- label="DeepHistory"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_deepHistory.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_deepHistory.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Fork"
- id="createForkCreationTool"
- kind="tool"
- label="Fork"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_fork.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_fork.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Join"
- id="createJoinCreationTool"
- kind="tool"
- label="Join"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_join.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_join.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Choice"
- id="createChoiceCreationTool"
- kind="tool"
- label="Choice"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_choice.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_choice.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Junction"
- id="createJunctionCreationTool"
- kind="tool"
- label="Junction"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_junction.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_junction.gif">
- </entry>
- <entry
- defineOnly="true"
- description="EntryPoint"
- id="createEntryPointCreationTool"
- kind="tool"
- label="EntryPoint"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_entryPoint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_entryPoint.gif">
- </entry>
- <entry
- defineOnly="true"
- description="ExitPoint"
- id="createExitPointCreationTool"
- kind="tool"
- label="ExitPoint"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_exitPoint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_exitPoint.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Terminate"
- id="createTerminateCreationTool"
- kind="tool"
- label="Terminate"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_terminate.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_terminate.gif">
- </entry>
- <entry
- defineOnly="true"
- description="ConnectionPointReference"
- id="createConnectionPointReferenceCreationTool"
- kind="tool"
- label="ConnectionPointReference"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectionPointReference.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectionPointReference.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Comment"
- id="createStateMachineCommentCreationTool"
- kind="tool"
- label="Comment"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Constraint"
- id="createConstraintCreationTool"
- kind="tool"
- label="Constraint"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Transition"
- id="createTransitionCreationTool"
- kind="tool"
- label="Transition"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Transition_local.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Transition_local.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Creation of a link for comment, constraint"
- id="createCommentlinkCreationTool"
- kind="tool"
- label="Link"
- large_icon="icons/obj16/Link.gif"
- path=""
- small_icon="icons/obj16/Link.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Creation of a context link for a Constraint"
- id="createContextLink3CreationTool"
- kind="tool"
- label="ContextLink"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
- </entry>
-
- </contribution>
- </paletteProvider>
-
- </extension>
+<extension
+ id="PapyrusUMLStateMachineDiagram.palettedefinition"
+ name="PapyrusUMLStateMachineDiagram Predefined Entries"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Lowest"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.statemachine.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+
+ <entry
+ defineOnly="true"
+ description="Region"
+ id="createRegionCreationTool"
+ kind="tool"
+ label="Region"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Region.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Region.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="State"
+ id="createStateCreationTool"
+ kind="tool"
+ label="State"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/State.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/State.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Initial"
+ id="createInitialCreationTool"
+ kind="tool"
+ label="Initial"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_initial.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_initial.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="FinalState"
+ id="createFinalStateCreationTool"
+ kind="tool"
+ label="FinalState"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FinalState.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/FinalState.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="ShallowHistory"
+ id="createShallowHistoryCreationTool"
+ kind="tool"
+ label="ShallowHistory"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_shallowHistory.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_shallowHistory.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="DeepHistory"
+ id="createDeepHistoryCreationTool"
+ kind="tool"
+ label="DeepHistory"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_deepHistory.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_deepHistory.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Fork"
+ id="createForkCreationTool"
+ kind="tool"
+ label="Fork"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_fork.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_fork.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Join"
+ id="createJoinCreationTool"
+ kind="tool"
+ label="Join"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_join.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_join.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Choice"
+ id="createChoiceCreationTool"
+ kind="tool"
+ label="Choice"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_choice.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_choice.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Junction"
+ id="createJunctionCreationTool"
+ kind="tool"
+ label="Junction"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_junction.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_junction.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="EntryPoint"
+ id="createEntryPointCreationTool"
+ kind="tool"
+ label="EntryPoint"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_entryPoint.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_entryPoint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="ExitPoint"
+ id="createExitPointCreationTool"
+ kind="tool"
+ label="ExitPoint"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_exitPoint.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_exitPoint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Terminate"
+ id="createTerminateCreationTool"
+ kind="tool"
+ label="Terminate"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_terminate.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Pseudostate_terminate.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="ConnectionPointReference"
+ id="createConnectionPointReferenceCreationTool"
+ kind="tool"
+ label="ConnectionPointReference"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectionPointReference.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ConnectionPointReference.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Comment"
+ id="createStateMachineCommentCreationTool"
+ kind="tool"
+ label="Comment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Constraint"
+ id="createConstraintCreationTool"
+ kind="tool"
+ label="Constraint"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Transition"
+ id="createTransitionCreationTool"
+ kind="tool"
+ label="Transition"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Transition_local.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Transition_local.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Creation of a link for comment, constraint"
+ id="createCommentlinkCreationTool"
+ kind="tool"
+ label="Link"
+ large_icon="icons/obj16/Link.gif"
+ path=""
+ small_icon="icons/obj16/Link.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Creation of a context link for a Constraint"
+ id="createContextLink3CreationTool"
+ kind="tool"
+ label="ContextLink"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+ </entry>
+
+ </contribution>
+ </paletteProvider>
+
+ </extension>
-<extension
- id="PapyrusUMLStateMachineDiagram.standard"
- name="PapyrusUMLStateMachineDiagram Standard Palette"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Low"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.statemachine.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
-
- <entry
- description=""
- id="createNodesGroup"
- kind="drawer"
- label="Nodes"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
- <predefinedEntry
- id="createRegionCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createStateCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createInitialCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createFinalStateCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createShallowHistoryCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createDeepHistoryCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createForkCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createJoinCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createChoiceCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createJunctionCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createEntryPointCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createExitPointCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createTerminateCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createConnectionPointReferenceCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createStateMachineCommentCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createConstraintCreationTool"
- path="/createNodesGroup">
- </predefinedEntry>
- <entry
- description=""
- id="createEdgesGroup"
- kind="drawer"
- label="Edges"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
- <predefinedEntry
- id="createTransitionCreationTool"
- path="/createEdgesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createCommentlinkCreationTool"
- path="/createEdgesGroup">
- </predefinedEntry>
- <predefinedEntry
- id="createContextLink3CreationTool"
- path="/createEdgesGroup">
- </predefinedEntry>
- </contribution>
- <editor id="org.eclipse.papyrus.uml.diagram.statemachine"/>
- </paletteProvider>
-
-</extension>
+<extension
+ id="PapyrusUMLStateMachineDiagram.standard"
+ name="PapyrusUMLStateMachineDiagram Standard Palette"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Low"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.statemachine.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+
+ <entry
+ description=""
+ id="createNodesGroup"
+ kind="drawer"
+ label="Nodes"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="createRegionCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createStateCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createInitialCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createFinalStateCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createShallowHistoryCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createDeepHistoryCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createForkCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createJoinCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createChoiceCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createJunctionCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createEntryPointCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createExitPointCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createTerminateCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createConnectionPointReferenceCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createStateMachineCommentCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createConstraintCreationTool"
+ path="/createNodesGroup">
+ </predefinedEntry>
+ <entry
+ description=""
+ id="createEdgesGroup"
+ kind="drawer"
+ label="Edges"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="createTransitionCreationTool"
+ path="/createEdgesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createCommentlinkCreationTool"
+ path="/createEdgesGroup">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createContextLink3CreationTool"
+ path="/createEdgesGroup">
+ </predefinedEntry>
+ </contribution>
+ <editor id="org.eclipse.papyrus.uml.diagram.statemachine"/>
+ </paletteProvider>
+
+</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentBodyEditPart.java
index c6ab9635f4f..236ffa3276d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentBodyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentBodyEditPart.java
@@ -847,7 +847,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentEditPart.java
index fd51b5d6012..9c57cb702d1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentEditPart.java
@@ -22,12 +22,12 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.editpolicies.PapyrusReflowableShapeEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
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;
@@ -184,7 +184,7 @@ public class CommentEditPart extends NodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceEditPart.java
index 4a4450b899f..2c8a42b8914 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceEditPart.java
@@ -33,12 +33,12 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPo
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractBorderEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -197,7 +197,7 @@ public class ConnectionPointReferenceEditPart extends AbstractBorderEditPart {
* @generated
*/
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(4, 4);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(4, 4);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceNameEditPart.java
index 480376573fe..9e75fc07f5a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceNameEditPart.java
@@ -60,6 +60,7 @@ 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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
@@ -145,6 +146,7 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceStereotypeEditPart.java
index 62b63da8dee..ba458a16262 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceStereotypeEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +149,7 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintBodyEditPart.java
index 6a282993e37..4332ff87c3b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintBodyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintBodyEditPart.java
@@ -847,7 +847,7 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintEditPart.java
index bc5fe898974..3db53a82a9e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintEditPart.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -105,8 +105,9 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
}
/**
- *Papyrus codeGen
- *@generated
+ * Papyrus codeGen
+ *
+ * @generated
**/
@Override
protected void handleNotificationEvent(Notification event) {
@@ -197,7 +198,7 @@ public class ConstraintEditPart extends AbstractConstraintEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintNameLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintNameLabelEditPart.java
index 1a0dc8dced4..a442bfed130 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintNameLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintNameLabelEditPart.java
@@ -864,7 +864,7 @@ public class ConstraintNameLabelEditPart extends PapyrusCompartmentEditPart impl
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ContextLinkAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ContextLinkAppliedStereotypeEditPart.java
index bf2755d191b..71b690ee149 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ContextLinkAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ContextLinkAppliedStereotypeEditPart.java
@@ -1,816 +1,824 @@
-/**
- * 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.statemachine.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.NoSemanticParserEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.statemachine.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 ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 8501;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ContextLinkAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public ContextLinkAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NoSemanticParserEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.ConstraintContext_8500, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ContextLinkAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.statemachine.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.NoSemanticParserEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8501;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ContextLinkAppliedStereotypeEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ContextLinkAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new NoSemanticParserEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.ConstraintContext_8500, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ContextLinkAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateEditPart.java
index 34776d2e0b6..94b46b08825 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateEditPart.java
@@ -29,17 +29,19 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.FinalStateFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.FinalStateItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -47,7 +49,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class FinalStateEditPart extends UMLNodeEditPart {
+public class FinalStateEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -80,6 +82,7 @@ public class FinalStateEditPart extends UMLNodeEditPart {
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new FinalStateItemSemanticEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -94,7 +97,7 @@ public class FinalStateEditPart extends UMLNodeEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case FinalStateNameEditPart.VISUAL_ID:
+ case FinalStateFloatingLabelEditPart.VISUAL_ID:
case FinalStateStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -156,7 +159,7 @@ public class FinalStateEditPart extends UMLNodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new FinalStateFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -165,8 +168,8 @@ public class FinalStateEditPart extends UMLNodeEditPart {
* @generated
*/
@Override
- public FinalStateFigure getPrimaryShape() {
- return (FinalStateFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -174,8 +177,8 @@ public class FinalStateEditPart extends UMLNodeEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof FinalStateNameEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ if (borderItemEditPart instanceof FinalStateFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof FinalStateStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -191,7 +194,7 @@ public class FinalStateEditPart extends UMLNodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(16, 16);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
@@ -266,6 +269,6 @@ public class FinalStateEditPart extends UMLNodeEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(FinalStateNameEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(FinalStateFloatingLabelEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateFloatingLabelEditPart.java
new file mode 100644
index 00000000000..3ad36614885
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.statemachine.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 FinalStateFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5001;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public FinalStateFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.FinalState_5000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateStereotypeEditPart.java
index 0a901bde7cd..6aad787a1c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateStereotypeEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +149,7 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/GeneralizationStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/GeneralizationStereotypeEditPart.java
index fd5f401e31b..21fadca3d36 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/GeneralizationStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/GeneralizationStereotypeEditPart.java
@@ -1,820 +1,822 @@
-/**
- * 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.statemachine.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.statemachine.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 GeneralizationStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 19002;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.GeneralizationStereotypeEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public GeneralizationStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Generalization_19000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.GeneralizationStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.statemachine.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 GeneralizationStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 19002;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.GeneralizationStereotypeEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public GeneralizationStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Generalization_19000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.GeneralizationStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PackageEditPart.java
index 88d66530f68..533607dbff3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PackageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PackageEditPart.java
@@ -56,8 +56,8 @@ public class PackageEditPart extends PapyrusDiagramEditPart {
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new PackageItemSemanticEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PackageCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PackageCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomPackageCreationEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceEditPart.java
index ef27a3f117d..c686784117e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceEditPart.java
@@ -29,19 +29,21 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateChoiceFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PseudostateChoiceItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -49,7 +51,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class PseudostateChoiceEditPart extends UMLNodeEditPart {
+public class PseudostateChoiceEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -83,6 +85,7 @@ public class PseudostateChoiceEditPart extends UMLNodeEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -97,7 +100,7 @@ public class PseudostateChoiceEditPart extends UMLNodeEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case PseudostateChoiceNameEditPart.VISUAL_ID:
+ case PseudostateChoiceFloatingLabelEditPart.VISUAL_ID:
case PseudostateChoiceStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -159,7 +162,7 @@ public class PseudostateChoiceEditPart extends UMLNodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new PseudostateChoiceFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -168,8 +171,8 @@ public class PseudostateChoiceEditPart extends UMLNodeEditPart {
* @generated
*/
@Override
- public PseudostateChoiceFigure getPrimaryShape() {
- return (PseudostateChoiceFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -177,8 +180,8 @@ public class PseudostateChoiceEditPart extends UMLNodeEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof PseudostateChoiceNameEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ if (borderItemEditPart instanceof PseudostateChoiceFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof PseudostateChoiceStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -194,7 +197,7 @@ public class PseudostateChoiceEditPart extends UMLNodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(4, 4);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(60, 20);
return result;
}
@@ -269,6 +272,6 @@ public class PseudostateChoiceEditPart extends UMLNodeEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateChoiceNameEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateChoiceFloatingLabelEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceFloatingLabelEditPart.java
new file mode 100644
index 00000000000..1db52217301
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.statemachine.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 PseudostateChoiceFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 11001;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public PseudostateChoiceFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Pseudostate_11000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceStereotypeEditPart.java
index 58bd4a22020..4d52d211b32 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceStereotypeEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +149,7 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryEditPart.java
index f19b0dc2bf6..701d80557bb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryEditPart.java
@@ -29,19 +29,21 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateDeepHistoryFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PseudostateDeepHistoryItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -49,7 +51,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class PseudostateDeepHistoryEditPart extends UMLNodeEditPart {
+public class PseudostateDeepHistoryEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -83,6 +85,7 @@ public class PseudostateDeepHistoryEditPart extends UMLNodeEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -97,7 +100,7 @@ public class PseudostateDeepHistoryEditPart extends UMLNodeEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case PseudostateDeepHistoryNameEditPart.VISUAL_ID:
+ case PseudostateDeepHistoryFloatingLabelEditPart.VISUAL_ID:
case PseudostateDeepHistoryStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -159,7 +162,7 @@ public class PseudostateDeepHistoryEditPart extends UMLNodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new PseudostateDeepHistoryFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -168,8 +171,8 @@ public class PseudostateDeepHistoryEditPart extends UMLNodeEditPart {
* @generated
*/
@Override
- public PseudostateDeepHistoryFigure getPrimaryShape() {
- return (PseudostateDeepHistoryFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -177,8 +180,8 @@ public class PseudostateDeepHistoryEditPart extends UMLNodeEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof PseudostateDeepHistoryNameEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ if (borderItemEditPart instanceof PseudostateDeepHistoryFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof PseudostateDeepHistoryStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -194,7 +197,7 @@ public class PseudostateDeepHistoryEditPart extends UMLNodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(4, 4);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
@@ -269,6 +272,6 @@ public class PseudostateDeepHistoryEditPart extends UMLNodeEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateDeepHistoryNameEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateDeepHistoryFloatingLabelEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryFloatingLabelEditPart.java
new file mode 100644
index 00000000000..25a2aa9923f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.statemachine.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 PseudostateDeepHistoryFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 14001;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public PseudostateDeepHistoryFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Pseudostate_14000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryStereotypeEditPart.java
index f9cdeeafa45..8c466ec8c4b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryStereotypeEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +149,7 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointEditPart.java
index ef9187f9e15..d6d5664f307 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointEditPart.java
@@ -30,18 +30,20 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractBorderEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart;
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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateEntryPointFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PseudostateEntryPointItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -49,7 +51,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class PseudostateEntryPointEditPart extends AbstractBorderEditPart {
+public class PseudostateEntryPointEditPart extends RoundedBorderNamedElementEditPart {
/**
* @generated
@@ -84,6 +86,7 @@ public class PseudostateEntryPointEditPart extends AbstractBorderEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -98,7 +101,7 @@ public class PseudostateEntryPointEditPart extends AbstractBorderEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case PseudostateEntryPointNameEditPart.VISUAL_ID:
+ case PseudostateEntryPointFloatingLabelEditPart.VISUAL_ID:
case PseudostateEntryPointStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -159,7 +162,7 @@ public class PseudostateEntryPointEditPart extends AbstractBorderEditPart {
* @generated
*/
protected IFigure createNodeShape() {
- return primaryShape = new PseudostateEntryPointFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -168,8 +171,8 @@ public class PseudostateEntryPointEditPart extends AbstractBorderEditPart {
* @generated
*/
@Override
- public PseudostateEntryPointFigure getPrimaryShape() {
- return (PseudostateEntryPointFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -177,8 +180,8 @@ public class PseudostateEntryPointEditPart extends AbstractBorderEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof PseudostateEntryPointNameEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ if (borderItemEditPart instanceof PseudostateEntryPointFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof PseudostateEntryPointStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -193,7 +196,7 @@ public class PseudostateEntryPointEditPart extends AbstractBorderEditPart {
* @generated
*/
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(4, 4);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
@@ -272,6 +275,6 @@ public class PseudostateEntryPointEditPart extends AbstractBorderEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateEntryPointNameEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateEntryPointFloatingLabelEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointFloatingLabelEditPart.java
new file mode 100644
index 00000000000..9ef862d1390
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.statemachine.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 PseudostateEntryPointFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 16001;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public PseudostateEntryPointFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Pseudostate_16000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointStereotypeEditPart.java
index 6e30c83d9b4..091804571fb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointStereotypeEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +149,7 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointEditPart.java
index b31e232ca96..b198c03b854 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointEditPart.java
@@ -33,17 +33,18 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPo
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractBorderEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedBorderNamedElementEditPart;
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.QualifiedNameDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateExitPointFigure;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PseudostateExitPointItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
@@ -52,7 +53,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class PseudostateExitPointEditPart extends AbstractBorderEditPart {
+public class PseudostateExitPointEditPart extends RoundedBorderNamedElementEditPart {
/**
* @generated
@@ -87,6 +88,7 @@ public class PseudostateExitPointEditPart extends AbstractBorderEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -101,7 +103,7 @@ public class PseudostateExitPointEditPart extends AbstractBorderEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case PseudostateExitPointNameEditPart.VISUAL_ID:
+ case PseudostateExitPointFloatingLabelEditPart.VISUAL_ID:
case PseudostateExitPointStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -184,8 +186,8 @@ public class PseudostateExitPointEditPart extends AbstractBorderEditPart {
BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
locator.setBorderItemOffset(new Dimension(-20, -20));
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof PseudostateExitPointNameEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ } else if (borderItemEditPart instanceof PseudostateExitPointFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else
{
@@ -197,7 +199,7 @@ public class PseudostateExitPointEditPart extends AbstractBorderEditPart {
* @generated
*/
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(4, 4);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
@@ -276,6 +278,6 @@ public class PseudostateExitPointEditPart extends AbstractBorderEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateExitPointNameEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateExitPointFloatingLabelEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointFloatingLabelEditPart.java
new file mode 100644
index 00000000000..b964f9b8914
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.statemachine.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 PseudostateExitPointFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 17001;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public PseudostateExitPointFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Pseudostate_17000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointStereotypeEditPart.java
index aaf6e88f4ee..eb0820f3678 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointStereotypeEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +149,7 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkEditPart.java
index 7e7da9bf271..04057d0d1fe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkEditPart.java
@@ -29,19 +29,21 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateJoinForkFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPseudostateForkJoinResizeEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PseudostateForkItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
@@ -50,7 +52,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class PseudostateForkEditPart extends UMLNodeEditPart {
+public class PseudostateForkEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -85,6 +87,7 @@ public class PseudostateForkEditPart extends UMLNodeEditPart {
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new CustomPseudostateForkJoinResizeEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -161,7 +164,7 @@ public class PseudostateForkEditPart extends UMLNodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new PseudostateJoinForkFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -170,8 +173,8 @@ public class PseudostateForkEditPart extends UMLNodeEditPart {
* @generated
*/
@Override
- public PseudostateJoinForkFigure getPrimaryShape() {
- return (PseudostateJoinForkFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -180,7 +183,7 @@ public class PseudostateForkEditPart extends UMLNodeEditPart {
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
if (borderItemEditPart instanceof PseudostateForkNameEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof PseudostateForkStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -196,7 +199,7 @@ public class PseudostateForkEditPart extends UMLNodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(4, 4);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(10, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkNameEditPart.java
index df4ec6bc5a4..2681eb73ff7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkNameEditPart.java
@@ -59,11 +59,12 @@ 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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
@@ -83,7 +84,7 @@ import org.eclipse.uml2.uml.Feature;
/**
* @generated
*/
-public class PseudostateForkNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+public class PseudostateForkNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -145,6 +146,7 @@ public class PseudostateForkNameEditPart extends PapyrusLabelEditPart implements
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkStereotypeEditPart.java
index d3de346d15d..a0520f01ee8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkStereotypeEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +149,7 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialEditPart.java
index f1c6ada1424..1aff31a43d7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialEditPart.java
@@ -29,19 +29,21 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateInitialFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PseudostateInitialItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -49,7 +51,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class PseudostateInitialEditPart extends UMLNodeEditPart {
+public class PseudostateInitialEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -83,6 +85,7 @@ public class PseudostateInitialEditPart extends UMLNodeEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -97,7 +100,7 @@ public class PseudostateInitialEditPart extends UMLNodeEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case PseudostateInitialNameEditPart.VISUAL_ID:
+ case PseudostateInitialFloatingLabelEditPart.VISUAL_ID:
case PseudostateInitialStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -159,7 +162,7 @@ public class PseudostateInitialEditPart extends UMLNodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new PseudostateInitialFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -168,8 +171,8 @@ public class PseudostateInitialEditPart extends UMLNodeEditPart {
* @generated
*/
@Override
- public PseudostateInitialFigure getPrimaryShape() {
- return (PseudostateInitialFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -177,8 +180,8 @@ public class PseudostateInitialEditPart extends UMLNodeEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof PseudostateInitialNameEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ if (borderItemEditPart instanceof PseudostateInitialFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof PseudostateInitialStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -194,7 +197,7 @@ public class PseudostateInitialEditPart extends UMLNodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(4, 4);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
@@ -269,6 +272,6 @@ public class PseudostateInitialEditPart extends UMLNodeEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateInitialNameEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateInitialFloatingLabelEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialFloatingLabelEditPart.java
new file mode 100644
index 00000000000..56556e1b2c1
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.statemachine.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 PseudostateInitialFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 8001;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public PseudostateInitialFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Pseudostate_8000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialStereotypeEditPart.java
index 4bc3689bb62..440d7339e87 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialStereotypeEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +149,7 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinEditPart.java
index 650d8836d06..9f9f49a34e7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinEditPart.java
@@ -29,19 +29,21 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateJoinForkFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPseudostateForkJoinResizeEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PseudostateJoinItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
@@ -50,7 +52,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class PseudostateJoinEditPart extends UMLNodeEditPart {
+public class PseudostateJoinEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -85,6 +87,7 @@ public class PseudostateJoinEditPart extends UMLNodeEditPart {
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new CustomPseudostateForkJoinResizeEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -99,7 +102,7 @@ public class PseudostateJoinEditPart extends UMLNodeEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case PseudostateJoinNameEditPart.VISUAL_ID:
+ case PseudostateJoinFloatingLabelEditPart.VISUAL_ID:
case PseudostateJoinStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -161,7 +164,7 @@ public class PseudostateJoinEditPart extends UMLNodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new PseudostateJoinForkFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -170,8 +173,8 @@ public class PseudostateJoinEditPart extends UMLNodeEditPart {
* @generated
*/
@Override
- public PseudostateJoinForkFigure getPrimaryShape() {
- return (PseudostateJoinForkFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -179,8 +182,8 @@ public class PseudostateJoinEditPart extends UMLNodeEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof PseudostateJoinNameEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ if (borderItemEditPart instanceof PseudostateJoinFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof PseudostateJoinStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -196,7 +199,7 @@ public class PseudostateJoinEditPart extends UMLNodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(4, 4);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(10, 40);
return result;
}
@@ -271,6 +274,6 @@ public class PseudostateJoinEditPart extends UMLNodeEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateJoinNameEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateJoinFloatingLabelEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinFloatingLabelEditPart.java
new file mode 100644
index 00000000000..f877d0e9bc3
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.statemachine.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 PseudostateJoinFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 9001;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public PseudostateJoinFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Pseudostate_9000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinStereotypeEditPart.java
index 1622c281de2..2793fbb2524 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinStereotypeEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +149,7 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionEditPart.java
index 9fcd00ccf81..cc09d7bdf86 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionEditPart.java
@@ -29,19 +29,21 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateJunctionFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PseudostateJunctionItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -49,7 +51,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class PseudostateJunctionEditPart extends UMLNodeEditPart {
+public class PseudostateJunctionEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -83,6 +85,7 @@ public class PseudostateJunctionEditPart extends UMLNodeEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -97,7 +100,7 @@ public class PseudostateJunctionEditPart extends UMLNodeEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case PseudostateJunctionNameEditPart.VISUAL_ID:
+ case PseudostateJunctionFloatingLabelEditPart.VISUAL_ID:
case PseudostateJunctionStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -159,7 +162,7 @@ public class PseudostateJunctionEditPart extends UMLNodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new PseudostateJunctionFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -168,8 +171,8 @@ public class PseudostateJunctionEditPart extends UMLNodeEditPart {
* @generated
*/
@Override
- public PseudostateJunctionFigure getPrimaryShape() {
- return (PseudostateJunctionFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -177,8 +180,8 @@ public class PseudostateJunctionEditPart extends UMLNodeEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof PseudostateJunctionNameEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ if (borderItemEditPart instanceof PseudostateJunctionFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof PseudostateJunctionStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -194,7 +197,7 @@ public class PseudostateJunctionEditPart extends UMLNodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(4, 4);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(10, 10);
return result;
}
@@ -269,6 +272,6 @@ public class PseudostateJunctionEditPart extends UMLNodeEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateJunctionNameEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateJunctionFloatingLabelEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionFloatingLabelEditPart.java
new file mode 100644
index 00000000000..65d5ac06ef4
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.statemachine.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 PseudostateJunctionFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 12001;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public PseudostateJunctionFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Pseudostate_12000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionStereotypeEditPart.java
index b4ec2279402..2dc1b0590d4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionStereotypeEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +149,7 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryEditPart.java
index 922c2c61fb0..c9cd840ba2b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryEditPart.java
@@ -29,19 +29,21 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateShallowHistoryFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PseudostateShallowHistoryItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -49,7 +51,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class PseudostateShallowHistoryEditPart extends UMLNodeEditPart {
+public class PseudostateShallowHistoryEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -83,6 +85,7 @@ public class PseudostateShallowHistoryEditPart extends UMLNodeEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -97,7 +100,7 @@ public class PseudostateShallowHistoryEditPart extends UMLNodeEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case PseudostateShallowHistoryNameEditPart.VISUAL_ID:
+ case PseudostateShallowHistoryFloatingLabelEditPart.VISUAL_ID:
case PseudostateShallowHistoryStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -159,7 +162,7 @@ public class PseudostateShallowHistoryEditPart extends UMLNodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new PseudostateShallowHistoryFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -168,8 +171,8 @@ public class PseudostateShallowHistoryEditPart extends UMLNodeEditPart {
* @generated
*/
@Override
- public PseudostateShallowHistoryFigure getPrimaryShape() {
- return (PseudostateShallowHistoryFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -177,8 +180,8 @@ public class PseudostateShallowHistoryEditPart extends UMLNodeEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof PseudostateShallowHistoryNameEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ if (borderItemEditPart instanceof PseudostateShallowHistoryFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof PseudostateShallowHistoryStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -194,7 +197,7 @@ public class PseudostateShallowHistoryEditPart extends UMLNodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(4, 4);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
@@ -269,6 +272,6 @@ public class PseudostateShallowHistoryEditPart extends UMLNodeEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateShallowHistoryNameEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateShallowHistoryFloatingLabelEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryFloatingLabelEditPart.java
new file mode 100644
index 00000000000..4ec56a89b42
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.statemachine.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 PseudostateShallowHistoryFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 13001;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public PseudostateShallowHistoryFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Pseudostate_13000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryStereotypeEditPart.java
index 1d9ae8a776f..68e3f2d7cc2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryStereotypeEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +149,7 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateEditPart.java
index eb31b676afc..45c20a91cef 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateEditPart.java
@@ -29,19 +29,21 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
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.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.PseudostateTerminateFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PseudostateTerminateItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
@@ -49,7 +51,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class PseudostateTerminateEditPart extends UMLNodeEditPart {
+public class PseudostateTerminateEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -83,6 +85,7 @@ public class PseudostateTerminateEditPart extends UMLNodeEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -97,7 +100,7 @@ public class PseudostateTerminateEditPart extends UMLNodeEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
- case PseudostateTerminateNameEditPart.VISUAL_ID:
+ case PseudostateTerminateFloatingLabelEditPart.VISUAL_ID:
case PseudostateTerminateStereotypeEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@@ -159,7 +162,7 @@ public class PseudostateTerminateEditPart extends UMLNodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new PseudostateTerminateFigure();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -168,8 +171,8 @@ public class PseudostateTerminateEditPart extends UMLNodeEditPart {
* @generated
*/
@Override
- public PseudostateTerminateFigure getPrimaryShape() {
- return (PseudostateTerminateFigure) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -177,8 +180,8 @@ public class PseudostateTerminateEditPart extends UMLNodeEditPart {
*/
@Override
protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
- if (borderItemEditPart instanceof PseudostateTerminateNameEditPart) {
- IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
+ if (borderItemEditPart instanceof PseudostateTerminateFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else if (borderItemEditPart instanceof PseudostateTerminateStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
@@ -194,7 +197,7 @@ public class PseudostateTerminateEditPart extends UMLNodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(4, 4);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(4, 4);
return result;
}
@@ -269,6 +272,6 @@ public class PseudostateTerminateEditPart extends UMLNodeEditPart {
*/
@Override
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateTerminateNameEditPart.VISUAL_ID));
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(PseudostateTerminateFloatingLabelEditPart.VISUAL_ID));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateFloatingLabelEditPart.java
new file mode 100644
index 00000000000..b4609b56934
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.statemachine.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 PseudostateTerminateFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 15001;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public PseudostateTerminateFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Pseudostate_15000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateStereotypeEditPart.java
index 8f920aaddbe..528b6e4c49e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateStereotypeEditPart.java
@@ -59,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +149,7 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionCompartmentEditPart.java
index 05ab8c6f9d7..9558203d640 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionCompartmentEditPart.java
@@ -82,8 +82,8 @@ public class RegionCompartmentEditPart extends ShapeCompartmentEditPart {
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.RegionCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.RegionCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomRegionCompartmentCreationEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionEditPart.java
index c979b6e0e55..32dfbd5936f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionEditPart.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
@@ -201,7 +201,7 @@ public class RegionEditPart extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateCompartmentEditPart.java
index 79e887817ca..9814401410f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateCompartmentEditPart.java
@@ -27,6 +27,7 @@ import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
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.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateCompartmentCreationEditPolicy;
@@ -81,13 +82,14 @@ public class StateCompartmentEditPart extends ShapeCompartmentEditPart {
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicy.LAYOUT_ROLE, new CustomStateCompartmentXYLayoutEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomStateMachineDiagramDragDropEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomStateCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateEditPart.java
index db564c9d1af..c6b2e643d85 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateEditPart.java
@@ -11,28 +11,37 @@
*/
package org.eclipse.papyrus.uml.diagram.statemachine.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.PositionConstants;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
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.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -40,8 +49,9 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEd
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.locator.PortPositionLocator;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.StateFigure;
-import org.eclipse.papyrus.uml.diagram.statemachine.custom.locators.CustomEntryExitPointPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateLayoutEditPolicy;
@@ -53,7 +63,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class StateEditPart extends NamedElementEditPart {
+public class StateEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -86,8 +96,8 @@ public class StateEditPart extends NamedElementEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StateItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateCanonicalEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
@@ -98,6 +108,7 @@ public class StateEditPart extends NamedElementEditPart {
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomStateCreationEditPolicy());
installEditPolicy(AffixedNodeAlignmentEditPolicy.AFFIXED_CHILD_ALIGNMENT_ROLE, new AffixedNodeAlignmentEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomStateItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -112,6 +123,17 @@ public class StateEditPart extends NamedElementEditPart {
protected EditPolicy createChildEditPolicy(EditPart child) {
View childView = (View) child.getModel();
switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case StateFloatingLabelEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
case PseudostateEntryPointEditPart.VISUAL_ID:
case PseudostateExitPointEditPart.VISUAL_ID:
case ConnectionPointReferenceEditPart.VISUAL_ID:
@@ -144,6 +166,19 @@ public class StateEditPart extends NamedElementEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -185,9 +220,9 @@ public class StateEditPart extends NamedElementEditPart {
- //Papyrus Gencode :Affixed EntryExitPoints ConnectionPointReferences Locator
+ // Papyrus Gencode :Affixed EntryExitPoints ConnectionPointReferences Locator
if (childEditPart instanceof PseudostateEntryPointEditPart) {
- IBorderItemLocator locator = new CustomEntryExitPointPositionLocator(getMainFigure(), PositionConstants.NONE);
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PseudostateEntryPointEditPart) childEditPart).getFigure(), locator);
return true;
}
@@ -195,9 +230,9 @@ public class StateEditPart extends NamedElementEditPart {
- //Papyrus Gencode :Affixed EntryExitPoints ConnectionPointReferences Locator
+ // Papyrus Gencode :Affixed EntryExitPoints ConnectionPointReferences Locator
if (childEditPart instanceof PseudostateExitPointEditPart) {
- IBorderItemLocator locator = new CustomEntryExitPointPositionLocator(getMainFigure(), PositionConstants.NONE);
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PseudostateExitPointEditPart) childEditPart).getFigure(), locator);
return true;
}
@@ -205,9 +240,9 @@ public class StateEditPart extends NamedElementEditPart {
- //Papyrus Gencode :Affixed EntryExitPoints ConnectionPointReferences Locator
+ // Papyrus Gencode :Affixed EntryExitPoints ConnectionPointReferences Locator
if (childEditPart instanceof ConnectionPointReferenceEditPart) {
- IBorderItemLocator locator = new CustomEntryExitPointPositionLocator(getMainFigure(), PositionConstants.NONE);
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((ConnectionPointReferenceEditPart) childEditPart).getFigure(), locator);
return true;
}
@@ -283,8 +318,22 @@ public class StateEditPart extends NamedElementEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof StateFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateFloatingLabelEditPart.java
new file mode 100644
index 00000000000..8a41ddd5086
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.statemachine.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 StateFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 19003;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public StateFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.State_6000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineCompartmentEditPart.java
index eb7bad733ad..74a58d81373 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineCompartmentEditPart.java
@@ -80,8 +80,8 @@ public class StateMachineCompartmentEditPart extends ShapeCompartmentEditPart {
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateMachineCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateMachineCompartmentCanonicalEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicy.LAYOUT_ROLE, new CustomStateMachineCompartmentXYLayoutEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineEditPart.java
index 15b9dff5c2a..290a19d3f17 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineEditPart.java
@@ -27,12 +27,12 @@ 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.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -40,8 +40,8 @@ import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEd
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.locator.PortPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.StateMachineFigure;
-import org.eclipse.papyrus.uml.diagram.statemachine.custom.locators.CustomEntryExitPointPositionLocator;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateMachineItemSemanticEditPolicy;
@@ -51,7 +51,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class StateMachineEditPart extends NamedElementEditPart {
+public class StateMachineEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -84,8 +84,8 @@ public class StateMachineEditPart extends NamedElementEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StateMachineItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateMachineCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateMachineCanonicalEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
@@ -180,9 +180,9 @@ public class StateMachineEditPart extends NamedElementEditPart {
- //Papyrus Gencode :Affixed EntryExitPoints ConnectionPointReferences Locator
+ // Papyrus Gencode :Affixed EntryExitPoints ConnectionPointReferences Locator
if (childEditPart instanceof PseudostateEntryPointEditPart) {
- IBorderItemLocator locator = new CustomEntryExitPointPositionLocator(getMainFigure(), PositionConstants.NONE);
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PseudostateEntryPointEditPart) childEditPart).getFigure(), locator);
return true;
}
@@ -190,9 +190,9 @@ public class StateMachineEditPart extends NamedElementEditPart {
- //Papyrus Gencode :Affixed EntryExitPoints ConnectionPointReferences Locator
+ // Papyrus Gencode :Affixed EntryExitPoints ConnectionPointReferences Locator
if (childEditPart instanceof PseudostateExitPointEditPart) {
- IBorderItemLocator locator = new CustomEntryExitPointPositionLocator(getMainFigure(), PositionConstants.NONE);
+ IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PseudostateExitPointEditPart) childEditPart).getFigure(), locator);
return true;
}
@@ -265,7 +265,7 @@ public class StateMachineEditPart extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 100);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(200, 100);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineNameEditPart.java
index 87454a7b4bf..6b8098c4c5d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineNameEditPart.java
@@ -847,7 +847,7 @@ public class StateMachineNameEditPart extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateNameEditPart.java
index 7e9c2eb41c3..e6c6a3186cf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateNameEditPart.java
@@ -847,7 +847,7 @@ public class StateNameEditPart extends PapyrusCompartmentEditPart implements ITe
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionGuardEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionGuardEditPart.java
index a1a0fd6bf7e..55e7783b083 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionGuardEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionGuardEditPart.java
@@ -1,837 +1,839 @@
-/**
- * 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.statemachine.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
-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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.statemachine.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 TransitionGuardEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7002;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionGuardEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public TransitionGuardEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Transition_7000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionGuardEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new PapyrusWrappingLabel();
- }
-}
+/**
+ * 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.statemachine.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 TransitionGuardEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7002;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionGuardEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public TransitionGuardEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Transition_7000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionGuardEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionNameEditPart.java
index 1aae48a6fbf..f9ef00a0c54 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionNameEditPart.java
@@ -1,837 +1,839 @@
-/**
- * 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.statemachine.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
-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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.statemachine.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 TransitionNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7001;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionNameEditPart.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public TransitionNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Transition_7000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new PapyrusWrappingLabel();
- }
-}
+/**
+ * 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.statemachine.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 TransitionNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7001;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionNameEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public TransitionNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Transition_7000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionStereotypeEditPart.java
index f06311285b9..282cf0d9ff0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionStereotypeEditPart.java
@@ -1,820 +1,822 @@
-/**
- * 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.statemachine.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.statemachine.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 TransitionStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 7003;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionStereotypeEditPart.VISUAL_ID), new Point(0, 60));
- }
-
- /**
- * @generated
- */
- public TransitionStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Transition_7000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.statemachine.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.statemachine.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.statemachine.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 TransitionStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7003;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionStereotypeEditPart.VISUAL_ID), new Point(0, 60));
+ }
+
+ /**
+ * @generated
+ */
+ public TransitionStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Transition_7000, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/UMLEditPartFactory.java
index 262eb186f89..2fcb485c1e7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/UMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/UMLEditPartFactory.java
@@ -54,8 +54,8 @@ public class UMLEditPartFactory implements EditPartFactory {
case FinalStateEditPart.VISUAL_ID:
return new FinalStateEditPart(view);
- case FinalStateNameEditPart.VISUAL_ID:
- return new FinalStateNameEditPart(view);
+ case FinalStateFloatingLabelEditPart.VISUAL_ID:
+ return new FinalStateFloatingLabelEditPart(view);
case FinalStateStereotypeEditPart.VISUAL_ID:
return new FinalStateStereotypeEditPart(view);
@@ -66,11 +66,14 @@ public class UMLEditPartFactory implements EditPartFactory {
case StateNameEditPart.VISUAL_ID:
return new StateNameEditPart(view);
+ case StateFloatingLabelEditPart.VISUAL_ID:
+ return new StateFloatingLabelEditPart(view);
+
case PseudostateInitialEditPart.VISUAL_ID:
return new PseudostateInitialEditPart(view);
- case PseudostateInitialNameEditPart.VISUAL_ID:
- return new PseudostateInitialNameEditPart(view);
+ case PseudostateInitialFloatingLabelEditPart.VISUAL_ID:
+ return new PseudostateInitialFloatingLabelEditPart(view);
case PseudostateInitialStereotypeEditPart.VISUAL_ID:
return new PseudostateInitialStereotypeEditPart(view);
@@ -78,8 +81,8 @@ public class UMLEditPartFactory implements EditPartFactory {
case PseudostateJoinEditPart.VISUAL_ID:
return new PseudostateJoinEditPart(view);
- case PseudostateJoinNameEditPart.VISUAL_ID:
- return new PseudostateJoinNameEditPart(view);
+ case PseudostateJoinFloatingLabelEditPart.VISUAL_ID:
+ return new PseudostateJoinFloatingLabelEditPart(view);
case PseudostateJoinStereotypeEditPart.VISUAL_ID:
return new PseudostateJoinStereotypeEditPart(view);
@@ -96,8 +99,8 @@ public class UMLEditPartFactory implements EditPartFactory {
case PseudostateChoiceEditPart.VISUAL_ID:
return new PseudostateChoiceEditPart(view);
- case PseudostateChoiceNameEditPart.VISUAL_ID:
- return new PseudostateChoiceNameEditPart(view);
+ case PseudostateChoiceFloatingLabelEditPart.VISUAL_ID:
+ return new PseudostateChoiceFloatingLabelEditPart(view);
case PseudostateChoiceStereotypeEditPart.VISUAL_ID:
return new PseudostateChoiceStereotypeEditPart(view);
@@ -105,8 +108,8 @@ public class UMLEditPartFactory implements EditPartFactory {
case PseudostateJunctionEditPart.VISUAL_ID:
return new PseudostateJunctionEditPart(view);
- case PseudostateJunctionNameEditPart.VISUAL_ID:
- return new PseudostateJunctionNameEditPart(view);
+ case PseudostateJunctionFloatingLabelEditPart.VISUAL_ID:
+ return new PseudostateJunctionFloatingLabelEditPart(view);
case PseudostateJunctionStereotypeEditPart.VISUAL_ID:
return new PseudostateJunctionStereotypeEditPart(view);
@@ -114,8 +117,8 @@ public class UMLEditPartFactory implements EditPartFactory {
case PseudostateShallowHistoryEditPart.VISUAL_ID:
return new PseudostateShallowHistoryEditPart(view);
- case PseudostateShallowHistoryNameEditPart.VISUAL_ID:
- return new PseudostateShallowHistoryNameEditPart(view);
+ case PseudostateShallowHistoryFloatingLabelEditPart.VISUAL_ID:
+ return new PseudostateShallowHistoryFloatingLabelEditPart(view);
case PseudostateShallowHistoryStereotypeEditPart.VISUAL_ID:
return new PseudostateShallowHistoryStereotypeEditPart(view);
@@ -123,8 +126,8 @@ public class UMLEditPartFactory implements EditPartFactory {
case PseudostateDeepHistoryEditPart.VISUAL_ID:
return new PseudostateDeepHistoryEditPart(view);
- case PseudostateDeepHistoryNameEditPart.VISUAL_ID:
- return new PseudostateDeepHistoryNameEditPart(view);
+ case PseudostateDeepHistoryFloatingLabelEditPart.VISUAL_ID:
+ return new PseudostateDeepHistoryFloatingLabelEditPart(view);
case PseudostateDeepHistoryStereotypeEditPart.VISUAL_ID:
return new PseudostateDeepHistoryStereotypeEditPart(view);
@@ -132,8 +135,8 @@ public class UMLEditPartFactory implements EditPartFactory {
case PseudostateTerminateEditPart.VISUAL_ID:
return new PseudostateTerminateEditPart(view);
- case PseudostateTerminateNameEditPart.VISUAL_ID:
- return new PseudostateTerminateNameEditPart(view);
+ case PseudostateTerminateFloatingLabelEditPart.VISUAL_ID:
+ return new PseudostateTerminateFloatingLabelEditPart(view);
case PseudostateTerminateStereotypeEditPart.VISUAL_ID:
return new PseudostateTerminateStereotypeEditPart(view);
@@ -141,8 +144,8 @@ public class UMLEditPartFactory implements EditPartFactory {
case PseudostateEntryPointEditPart.VISUAL_ID:
return new PseudostateEntryPointEditPart(view);
- case PseudostateEntryPointNameEditPart.VISUAL_ID:
- return new PseudostateEntryPointNameEditPart(view);
+ case PseudostateEntryPointFloatingLabelEditPart.VISUAL_ID:
+ return new PseudostateEntryPointFloatingLabelEditPart(view);
case PseudostateEntryPointStereotypeEditPart.VISUAL_ID:
return new PseudostateEntryPointStereotypeEditPart(view);
@@ -150,8 +153,8 @@ public class UMLEditPartFactory implements EditPartFactory {
case PseudostateExitPointEditPart.VISUAL_ID:
return new PseudostateExitPointEditPart(view);
- case PseudostateExitPointNameEditPart.VISUAL_ID:
- return new PseudostateExitPointNameEditPart(view);
+ case PseudostateExitPointFloatingLabelEditPart.VISUAL_ID:
+ return new PseudostateExitPointFloatingLabelEditPart(view);
case PseudostateExitPointStereotypeEditPart.VISUAL_ID:
return new PseudostateExitPointStereotypeEditPart(view);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/CommentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/CommentItemSemanticEditPolicy.java
index 481068e17c6..85c34d2e96c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/CommentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/CommentItemSemanticEditPolicy.java
@@ -62,7 +62,7 @@ public class CommentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ConnectionPointReferenceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ConnectionPointReferenceItemSemanticEditPolicy.java
index 6df35ca2a5a..a20fedad6b7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ConnectionPointReferenceItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ConnectionPointReferenceItemSemanticEditPolicy.java
@@ -66,7 +66,7 @@ public class ConnectionPointReferenceItemSemanticEditPolicy extends UMLBaseItemS
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ConstraintItemSemanticEditPolicy.java
index 240a79e190e..18186f9fb9f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ConstraintItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ConstraintItemSemanticEditPolicy.java
@@ -65,7 +65,7 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/DoActivityStateBehaviorStateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/DoActivityStateBehaviorStateItemSemanticEditPolicy.java
index bcdd3a5952b..dc075bc08b8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/DoActivityStateBehaviorStateItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/DoActivityStateBehaviorStateItemSemanticEditPolicy.java
@@ -51,7 +51,7 @@ public class DoActivityStateBehaviorStateItemSemanticEditPolicy extends UMLBaseI
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/EntryStateBehaviorItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/EntryStateBehaviorItemSemanticEditPolicy.java
index ac4af443f37..476a7599e24 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/EntryStateBehaviorItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/EntryStateBehaviorItemSemanticEditPolicy.java
@@ -51,7 +51,7 @@ public class EntryStateBehaviorItemSemanticEditPolicy extends UMLBaseItemSemanti
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ExitStateBehaviorItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ExitStateBehaviorItemSemanticEditPolicy.java
index 53088c6fece..5f700c5d488 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ExitStateBehaviorItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/ExitStateBehaviorItemSemanticEditPolicy.java
@@ -51,7 +51,7 @@ public class ExitStateBehaviorItemSemanticEditPolicy extends UMLBaseItemSemantic
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/FinalStateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/FinalStateItemSemanticEditPolicy.java
index 06f70d8f7c6..7e89571fd0d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/FinalStateItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/FinalStateItemSemanticEditPolicy.java
@@ -69,7 +69,7 @@ public class FinalStateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/GeneralizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/GeneralizationItemSemanticEditPolicy.java
index 1b4474205c6..d91563a70cb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/GeneralizationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/GeneralizationItemSemanticEditPolicy.java
@@ -54,10 +54,10 @@ public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
cmd.setTransactionNestingEnabled(true);
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 org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
return getGEFWrapper(cmd.reduce());
- //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ // return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/InternalTransitionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/InternalTransitionItemSemanticEditPolicy.java
index 1a91d5cf8b0..9e1b3859f16 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/InternalTransitionItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/InternalTransitionItemSemanticEditPolicy.java
@@ -51,7 +51,7 @@ public class InternalTransitionItemSemanticEditPolicy extends UMLBaseItemSemanti
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateChoiceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateChoiceItemSemanticEditPolicy.java
index c53792be327..29e2c35bd6a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateChoiceItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateChoiceItemSemanticEditPolicy.java
@@ -66,7 +66,7 @@ public class PseudostateChoiceItemSemanticEditPolicy extends UMLBaseItemSemantic
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateDeepHistoryItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateDeepHistoryItemSemanticEditPolicy.java
index a29b7e29ca3..6c62a16a5af 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateDeepHistoryItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateDeepHistoryItemSemanticEditPolicy.java
@@ -66,7 +66,7 @@ public class PseudostateDeepHistoryItemSemanticEditPolicy extends UMLBaseItemSem
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateEntryPointItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateEntryPointItemSemanticEditPolicy.java
index fcab9244074..661215f59dc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateEntryPointItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateEntryPointItemSemanticEditPolicy.java
@@ -66,7 +66,7 @@ public class PseudostateEntryPointItemSemanticEditPolicy extends UMLBaseItemSema
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateExitPointItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateExitPointItemSemanticEditPolicy.java
index c7b793f9df2..3ee02f70026 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateExitPointItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateExitPointItemSemanticEditPolicy.java
@@ -66,7 +66,7 @@ public class PseudostateExitPointItemSemanticEditPolicy extends UMLBaseItemSeman
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateForkItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateForkItemSemanticEditPolicy.java
index 4bd381c8ad4..720e0f4d2b0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateForkItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateForkItemSemanticEditPolicy.java
@@ -66,7 +66,7 @@ public class PseudostateForkItemSemanticEditPolicy extends UMLBaseItemSemanticEd
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateInitialItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateInitialItemSemanticEditPolicy.java
index 1970ce8eaef..8ebc771e35e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateInitialItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateInitialItemSemanticEditPolicy.java
@@ -66,7 +66,7 @@ public class PseudostateInitialItemSemanticEditPolicy extends UMLBaseItemSemanti
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateJoinItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateJoinItemSemanticEditPolicy.java
index f8013192f59..a051433a838 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateJoinItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateJoinItemSemanticEditPolicy.java
@@ -66,7 +66,7 @@ public class PseudostateJoinItemSemanticEditPolicy extends UMLBaseItemSemanticEd
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateJunctionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateJunctionItemSemanticEditPolicy.java
index 1d9f975008d..0efb9576102 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateJunctionItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateJunctionItemSemanticEditPolicy.java
@@ -66,7 +66,7 @@ public class PseudostateJunctionItemSemanticEditPolicy extends UMLBaseItemSemant
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateShallowHistoryItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateShallowHistoryItemSemanticEditPolicy.java
index d483825287b..62fc45900bd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateShallowHistoryItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateShallowHistoryItemSemanticEditPolicy.java
@@ -66,7 +66,7 @@ public class PseudostateShallowHistoryItemSemanticEditPolicy extends UMLBaseItem
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateTerminateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateTerminateItemSemanticEditPolicy.java
index dc43d98eb7b..47bab383c51 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateTerminateItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PseudostateTerminateItemSemanticEditPolicy.java
@@ -66,7 +66,7 @@ public class PseudostateTerminateItemSemanticEditPolicy extends UMLBaseItemSeman
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/RegionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/RegionItemSemanticEditPolicy.java
index 49071100012..e7e9034ca5c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/RegionItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/RegionItemSemanticEditPolicy.java
@@ -90,7 +90,7 @@ public class RegionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateItemSemanticEditPolicy.java
index c470e4ed00c..09a0cc55930 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateItemSemanticEditPolicy.java
@@ -151,7 +151,7 @@ public class StateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineItemSemanticEditPolicy.java
index d9e330c38f1..ae9a2e84484 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineItemSemanticEditPolicy.java
@@ -111,7 +111,7 @@ public class StateMachineItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/TransitionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/TransitionItemSemanticEditPolicy.java
index ed6a5e34eaf..49d01c04a80 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/TransitionItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/TransitionItemSemanticEditPolicy.java
@@ -57,10 +57,10 @@ public class TransitionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
cmd.setTransactionNestingEnabled(true);
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 org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
return getGEFWrapper(cmd.reduce());
- //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ // return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditorUtil.java
index b96d02f1267..5745a9884e3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditorUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditorUtil.java
@@ -182,6 +182,7 @@ public class UMLDiagramEditorUtil {
* Create a new instance of domain element associated with canvas.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static Package createInitialModel() {
@@ -192,6 +193,7 @@ public class UMLDiagramEditorUtil {
* Store model element in the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static void attachModelToResource(Package model, Resource resource) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramUpdater.java
index 36dc32cacf4..f7fbcb52b63 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramUpdater.java
@@ -88,7 +88,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
protected UMLDiagramUpdater() {
- //to prevent instantiation allowing the override
+ // to prevent instantiation allowing the override
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDocumentProvider.java
index 1377a0d7eb7..4e7beaa89ca 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDocumentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDocumentProvider.java
@@ -506,7 +506,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
if (toCreateOrModify.exists()) {
return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(toCreateOrModify);
}
-
IResource parent = toCreateOrModify;
do {
/*
@@ -554,7 +553,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
info.stopResourceListening();
fireElementStateChanging(element);
try {
- monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); //"Saving diagram"
+ monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); // "Saving diagram"
for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
monitor.setTaskName(NLS.bind(
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java
index fa6ee2e95c7..d1ca77af91f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java
@@ -32,46 +32,47 @@ import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.DoActivityStateBe
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.EntryStateBehaviorEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ExitStateBehaviorEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.GeneralizationEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.GeneralizationStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.InternalTransitionEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PackageEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateForkEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateForkNameEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateForkStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.RegionCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.RegionEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateMachineCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateMachineEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateMachineNameEditPart;
@@ -332,7 +333,7 @@ public class UMLVisualIDRegistry {
}
break;
case FinalStateEditPart.VISUAL_ID:
- if (FinalStateNameEditPart.VISUAL_ID == nodeVisualID) {
+ if (FinalStateFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
if (FinalStateStereotypeEditPart.VISUAL_ID == nodeVisualID) {
@@ -343,6 +344,9 @@ public class UMLVisualIDRegistry {
if (StateNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (StateFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (StateCompartmentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -372,7 +376,7 @@ public class UMLVisualIDRegistry {
}
break;
case PseudostateInitialEditPart.VISUAL_ID:
- if (PseudostateInitialNameEditPart.VISUAL_ID == nodeVisualID) {
+ if (PseudostateInitialFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
if (PseudostateInitialStereotypeEditPart.VISUAL_ID == nodeVisualID) {
@@ -380,7 +384,7 @@ public class UMLVisualIDRegistry {
}
break;
case PseudostateJoinEditPart.VISUAL_ID:
- if (PseudostateJoinNameEditPart.VISUAL_ID == nodeVisualID) {
+ if (PseudostateJoinFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
if (PseudostateJoinStereotypeEditPart.VISUAL_ID == nodeVisualID) {
@@ -396,7 +400,7 @@ public class UMLVisualIDRegistry {
}
break;
case PseudostateChoiceEditPart.VISUAL_ID:
- if (PseudostateChoiceNameEditPart.VISUAL_ID == nodeVisualID) {
+ if (PseudostateChoiceFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
if (PseudostateChoiceStereotypeEditPart.VISUAL_ID == nodeVisualID) {
@@ -404,7 +408,7 @@ public class UMLVisualIDRegistry {
}
break;
case PseudostateJunctionEditPart.VISUAL_ID:
- if (PseudostateJunctionNameEditPart.VISUAL_ID == nodeVisualID) {
+ if (PseudostateJunctionFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
if (PseudostateJunctionStereotypeEditPart.VISUAL_ID == nodeVisualID) {
@@ -412,7 +416,7 @@ public class UMLVisualIDRegistry {
}
break;
case PseudostateShallowHistoryEditPart.VISUAL_ID:
- if (PseudostateShallowHistoryNameEditPart.VISUAL_ID == nodeVisualID) {
+ if (PseudostateShallowHistoryFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
if (PseudostateShallowHistoryStereotypeEditPart.VISUAL_ID == nodeVisualID) {
@@ -420,7 +424,7 @@ public class UMLVisualIDRegistry {
}
break;
case PseudostateDeepHistoryEditPart.VISUAL_ID:
- if (PseudostateDeepHistoryNameEditPart.VISUAL_ID == nodeVisualID) {
+ if (PseudostateDeepHistoryFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
if (PseudostateDeepHistoryStereotypeEditPart.VISUAL_ID == nodeVisualID) {
@@ -428,7 +432,7 @@ public class UMLVisualIDRegistry {
}
break;
case PseudostateTerminateEditPart.VISUAL_ID:
- if (PseudostateTerminateNameEditPart.VISUAL_ID == nodeVisualID) {
+ if (PseudostateTerminateFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
if (PseudostateTerminateStereotypeEditPart.VISUAL_ID == nodeVisualID) {
@@ -436,7 +440,7 @@ public class UMLVisualIDRegistry {
}
break;
case PseudostateEntryPointEditPart.VISUAL_ID:
- if (PseudostateEntryPointNameEditPart.VISUAL_ID == nodeVisualID) {
+ if (PseudostateEntryPointFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
if (PseudostateEntryPointStereotypeEditPart.VISUAL_ID == nodeVisualID) {
@@ -444,7 +448,7 @@ public class UMLVisualIDRegistry {
}
break;
case PseudostateExitPointEditPart.VISUAL_ID:
- if (PseudostateExitPointNameEditPart.VISUAL_ID == nodeVisualID) {
+ if (PseudostateExitPointFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
if (PseudostateExitPointStereotypeEditPart.VISUAL_ID == nodeVisualID) {
@@ -755,7 +759,7 @@ public class UMLVisualIDRegistry {
*/
public static boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
if (candidate == -1) {
- //unrecognized id is always bad
+ // unrecognized id is always bad
return false;
}
int basic = getNodeVisualID(containerView, domainElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLParserProvider.java
index b3d8a6a2749..572ec5137cf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLParserProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLParserProvider.java
@@ -40,30 +40,31 @@ import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ContextLinkApplie
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.DoActivityStateBehaviorStateEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.EntryStateBehaviorEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ExitStateBehaviorEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.GeneralizationStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.InternalTransitionEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateForkNameEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateForkStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateMachineNameEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateNameEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionGuardEditPart;
@@ -153,6 +154,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser stateName_19003Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getStateName_19003Parser() {
+ if (stateName_19003Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ stateName_19003Parser = parser;
+ }
+ return stateName_19003Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser pseudostateName_8001Parser;
/**
@@ -735,20 +755,22 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
return getStateMachineName_2001Parser();
- case FinalStateNameEditPart.VISUAL_ID:
+ case FinalStateFloatingLabelEditPart.VISUAL_ID:
return getFinalStateName_5001Parser();
case FinalStateStereotypeEditPart.VISUAL_ID:
return getFinalStateName_5002Parser();
case StateNameEditPart.VISUAL_ID:
return getStateName_6001Parser();
+ case StateFloatingLabelEditPart.VISUAL_ID:
+ return getStateName_19003Parser();
- case PseudostateInitialNameEditPart.VISUAL_ID:
+ case PseudostateInitialFloatingLabelEditPart.VISUAL_ID:
return getPseudostateName_8001Parser();
case PseudostateInitialStereotypeEditPart.VISUAL_ID:
return getPseudostateName_8002Parser();
- case PseudostateJoinNameEditPart.VISUAL_ID:
+ case PseudostateJoinFloatingLabelEditPart.VISUAL_ID:
return getPseudostateName_9001Parser();
case PseudostateJoinStereotypeEditPart.VISUAL_ID:
return getPseudostateName_9002Parser();
@@ -758,37 +780,37 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
case PseudostateForkStereotypeEditPart.VISUAL_ID:
return getPseudostateName_10002Parser();
- case PseudostateChoiceNameEditPart.VISUAL_ID:
+ case PseudostateChoiceFloatingLabelEditPart.VISUAL_ID:
return getPseudostateName_11001Parser();
case PseudostateChoiceStereotypeEditPart.VISUAL_ID:
return getPseudostateName_11002Parser();
- case PseudostateJunctionNameEditPart.VISUAL_ID:
+ case PseudostateJunctionFloatingLabelEditPart.VISUAL_ID:
return getPseudostateName_12001Parser();
case PseudostateJunctionStereotypeEditPart.VISUAL_ID:
return getPseudostateName_12002Parser();
- case PseudostateShallowHistoryNameEditPart.VISUAL_ID:
+ case PseudostateShallowHistoryFloatingLabelEditPart.VISUAL_ID:
return getPseudostateName_13001Parser();
case PseudostateShallowHistoryStereotypeEditPart.VISUAL_ID:
return getPseudostateName_13002Parser();
- case PseudostateDeepHistoryNameEditPart.VISUAL_ID:
+ case PseudostateDeepHistoryFloatingLabelEditPart.VISUAL_ID:
return getPseudostateName_14001Parser();
case PseudostateDeepHistoryStereotypeEditPart.VISUAL_ID:
return getPseudostateName_14002Parser();
- case PseudostateTerminateNameEditPart.VISUAL_ID:
+ case PseudostateTerminateFloatingLabelEditPart.VISUAL_ID:
return getPseudostateName_15001Parser();
case PseudostateTerminateStereotypeEditPart.VISUAL_ID:
return getPseudostateName_15002Parser();
- case PseudostateEntryPointNameEditPart.VISUAL_ID:
+ case PseudostateEntryPointFloatingLabelEditPart.VISUAL_ID:
return getPseudostateName_16001Parser();
case PseudostateEntryPointStereotypeEditPart.VISUAL_ID:
return getPseudostateName_16002Parser();
- case PseudostateExitPointNameEditPart.VISUAL_ID:
+ case PseudostateExitPointFloatingLabelEditPart.VISUAL_ID:
return getPseudostateName_17001Parser();
case PseudostateExitPointStereotypeEditPart.VISUAL_ID:
return getPseudostateName_17002Parser();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLViewProvider.java
index 73068f316a8..8179da50ac8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLViewProvider.java
@@ -73,46 +73,47 @@ import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.DoActivityStateBe
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.EntryStateBehaviorEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ExitStateBehaviorEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.GeneralizationEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.GeneralizationStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.InternalTransitionEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PackageEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateForkEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateForkNameEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateForkStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateNameEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.RegionCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.RegionEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateEditPart;
+import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateMachineCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateMachineEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateMachineNameEditPart;
@@ -154,10 +155,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
*/
protected boolean provides(CreateViewForKindOperation op) {
/*
- if (op.getViewKind() == Node.class)
- return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
- if (op.getViewKind() == Edge.class)
- return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ * if (op.getViewKind() == Node.class)
+ * return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ * if (op.getViewKind() == Edge.class)
+ * return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
*/
// check Diagram Type should be the class diagram
@@ -183,7 +184,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* <p>
* This method can be overloaded when diagram editor inherits from another one, but should never be <code>null</code>
* </p>
- *
+ *
* @return the unique identifier of the diagram for which views are provided.
*/
return PackageEditPart.MODEL_ID;
@@ -284,7 +285,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
*/
protected boolean provides(CreateEdgeViewOperation op) {
IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- //RS: add code for extended types creation
+ // RS: add code for extended types creation
if (elementType instanceof IExtendedHintedElementType) {
IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType);
if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) {
@@ -295,9 +296,9 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
return false; // foreign element type
}
}
- //if (!org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
- // return false; // foreign element type
- //}
+ // if (!org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
+ // return false; // foreign element type
+ // }
// END R.S.
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) {
@@ -460,7 +461,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "FinalState");
- Node label5001 = createLabel(node, UMLVisualIDRegistry.getType(FinalStateNameEditPart.VISUAL_ID));
+ Node label5001 = createLabel(node, UMLVisualIDRegistry.getType(FinalStateFloatingLabelEditPart.VISUAL_ID));
label5001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location5001 = (Location) label5001.getLayoutConstraint();
location5001.setX(25);
@@ -487,6 +488,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "State");
Node label6001 = createLabel(node, UMLVisualIDRegistry.getType(StateNameEditPart.VISUAL_ID));
+ Node label19003 = createLabel(node, UMLVisualIDRegistry.getType(StateFloatingLabelEditPart.VISUAL_ID));
+ label19003.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location19003 = (Location) label19003.getLayoutConstraint();
+ location19003.setX(40);
+ location19003.setY(0);
createCompartment(node, UMLVisualIDRegistry.getType(StateCompartmentEditPart.VISUAL_ID), false, false, false, false);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "State");
return node;
@@ -505,7 +511,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Pseudostate");
- Node label8001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateInitialNameEditPart.VISUAL_ID));
+ Node label8001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateInitialFloatingLabelEditPart.VISUAL_ID));
label8001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location8001 = (Location) label8001.getLayoutConstraint();
location8001.setX(25);
@@ -531,7 +537,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Pseudostate");
- Node label9001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateJoinNameEditPart.VISUAL_ID));
+ Node label9001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateJoinFloatingLabelEditPart.VISUAL_ID));
label9001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location9001 = (Location) label9001.getLayoutConstraint();
location9001.setX(25);
@@ -583,10 +589,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Pseudostate");
- Node label11001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateChoiceNameEditPart.VISUAL_ID));
+ Node label11001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateChoiceFloatingLabelEditPart.VISUAL_ID));
label11001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location11001 = (Location) label11001.getLayoutConstraint();
- location11001.setX(25);
+ location11001.setX(50);
location11001.setY(3);
Node label11002 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateChoiceStereotypeEditPart.VISUAL_ID));
label11002.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
@@ -609,7 +615,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Pseudostate");
- Node label12001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateJunctionNameEditPart.VISUAL_ID));
+ Node label12001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateJunctionFloatingLabelEditPart.VISUAL_ID));
label12001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location12001 = (Location) label12001.getLayoutConstraint();
location12001.setX(25);
@@ -635,7 +641,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Pseudostate");
- Node label13001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateShallowHistoryNameEditPart.VISUAL_ID));
+ Node label13001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateShallowHistoryFloatingLabelEditPart.VISUAL_ID));
label13001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location13001 = (Location) label13001.getLayoutConstraint();
location13001.setX(25);
@@ -661,7 +667,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Pseudostate");
- Node label14001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateDeepHistoryNameEditPart.VISUAL_ID));
+ Node label14001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateDeepHistoryFloatingLabelEditPart.VISUAL_ID));
label14001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location14001 = (Location) label14001.getLayoutConstraint();
location14001.setX(25);
@@ -687,7 +693,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Pseudostate");
- Node label15001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateTerminateNameEditPart.VISUAL_ID));
+ Node label15001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateTerminateFloatingLabelEditPart.VISUAL_ID));
label15001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location15001 = (Location) label15001.getLayoutConstraint();
location15001.setX(25);
@@ -713,7 +719,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Pseudostate");
- Node label16001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateEntryPointNameEditPart.VISUAL_ID));
+ Node label16001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateEntryPointFloatingLabelEditPart.VISUAL_ID));
label16001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location16001 = (Location) label16001.getLayoutConstraint();
location16001.setX(25);
@@ -739,7 +745,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Pseudostate");
- Node label17001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateExitPointNameEditPart.VISUAL_ID));
+ Node label17001 = createLabel(node, UMLVisualIDRegistry.getType(PseudostateExitPointFloatingLabelEditPart.VISUAL_ID));
label17001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location17001 = (Location) label17001.getLayoutConstraint();
location17001.setX(25);
@@ -893,10 +899,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Transition");
- //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);
- //}
+ // 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);
+ // }
Node label7001 = createLabel(edge, UMLVisualIDRegistry.getType(TransitionNameEditPart.VISUAL_ID));
label7001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Node label7002 = createLabel(edge, UMLVisualIDRegistry.getType(TransitionGuardEditPart.VISUAL_ID));
@@ -929,10 +935,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
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) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
+ // 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);
+ // }
Node label19002 = createLabel(edge, UMLVisualIDRegistry.getType(GeneralizationStereotypeEditPart.VISUAL_ID));
label19002.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location19002 = (Location) label19002.getLayoutConstraint();
@@ -960,10 +966,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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;
}
@@ -986,10 +992,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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;
}
@@ -1012,10 +1018,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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);
+ // }
Node label8501 = createLabel(edge, UMLVisualIDRegistry.getType(ContextLinkAppliedStereotypeEditPart.VISUAL_ID));
label8501.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
@@ -1048,9 +1054,9 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* @generated
*/
protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) {
- //SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
- //rv.setShowTitle(showTitle);
- //rv.setCollapsed(isCollapsed);
+ // SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
+ // rv.setShowTitle(showTitle);
+ // rv.setCollapsed(isCollapsed);
Node rv;
if (canCollapse) {
rv = NotationFactory.eINSTANCE.createBasicCompartment();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/sheet/UMLPropertySection.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/sheet/UMLPropertySection.java
index 80acedd1f65..7def4ab498a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/sheet/UMLPropertySection.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/sheet/UMLPropertySection.java
@@ -26,7 +26,7 @@ public class UMLPropertySection extends DefaultPropertySection implements IPrope
*/
@Override
protected Object transformSelection(Object selected) {
- selected = /*super.*/transformSelectionToDomain(selected);
+ selected = /* super. */transformSelectionToDomain(selected);
return selected;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/META-INF/MANIFEST.MF
index 9643bb735f3..77a3988aece 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/META-INF/MANIFEST.MF
@@ -1,31 +1,31 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.diagram.symbols,
- org.eclipse.papyrus.uml.diagram.symbols.provider
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime;bundle-version="3.8.0",
- org.eclipse.papyrus.uml.extensionpoints;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.profile;bundle-version="1.1.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.5.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.6.0",
- org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="1.4.1",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.appearance;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.uml.diagram.symbols,
+ org.eclipse.papyrus.uml.diagram.symbols.provider
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime;bundle-version="3.8.0",
+ org.eclipse.papyrus.uml.extensionpoints;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.profile;bundle-version="1.1.0",
+ org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.6.0",
+ org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="1.4.1",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.appearance;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
org.w3c.dom.svg;bundle-version="1.1.0"
-Bundle-Vendor: %Bundle-Vendor
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.1.0.qualifier
-Bundle-Name: %Bundle-Name
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.symbols.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.symbols;singleton
- :=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.1.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.symbols.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.symbols;singleton
+ :=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/plugin.xml
index 140d16d63b5..1b3d71820da 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/plugin.xml
@@ -1,91 +1,92 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider">
- <shapeProvider
- class="org.eclipse.papyrus.uml.diagram.symbols.provider.TypedElementShapeProvider"
- description="Provides the shapes based on the type for a typed element, based on a stereotype description of the stereotype"
- id="org.eclipse.papyrus.uml.diagram.symbols.typedelementshapeprovider"
- name="Typed Element Shape Provider">
- <Priority
- name="Lowest"></Priority>
- </shapeProvider>
- </extension>
- <extension
- point="org.eclipse.emf.ecore.uri_mapping">
- <mapping
- source="pathmap://PAPYRUS_INTERNAL_PROFILES/"
- target="platform:/plugin/org.eclipse.papyrus.uml.diagram.symbols/resources/"/>
- </extension>
- <extension
- point="org.eclipse.papyrus.uml.extensionpoints.UMLProfile">
- <profile
- description="Profile that provides annotations for the tool itself (Decorations, etc.)"
- iconpath="icons/symbols.gif"
- name="Papyrus Internal"
- path="pathmap://PAPYRUS_INTERNAL_PROFILES/PapyrusInternal.profile.uml"
- provider="CEA LIST">
- </profile>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider">
- <shapeProvider
- class="org.eclipse.papyrus.uml.diagram.symbols.provider.ActorShapeProvider"
- description="Provides the shapes for UML::Actors or elements typed by an Actor"
- id="org.eclipse.papyrus.uml.diagram.symbols.actorshapeprovider"
- name="Actor Shape Provider">
- <Priority
- name="Lowest"></Priority>
- </shapeProvider>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider">
- <shapeProvider
- class="org.eclipse.papyrus.uml.diagram.symbols.provider.StereotypedElementShapeProvider"
- description="Provides the shapes based on symbols defined on stereotypes"
- id="org.eclipse.papyrus.uml.diagram.symbols.stereotypedelementshapeprovider"
- name="Stereotyped Element Shape Provider">
- <Priority
- name="Lowest"></Priority>
- </shapeProvider>
- </extension>
- <extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
- <editpartProvider
- class="org.eclipse.papyrus.uml.diagram.symbols.provider.ShapeCompartmentEditPartProvider">
- <Priority
- name="Medium">
- </Priority>
- <object
- class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
- id="org.eclipse.papyrus.sysml.diagram.internalblock.editpart.ShapeCompartmentDisplay">
- <method
- name="getType()"
- value="compartment_shape_display">
- </method>
- </object>
- </editpartProvider>
-</extension>
-
-<!-- edit policy provider for shape compartments -->
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.uml.diagram.symbols.provider.ShapeEditPolicyProvider">
- <Priority name="Low"/>
- </editpolicyProvider>
-</extension>
-<extension
- point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider">
- <shapeProvider
- class="org.eclipse.papyrus.uml.diagram.symbols.provider.LifelineShapeProvider"
- description="Provides the shapes based on the type of the element represented by the lifeline. Relies on TypedElementShapeProvider"
- id="org.eclipse.papyrus.uml.diagram.symbols.lifelineshapeprovider"
- name="Lifeline Shape Provider">
- <Priority
- name="Lowest">
- </Priority>
- </shapeProvider>
-</extension>
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider">
+ <shapeProvider
+ class="org.eclipse.papyrus.uml.diagram.symbols.provider.TypedElementShapeProvider"
+ description="Provides the shapes based on the type for a typed element, based on a stereotype description of the stereotype"
+ id="org.eclipse.papyrus.uml.diagram.symbols.typedelementshapeprovider"
+ name="Typed Element Shape Provider">
+ <Priority
+ name="Lowest"></Priority>
+ </shapeProvider>
+ </extension>
+ <extension
+ point="org.eclipse.emf.ecore.uri_mapping">
+ <mapping
+ source="pathmap://PAPYRUS_INTERNAL_PROFILES/"
+ target="platform:/plugin/org.eclipse.papyrus.uml.diagram.symbols/resources/"/>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.uml.extensionpoints.UMLProfile">
+ <profile
+ description="Profile that provides annotations for the tool itself (Decorations, etc.)"
+ iconpath="icons/symbols.gif"
+ name="Papyrus Internal"
+ path="pathmap://PAPYRUS_INTERNAL_PROFILES/PapyrusInternal.profile.uml"
+ provider="CEA LIST">
+ </profile>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider">
+ <shapeProvider
+ class="org.eclipse.papyrus.uml.diagram.symbols.provider.StereotypedElementShapeProvider"
+ description="Provides the shapes based on symbols defined on stereotypes"
+ id="org.eclipse.papyrus.uml.diagram.symbols.stereotypedelementshapeprovider"
+ name="Stereotyped Element Shape Provider">
+ <Priority
+ name="Lowest"></Priority>
+ </shapeProvider>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
+ <editpartProvider
+ class="org.eclipse.papyrus.uml.diagram.symbols.provider.ShapeCompartmentEditPartProvider">
+ <Priority
+ name="Medium">
+ </Priority>
+ <object
+ class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
+ id="org.eclipse.papyrus.sysml.diagram.internalblock.editpart.ShapeCompartmentDisplay">
+ <method
+ name="getType()"
+ value="compartment_shape_display">
+ </method>
+ </object>
+ </editpartProvider>
+</extension>
+
+<!-- edit policy provider for shape compartments -->
+<extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.uml.diagram.symbols.provider.ShapeEditPolicyProvider">
+ <Priority name="Low"/>
+ </editpolicyProvider>
+</extension>
+<extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider">
+ <shapeProvider
+ class="org.eclipse.papyrus.uml.diagram.symbols.provider.LifelineShapeProvider"
+ description="Provides the shapes based on the type of the element represented by the lifeline. Relies on TypedElementShapeProvider"
+ id="org.eclipse.papyrus.uml.diagram.symbols.lifelineshapeprovider"
+ name="Lifeline Shape Provider">
+ <Priority
+ name="Lowest">
+ </Priority>
+ </shapeProvider>
+</extension>
+<extension
+ point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider">
+ <shapeProvider
+ class="org.eclipse.papyrus.uml.diagram.symbols.provider.AcceptEventActionShapeProvider"
+ description="Provides the shapes for UMLElement or elements typed by"
+ id="org.eclipse.papyrus.uml.diagram.symbols.umlshapeprovider"
+ name="UML Element Shape Provider">
+ <Priority
+ name="Lowest">
+ </Priority>
+ </shapeProvider>
+</extension>
+</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ActorShapeProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/AcceptEventActionShapeProvider.java
index e0de1a7ae3f..09f77a56258 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/ActorShapeProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols/src/org/eclipse/papyrus/uml/diagram/symbols/provider/AcceptEventActionShapeProvider.java
@@ -1,177 +1,224 @@
-/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms 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.symbols.provider;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
-import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
-import org.eclipse.gmf.runtime.draw2d.ui.render.RenderedImage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.utils.BusinessModelResolver;
-import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.AbstractShapeProvider;
-import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.ProviderNotificationManager;
-import org.eclipse.papyrus.uml.diagram.symbols.Activator;
-import org.eclipse.uml2.uml.Actor;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.TypedElement;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.w3c.dom.svg.SVGDocument;
-
-
-/**
- * Shape Provider for {@link Actor} or for {@link TypedElement} that are typed by an {@link Actor}.
- */
-public class ActorShapeProvider extends AbstractShapeProvider {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public List<RenderedImage> getShapes(EObject view) {
- if (providesShapes(view)) {
- List<SVGDocument> documents = getSVGDocument(view);
-
- if (documents != null) {
- List<RenderedImage> result = new LinkedList<RenderedImage>();
- for (SVGDocument document : documents) {
- try {
- result.add(renderSVGDocument(view, document));
- } catch (IOException ex) {
- Activator.log.error(ex);
- continue;
- }
- }
- return result;
- }
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean providesShapes(EObject view) {
- if (!(view instanceof View)) {
- return false;
- }
-
- EObject element = ((View) view).getElement();
-
- if (element instanceof Actor || (element instanceof TypedElement && ((TypedElement) element).getType() instanceof Actor)) {
- return true;
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public ProviderNotificationManager createProviderNotificationManager(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener listener) {
- // retrieve semantic element from the view and add a notification listener on the Type feature if the semantic element is a TypedElement
- if (view == null || !(view instanceof View)) {
- return null;
- }
-
- ActorShapeProviderNotificationManager notificationManager = new ActorShapeProviderNotificationManager(diagramEventBroker, view, listener);
- return notificationManager;
- }
-
- /**
- * Notification Manager for the {@link ActorShapeProvider}.
- */
- public class ActorShapeProviderNotificationManager extends ProviderNotificationManager implements NotificationListener {
-
- /**
- * Creates a new ActorShapeProviderNotificationManager.
- *
- * @param diagramEventBroker
- * event broker specific to the diargam displaying the shapes.
- * @param view
- * the view from which all elements to listen will be computed.
- * @param listener
- * the listener to which notifications will be forwarded.
- */
- public ActorShapeProviderNotificationManager(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener listener) {
- super(diagramEventBroker, view, listener);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void registerListeners() {
- if (view == null || !(view instanceof View)) {
- return;
- }
- Object semanticElement = BusinessModelResolver.getInstance().getBusinessModel(view);
- if (semanticElement instanceof Element) {
- diagramEventBroker.addNotificationListener((Element) semanticElement, this);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void dispose() {
- if (view == null || !(view instanceof View)) {
- return;
- }
- Object semanticElement = BusinessModelResolver.getInstance().getBusinessModel(view);
- if (semanticElement instanceof Element) {
- diagramEventBroker.removeNotificationListener((Element) semanticElement, this);
- }
- super.dispose();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void notifyChanged(Notification notification) {
- if (listener == null) {
- return;
- }
- if (UMLPackage.eINSTANCE.getTypedElement_Type().equals(notification.getFeature())) {
- listener.notifyChanged(notification);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public List<SVGDocument> getSVGDocument(EObject view) {
- if (providesShapes(view)) {
- URI uri = URI.createPlatformPluginURI(org.eclipse.papyrus.uml.diagram.common.Activator.ID + "/icons/symbols/actor.svg", true);
- String path = uri.toString();
- SVGDocument document = getSVGDocument(path);
- if (document == null) {
- return null;
- }
- return Arrays.asList(getSVGDocument(path));
- }
- return null;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.symbols.provider;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.draw2d.ui.render.RenderedImage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.utils.BusinessModelResolver;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.AbstractShapeProvider;
+import org.eclipse.papyrus.infra.gmfdiag.common.service.shape.ProviderNotificationManager;
+import org.eclipse.papyrus.uml.diagram.symbols.Activator;
+import org.eclipse.uml2.uml.AcceptEventAction;
+import org.eclipse.uml2.uml.DurationObservation;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Event;
+import org.eclipse.uml2.uml.TimeEvent;
+import org.eclipse.uml2.uml.Trigger;
+import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.w3c.dom.svg.SVGDocument;
+
+
+/**
+ * Shape Provider for {@link DurationObservation} or for {@link TypedElement} that are typed by an {@link DurationObservation}.
+ */
+public class AcceptEventActionShapeProvider extends AbstractShapeProvider {
+
+ /** The Constant FLAG_SVG_PATH. */
+ private static final String FLAG_SVG_PATH = "/icons/symbols/flag.svg";
+
+ /** The Constant HOURGLASS_SVG_PATH. */
+ private static final String HOURGLASS_SVG_PATH = "/icons/symbols/hourglass.svg";
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<RenderedImage> getShapes(EObject view) {
+ if (providesShapes(view)) {
+ List<SVGDocument> documents = getSVGDocument(view);
+
+ if (documents != null) {
+ List<RenderedImage> result = new LinkedList<RenderedImage>();
+ for (SVGDocument document : documents) {
+ try {
+ result.add(renderSVGDocument(view, document));
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ continue;
+ }
+ }
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean providesShapes(EObject view) {
+ if (!(view instanceof View)) {
+ return false;
+ }
+
+ EObject element = ((View) view).getElement();
+
+ if (element instanceof AcceptEventAction || (element instanceof TypedElement && ((TypedElement) element).getType() instanceof AcceptEventAction)) {
+ return true;
+ }// flag and hourglass
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ProviderNotificationManager createProviderNotificationManager(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener listener) {
+ // retrieve semantic element from the view and add a notification listener on the Type feature if the semantic element is a TypedElement
+ if (view == null || !(view instanceof View)) {
+ return null;
+ }
+
+ ShapeProviderNotificationManager notificationManager = new ShapeProviderNotificationManager(diagramEventBroker, view, listener);
+ return notificationManager;
+ }
+
+ /**
+ * Notification Manager for the {@link AcceptEventActionShapeProvider}.
+ */
+ public class ShapeProviderNotificationManager extends ProviderNotificationManager implements NotificationListener {
+
+ /**
+ * Creates a new DurationObservationShapeProviderNotificationManager.
+ *
+ * @param diagramEventBroker
+ * event broker specific to the diargam displaying the shapes.
+ * @param view
+ * the view from which all elements to listen will be computed.
+ * @param listener
+ * the listener to which notifications will be forwarded.
+ */
+ public ShapeProviderNotificationManager(DiagramEventBroker diagramEventBroker, EObject view, NotificationListener listener) {
+ super(diagramEventBroker, view, listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void registerListeners() {
+ if (view == null || !(view instanceof View)) {
+ return;
+ }
+ Object semanticElement = BusinessModelResolver.getInstance().getBusinessModel(view);
+ if (semanticElement instanceof Element) {
+ diagramEventBroker.addNotificationListener((Element) semanticElement, this);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void dispose() {
+ if (view == null || !(view instanceof View)) {
+ return;
+ }
+ Object semanticElement = BusinessModelResolver.getInstance().getBusinessModel(view);
+ if (semanticElement instanceof Element) {
+ diagramEventBroker.removeNotificationListener((Element) semanticElement, this);
+ }
+ super.dispose();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (listener == null) {
+ return;
+ }
+ if (UMLPackage.eINSTANCE.getTypedElement_Type().equals(notification.getFeature())) {
+ listener.notifyChanged(notification);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<SVGDocument> getSVGDocument(EObject view) {
+ if (providesShapes(view)) {
+ EObject element = ((View) view).getElement();
+ URI uri = URI.createPlatformPluginURI("", true);
+ if (element instanceof AcceptEventAction || (element instanceof TypedElement && ((TypedElement) element).getType() instanceof AcceptEventAction)) {
+ if (isAcceptTimeEventAction((AcceptEventAction) element)) {
+ uri = URI.createPlatformPluginURI(org.eclipse.papyrus.infra.gmfdiag.common.Activator.ID + HOURGLASS_SVG_PATH, true);
+ } else {
+ uri = URI.createPlatformPluginURI(org.eclipse.papyrus.infra.gmfdiag.common.Activator.ID + FLAG_SVG_PATH, true);
+ }
+ }// flag and hourglass
+
+ String path = uri.toString();
+ SVGDocument document = getSVGDocument(path);
+ if (document == null) {
+ return null;
+ }
+
+ return Arrays.asList(document);
+ }
+ return null;
+ }
+
+ /**
+ * For AcceptEventAction, test whether the action may be considered as a time event action
+ * Come from org.eclipse.papyrus.uml.diagram.activity.helper.CustomAcceptEventActionEditHelper
+ *
+ * @param action
+ * the action to test
+ * @return true if action is a time event action
+ */
+ public static boolean isAcceptTimeEventAction(AcceptEventAction action) {
+ if (action.getTriggers() != null) {
+ boolean hasTimeEvent = false;
+ for (Trigger trigger : action.getTriggers()) {
+ if (trigger != null) {
+ Event event = trigger.getEvent();
+ if (event instanceof TimeEvent) {
+ hasTimeEvent = true;
+ } else {
+ return false;
+ }
+ }
+ }
+ // only time events have been encountered, but maybe no event at all.
+ return hasTimeEvent;
+ }
+ return false;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/ExternalLabelPrimaryDragRoleEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/ExternalLabelPrimaryDragRoleEditPolicy.java
index d400432f537..e53dd438ab4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/ExternalLabelPrimaryDragRoleEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/ExternalLabelPrimaryDragRoleEditPolicy.java
@@ -1,96 +1,78 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- * Nicolas Bros (Mia-Software) - remove dead code, refresh on execute/undo/redo
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.timing.custom.edit.policies;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.handles.MoveHandle;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableLabelEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.FigureUtils;
-import org.eclipse.papyrus.uml.diagram.timing.custom.edit.commands.RefreshCommandForDo;
-import org.eclipse.papyrus.uml.diagram.timing.custom.edit.commands.RefreshCommandForUndo;
-
-/**
- * This policy provides the selection handles, feedback and move command for an external node label. The expected
- * behavior is to provide an external label that can freely move and with a link feedback towards its parent figure
- * during the move.
- *
- * @author nbros : I copied this class from
- * org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ExternalLabelPrimaryDragRoleEditPolicy, removed dead
- * code, added a Refresh, and constrained the bounds within the containing compartment.
- */
-public class ExternalLabelPrimaryDragRoleEditPolicy extends NonResizableLabelEditPolicy {
-
- @Override
- protected List<?> createSelectionHandles() {
- final MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
- mh.setBorder(null);
- return Collections.singletonList(mh);
- }
-
- @Override
- protected Command getMoveCommand(final ChangeBoundsRequest request) {
- final LabelEditPart editPart = (LabelEditPart) getHost();
-
- final IFigure parentFigure = getHostFigure().getParent();
- final Rectangle parentBounds = parentFigure.getBounds();
-
- // First, start from the original bounds
- Rectangle updatedBounds = new Rectangle(getInitialFeedbackBounds());
- // Add the delta corresponding to the move
- updatedBounds = updatedBounds.getTranslated(FigureUtils.scaleByZoom(request.getMoveDelta(), parentFigure));
- // Constrain the bounds within the containing compartment if any
- updatedBounds = FigureUtils.constrainBoundsWithinContainingCompartment(updatedBounds, getHostFigure());
- // Then translate the bounds so that they are relative to the figure (BorderItemContainerFigure)
- // to which the label is attached
- updatedBounds = updatedBounds.getTranslated(parentBounds.getLocation().getNegated());
-
- // translate according to the text alignments
- if (editPart instanceof PapyrusLabelEditPart) {
- switch (((PapyrusLabelEditPart) editPart).getTextAlignment()) {
- case PositionConstants.LEFT:
- break;
- case PositionConstants.CENTER:
- updatedBounds.translate(getHostFigure().getBounds().width / 2, 0);
- break;
- case PositionConstants.RIGHT:
- updatedBounds.translate(getHostFigure().getBounds().width, 0);
- break;
- default:
- break;
- }
- }
-
- final CompoundCommand compoundCommand = new CompoundCommand();
- compoundCommand.add(new RefreshCommandForUndo((GraphicalEditPart) editPart.getParent().getParent()));
- compoundCommand.add(new ICommandProxy(new SetBoundsCommand(editPart.getEditingDomain(), DiagramUIMessages.MoveLabelCommand_Label_Location, new EObjectAdapter((View) editPart.getModel()), updatedBounds)));
- compoundCommand.add(new RefreshCommandForDo(editPart));
- return compoundCommand;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Nicolas Bros (Mia-Software) - remove dead code, refresh on execute/undo/redo
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.timing.custom.edit.policies;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableLabelEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.FigureUtils;
+import org.eclipse.papyrus.uml.diagram.timing.custom.edit.commands.RefreshCommandForDo;
+import org.eclipse.papyrus.uml.diagram.timing.custom.edit.commands.RefreshCommandForUndo;
+
+/**
+ * This policy provides the selection handles, feedback and move command for an external node label. The expected
+ * behavior is to provide an external label that can freely move and with a link feedback towards its parent figure
+ * during the move.
+ *
+ * @author nbros : I copied this class from
+ * org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ExternalLabelPrimaryDragRoleEditPolicy, removed dead
+ * code, added a Refresh, and constrained the bounds within the containing compartment.
+ */
+public class ExternalLabelPrimaryDragRoleEditPolicy extends NonResizableLabelEditPolicy {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ final MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+
+ @Override
+ protected Command getMoveCommand(final ChangeBoundsRequest request) {
+ final LabelEditPart editPart = (LabelEditPart) getHost();
+
+ final IFigure parentFigure = getHostFigure().getParent();
+ final Rectangle parentBounds = parentFigure.getBounds();
+
+ // First, start from the original bounds
+ Rectangle updatedBounds = new Rectangle(getInitialFeedbackBounds());
+ // Add the delta corresponding to the move
+ updatedBounds = updatedBounds.getTranslated(FigureUtils.scaleByZoom(request.getMoveDelta(), parentFigure));
+ // Constrain the bounds within the containing compartment if any
+ updatedBounds = FigureUtils.constrainBoundsWithinContainingCompartment(updatedBounds, getHostFigure());
+ // Then translate the bounds so that they are relative to the figure (BorderItemContainerFigure)
+ // to which the label is attached
+ updatedBounds = updatedBounds.getTranslated(parentBounds.getLocation().getNegated());
+
+ final CompoundCommand compoundCommand = new CompoundCommand();
+ compoundCommand.add(new RefreshCommandForUndo((GraphicalEditPart) editPart.getParent().getParent()));
+ compoundCommand.add(new ICommandProxy(new SetBoundsCommand(editPart.getEditingDomain(), DiagramUIMessages.MoveLabelCommand_Label_Location, new EObjectAdapter((View) editPart.getModel()), updatedBounds)));
+ compoundCommand.add(new RefreshCommandForDo(editPart));
+ return compoundCommand;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/META-INF/MANIFEST.MF
index 3e177b64934..c9fa9006b46 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/META-INF/MANIFEST.MF
@@ -1,88 +1,88 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.diagram.usecase,
- org.eclipse.papyrus.uml.diagram.usecase.command,
- org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts,
- org.eclipse.papyrus.uml.diagram.usecase.custom.factory,
- org.eclipse.papyrus.uml.diagram.usecase.custom.providers,
- org.eclipse.papyrus.uml.diagram.usecase.draw2d,
- org.eclipse.papyrus.uml.diagram.usecase.edit.commands,
- org.eclipse.papyrus.uml.diagram.usecase.edit.helpers,
- org.eclipse.papyrus.uml.diagram.usecase.edit.parts,
- org.eclipse.papyrus.uml.diagram.usecase.edit.policies,
- org.eclipse.papyrus.uml.diagram.usecase.expressions,
- org.eclipse.papyrus.uml.diagram.usecase.figure,
- org.eclipse.papyrus.uml.diagram.usecase.handler,
- org.eclipse.papyrus.uml.diagram.usecase.helper,
- org.eclipse.papyrus.uml.diagram.usecase.navigator,
- org.eclipse.papyrus.uml.diagram.usecase.parsers,
- org.eclipse.papyrus.uml.diagram.usecase.part,
- org.eclipse.papyrus.uml.diagram.usecase.preferences,
- org.eclipse.papyrus.uml.diagram.usecase.providers,
- org.eclipse.papyrus.uml.diagram.usecase.sheet,
- org.eclipse.papyrus.uml.diagram.usecase.ui
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.core.expressions,
- org.eclipse.jface,
- org.eclipse.ui.ide,
- org.eclipse.ui.views,
- org.eclipse.gmf.runtime.emf.core,
- org.eclipse.gmf.runtime.emf.commands.core,
- org.eclipse.gmf.runtime.emf.ui.properties,
- org.eclipse.gmf.runtime.diagram.ui,
- org.eclipse.gmf.runtime.diagram.ui.providers,
- org.eclipse.gmf.runtime.diagram.ui.providers.ide,
- org.eclipse.gmf.runtime.diagram.ui.render,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,
- org.eclipse.uml2.uml,
- org.eclipse.gmf.runtime.draw2d.ui,
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.1.0",
- org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0",
- org.eclipse.emf.validation,
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.profile;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.appearance;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.4.2",
- org.eclipse.ui.navigator;bundle-version="3.5.200",
- org.eclipse.ocl.ecore;bundle-version="3.2.0",
- org.eclipse.ui.navigator.resources;bundle-version="3.4.400",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0",
- org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
- org.eclipse.emf.ecore,
- org.eclipse.emf.ecore.xmi,
- org.eclipse.emf.edit.ui,
- org.eclipse.draw2d;visibility:=reexport,
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.emf.ecore.edit;visibility:=reexport,
- org.eclipse.gef,
- org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
- org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0"
-Bundle-Vendor: %providerName
-Eclipse-LazyStart: true
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.usecase.part.UMLDiag
- ramEditorPlugin
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.usecase; singleton:=true
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.uml.diagram.usecase,
+ org.eclipse.papyrus.uml.diagram.usecase.command,
+ org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts,
+ org.eclipse.papyrus.uml.diagram.usecase.custom.factory,
+ org.eclipse.papyrus.uml.diagram.usecase.custom.providers,
+ org.eclipse.papyrus.uml.diagram.usecase.draw2d,
+ org.eclipse.papyrus.uml.diagram.usecase.edit.commands,
+ org.eclipse.papyrus.uml.diagram.usecase.edit.helpers,
+ org.eclipse.papyrus.uml.diagram.usecase.edit.parts,
+ org.eclipse.papyrus.uml.diagram.usecase.edit.policies,
+ org.eclipse.papyrus.uml.diagram.usecase.expressions,
+ org.eclipse.papyrus.uml.diagram.usecase.figure,
+ org.eclipse.papyrus.uml.diagram.usecase.handler,
+ org.eclipse.papyrus.uml.diagram.usecase.helper,
+ org.eclipse.papyrus.uml.diagram.usecase.navigator,
+ org.eclipse.papyrus.uml.diagram.usecase.parsers,
+ org.eclipse.papyrus.uml.diagram.usecase.part,
+ org.eclipse.papyrus.uml.diagram.usecase.preferences,
+ org.eclipse.papyrus.uml.diagram.usecase.providers,
+ org.eclipse.papyrus.uml.diagram.usecase.sheet,
+ org.eclipse.papyrus.uml.diagram.usecase.ui
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.core.expressions,
+ org.eclipse.jface,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.views,
+ org.eclipse.gmf.runtime.emf.core,
+ org.eclipse.gmf.runtime.emf.commands.core,
+ org.eclipse.gmf.runtime.emf.ui.properties,
+ org.eclipse.gmf.runtime.diagram.ui,
+ org.eclipse.gmf.runtime.diagram.ui.providers,
+ org.eclipse.gmf.runtime.diagram.ui.providers.ide,
+ org.eclipse.gmf.runtime.diagram.ui.render,
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor,
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,
+ org.eclipse.uml2.uml,
+ org.eclipse.gmf.runtime.draw2d.ui,
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.1.0",
+ org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0",
+ org.eclipse.emf.validation,
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.profile;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.appearance;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.4.2",
+ org.eclipse.ui.navigator;bundle-version="3.5.200",
+ org.eclipse.ocl.ecore;bundle-version="3.2.0",
+ org.eclipse.ui.navigator.resources;bundle-version="3.4.400",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0",
+ org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.emf.edit.ui,
+ org.eclipse.draw2d;visibility:=reexport,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.gef,
+ org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
+ org.eclipse.core.databinding.observable
+Bundle-Vendor: %providerName
+Eclipse-LazyStart: true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.usecase.part.UMLDiagramEditorPlugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.usecase; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/CustomUseCaseEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/CustomUseCaseEditPartTN.java
index cbaa0b6f2d7..2612b172a94 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/CustomUseCaseEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/CustomUseCaseEditPartTN.java
@@ -18,6 +18,8 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseNodeFigure;
+@Deprecated
+// unused
public class CustomUseCaseEditPartTN extends UseCaseEditPartTN {
public CustomUseCaseEditPartTN(View view) {
@@ -27,7 +29,6 @@ public class CustomUseCaseEditPartTN extends UseCaseEditPartTN {
/**
* Use custom figure to return EllipseAnchors
*
- *
*/
@Override
protected NodeFigure createNodePlate() {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/CustomUseCasePointsEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/CustomUseCasePointsEditPartTN.java
index 08b810ffaaf..8c2446a8cf4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/CustomUseCasePointsEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/CustomUseCasePointsEditPartTN.java
@@ -13,8 +13,6 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts;
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCasePointsEditPartTN;
@@ -24,15 +22,15 @@ public class CustomUseCasePointsEditPartTN extends UseCasePointsEditPartTN {
super(view);
}
- /**
- * remove border
- */
- @Override
- public IFigure createFigure() {
- ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
- // remove border
- result.setBorder(null);
- result.setTitleVisibility(false);
- return result;
- }
+ // /**
+ // * remove border
+ // */
+ // @Override
+ // public IFigure createFigure() {
+ // ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ // // remove border
+ // result.setBorder(null);
+ // result.setTitleVisibility(false);
+ // return result;
+ // }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/SubjectNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/SubjectNodeEditPart.java
new file mode 100644
index 00000000000..d8a4e2ddbf9
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/SubjectNodeEditPart.java
@@ -0,0 +1,32 @@
+package org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts;
+
+import org.eclipse.draw2d.PositionConstants;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+
+/**
+ * @author Mickael ADAM
+ *
+ */
+abstract public class SubjectNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public SubjectNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart#getDefaultNamePosition()
+ *
+ * @return
+ */
+ @Override
+ protected int getDefaultNamePosition() {
+ return PositionConstants.LEFT;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/UseCaseNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/UseCaseNodeEditPart.java
new file mode 100644
index 00000000000..fd1cec2ba99
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/edit/parts/UseCaseNodeEditPart.java
@@ -0,0 +1,31 @@
+package org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts;
+
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+
+/**
+ * @author Mickael ADAM
+ *
+ */
+abstract public class UseCaseNodeEditPart extends RoundedCompartmentEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public UseCaseNodeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart#getDefaultIsOvalValue()
+ *
+ * @return
+ */
+ @Override
+ protected boolean getDefaultIsOvalValue() {
+ return true;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/factory/CustomUMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/factory/CustomUMLEditPartFactory.java
index d3b977b3628..89092882b11 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/factory/CustomUMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/custom/factory/CustomUMLEditPartFactory.java
@@ -17,17 +17,9 @@ import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.CustomAssociationEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.CustomShortCutDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.CustomUseCaseEditPartTN;
-import org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.CustomUseCaseInComponentEditPart;
-import org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.CustomUseCaseInPackageEditPart;
-import org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.CustomUseCasePointsEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ShortCutDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UMLEditPartFactory;
-import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseEditPartTN;
-import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInComponentEditPart;
-import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInPackageEditPart;
-import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCasePointsEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
/**
@@ -44,14 +36,14 @@ public class CustomUMLEditPartFactory extends UMLEditPartFactory {
return new CustomAssociationEditPart(view);
case ShortCutDiagramEditPart.VISUAL_ID:
return new CustomShortCutDiagramEditPart(view);
- case UseCaseEditPartTN.VISUAL_ID:
- return new CustomUseCaseEditPartTN(view);
- case UseCaseInComponentEditPart.VISUAL_ID:
- return new CustomUseCaseInComponentEditPart(view);
- case UseCaseInPackageEditPart.VISUAL_ID:
- return new CustomUseCaseInPackageEditPart(view);
- case UseCasePointsEditPartTN.VISUAL_ID:
- return new CustomUseCasePointsEditPartTN(view);
+ // case UseCaseEditPartTN.VISUAL_ID:
+ // return new CustomUseCaseEditPartTN(view);
+ // case UseCaseInComponentEditPart.VISUAL_ID:
+ // return new CustomUseCaseInComponentEditPart(view);
+ // case UseCaseInPackageEditPart.VISUAL_ID:
+ // return new CustomUseCaseInPackageEditPart(view);
+ // case UseCasePointsEditPartTN.VISUAL_ID:
+ // return new CustomUseCasePointsEditPartTN(view);
}
}
return super.createEditPart(context, model);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/figure/SubjectFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/figure/SubjectFigure.java
index 69a043a4229..ffc24b65476 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/figure/SubjectFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/figure/SubjectFigure.java
@@ -13,105 +13,57 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.usecase.figure;
+import java.util.ArrayList;
import java.util.List;
-import org.eclipse.draw2d.AbstractLayout;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
/**
* this figure is the representation of a subject in the usecase diagram
*
*/
-public class SubjectFigure extends NodeNamedElementFigure {
+public class SubjectFigure extends RoundedCompartmentFigure {
- private final RectangleFigure shapeCompartment;
- /**
- * this is the layout manager in charge to place element in the enumeration
- *
- */
- private class SubjectLayoutManager extends AbstractLayout {
+ private final static String USE_CASES_CONTAINER_COMPARTMENT = "UseCaseContainerCompartment";
- /**
- * gap in x to display name stereotypes and qualified name
- */
- protected final int GAP_X = 10;
+ /** The List of Compartment */
+ private final static List<String> COMPARTMENT = new ArrayList<String>() {
- /**
- * gap in y to display the first label at the top of the package
- */
- protected final int GAP_Y = 5;
+ private static final long serialVersionUID = 1L;
- /**
- *
- * {@inheritDoc}
- */
- @Override
- protected Dimension calculatePreferredSize(IFigure container, int hint, int hint2) {
- int minimumWith = 0;
- int minimumHeight = 0;
- // display name
- if (getNameLabel() != null) {
- if (getNameLabel().getPreferredSize().width > minimumWith) {
- minimumWith = getNameLabel().getPreferredSize().width;
- }
- minimumHeight += getNameLabel().getPreferredSize().height;
- }
- return new Dimension(minimumWith, minimumHeight);
+ {
+ add(USE_CASES_CONTAINER_COMPARTMENT);
}
+ };
- /**
- *
- * {@inheritDoc}
- */
- @Override
- public void layout(IFigure container) {
- List<?> childrenList = container.getChildren();
- for (int i = 0; i < container.getChildren().size(); i++) {
- Rectangle bound = new Rectangle(((IFigure) childrenList.get(i)).getBounds());
- IFigure fig = ((IFigure) childrenList.get(i));
- fig.invalidate();
- Dimension pref = ((IFigure) childrenList.get(i)).getPreferredSize();
- fig.invalidate();
- Dimension prefConstraint = ((IFigure) childrenList.get(i)).getPreferredSize(container.getBounds().width - 40, -1);
- if (pref.width < prefConstraint.width) {
- bound.setSize(pref);
- } else {
- bound.setSize(prefConstraint);
- }
- if (i > 0) {
- bound.y = ((IFigure) childrenList.get(i - 1)).getBounds().getBottomLeft().y + 1;
- bound.x = getBounds().x + GAP_X;
- } else {
- bound.x = getBounds().x + GAP_X;
- bound.y = getBounds().y + GAP_Y;
- }
- ((IFigure) childrenList.get(i)).setBounds(bound);
- }
- // container
- Rectangle lastRectangle = getUseCasesContainerFigure().getBounds();
- lastRectangle.height = getBounds().y + getBounds().height - lastRectangle.y;
- lastRectangle.x = container.getBounds().x;
- lastRectangle.width = getBounds().width;
- // getPackageableElementFigure().setBounds(lastRectangle);
- if (getGMFUseCasesContainer() != null) {
- // getGMFPackageableElementContainer().setBounds(lastRectangle);
- }
- }
+ /**
+ * Default Constructor
+ */
+ public SubjectFigure() {
+ this(null);
}
- public SubjectFigure() {
- super();
- setLayoutManager(new SubjectLayoutManager());
- setOpaque(false);
- shapeCompartment = new RectangleFigure();
- add(shapeCompartment);
- getUseCasesContainerFigure().setFill(false);
+ /**
+ * Create a new Classifier figure with the given tag
+ *
+ * @param tagLabel
+ * a String that will be displayed at the top of the figure
+ */
+ public SubjectFigure(String tagLabel) {
+ super(COMPARTMENT, tagLabel);
+ }
+
+ /**
+ * Get the attribute's compartment figure
+ *
+ * @return
+ */
+ public IFigure getAttributeCompartmentFigure() {
+ return getCompartment(USE_CASES_CONTAINER_COMPARTMENT);
}
/**
@@ -119,14 +71,15 @@ public class SubjectFigure extends NodeNamedElementFigure {
*
* @return the gmf container
*/
- public ShapeCompartmentFigure getGMFUseCasesContainer() {
- if (shapeCompartment.getChildren().size() > 0) {
- return (ShapeCompartmentFigure) shapeCompartment.getChildren().get(0);
+ public ShapeCompartmentFigure getGMFExtensionPointContainer() {
+ if (getCompartment(USE_CASES_CONTAINER_COMPARTMENT).getChildren().size() > 0) {
+ return (ShapeCompartmentFigure) getCompartment(USE_CASES_CONTAINER_COMPARTMENT).getChildren().get(0);
}
return null;
}
public RectangleFigure getUseCasesContainerFigure() {
- return shapeCompartment;
+ return getCompartment(USE_CASES_CONTAINER_COMPARTMENT);
}
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/figure/UseCaseFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/figure/UseCaseFigure.java
index 235a8c96738..07a93b70a34 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/figure/UseCaseFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/figure/UseCaseFigure.java
@@ -13,40 +13,59 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.usecase.figure;
-import org.eclipse.draw2d.Border;
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Graphics;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.RectangleFigure;
-import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gmf.runtime.diagram.ui.figures.ShapeCompartmentFigure;
-import org.eclipse.papyrus.uml.diagram.common.draw2d.SplitEllipseLayout;
import org.eclipse.papyrus.uml.diagram.common.figure.node.IEllipseFigure;
import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusNodeUMLElementFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
/**
* The Class UseCaseFigure.
* modified by Patrick Tessier inorder to extends nodeName
*/
-public class UseCaseFigure extends NodeNamedElementFigure implements IPapyrusNodeUMLElementFigure, IEllipseFigure {
+public class UseCaseFigure extends RoundedCompartmentFigure implements IPapyrusNodeUMLElementFigure, IEllipseFigure {
+
+ /** The Attribute Compartment */
+ private final static String EXTENSION_POINT_COMPARTMENT = "extensionPointCompartment";
+
- private final RectangleFigure shapeCompartment;
+ /** The List of Compartment */
+ private final static List<String> COMPARTMENT = new ArrayList<String>() {
+
+ private static final long serialVersionUID = 1L;
+ {
+ add(EXTENSION_POINT_COMPARTMENT);
+ }
+ };
/**
- * Instantiates a new use case figure.
+ * Default Constructor
*/
public UseCaseFigure() {
- super();
- SplitEllipseLayout layoutThis = new SplitEllipseLayout();
- this.setLayoutManager(layoutThis);
- shapeCompartment = new RectangleFigure();
- add(shapeCompartment);
- shapeCompartment.setBorder(null);
- shapeCompartment.setLineWidth(10);
- shapeCompartment.setOpaque(false);
- shapeCompartment.setFill(false);
- this.setBorder(null);
+ this(null);
+ }
+
+ /**
+ * Create a new Classifier figure with the given tag
+ *
+ * @param tagLabel
+ * a String that will be displayed at the top of the figure
+ */
+ public UseCaseFigure(String tagLabel) {
+ super(COMPARTMENT, tagLabel);
+ }
+
+ /**
+ * Get the attribute's compartment figure
+ *
+ * @return
+ */
+ public IFigure getAttributeCompartmentFigure() {
+ return getCompartment(EXTENSION_POINT_COMPARTMENT);
}
/**
@@ -55,37 +74,55 @@ public class UseCaseFigure extends NodeNamedElementFigure implements IPapyrusNod
* @return the gmf container
*/
public ShapeCompartmentFigure getGMFExtensionPointContainer() {
- if (shapeCompartment.getChildren().size() > 0) {
- return (ShapeCompartmentFigure) shapeCompartment.getChildren().get(0);
+ if (getCompartment(EXTENSION_POINT_COMPARTMENT).getChildren().size() > 0) {
+ return (ShapeCompartmentFigure) getCompartment(EXTENSION_POINT_COMPARTMENT).getChildren().get(0);
}
return null;
}
public RectangleFigure getExtensionPointContainerFigure() {
- return shapeCompartment;
+ return getCompartment(EXTENSION_POINT_COMPARTMENT);
}
- @Override
- protected void setBorder(IFigure borderedFigure, Border border) {
- }
+ // private final RectangleFigure shapeCompartment;
+
+ /**
+ * Instantiates a new use case figure.
+ */
+ // public UseCaseFigure() {
+ // super();
+ // SplitEllipseLayout layoutThis = new SplitEllipseLayout();
+ // this.setLayoutManager(layoutThis);
+ // shapeCompartment = new RectangleFigure();
+ // add(shapeCompartment);
+ // shapeCompartment.setBorder(null);
+ // shapeCompartment.setLineWidth(10);
+ // shapeCompartment.setOpaque(false);
+ // shapeCompartment.setFill(false);
+ // this.setBorder(null);
+ // }
- @Override
- public void paintFigure(Graphics graphics) {
- shapeCompartment.setForegroundColor(getBackgroundColor());
- graphics.fillOval(getBounds());
- paintBackground(graphics, getBounds());
- for (Object iterable_element : shapeCompartment.getChildren()) {
- ((IFigure) iterable_element).setForegroundColor(ColorConstants.black);
+ // @Override
+ // protected void setBorder(IFigure borderedFigure, Border border) {
+ // }
- }
- // shadowborder.setColor(getForegroundColor());
- }
+ // @Override
+ // public void paintFigure(Graphics graphics) {
+ // shapeCompartment.setForegroundColor(getBackgroundColor());
+ // graphics.fillOval(getBounds());
+ // paintBackground(graphics, getBounds());
+ // for (Object iterable_element : shapeCompartment.getChildren()) {
+ // ((IFigure) iterable_element).setForegroundColor(ColorConstants.black);
+ //
+ // }
+ // // shadowborder.setColor(getForegroundColor());
+ // }
- @Override
- protected void paintBackground(Graphics graphics, Rectangle rectangle) {
- graphics.setBackgroundColor(getBackgroundColor());
- graphics.setForegroundColor(getForegroundColor());
- graphics.fillOval(rectangle);
- graphics.drawOval(rectangle);
- }
+ // @Override
+ // protected void paintBackground(Graphics graphics, Rectangle rectangle) {
+ // graphics.setBackgroundColor(getBackgroundColor());
+ // graphics.setForegroundColor(getForegroundColor());
+ // graphics.fillOval(rectangle);
+ // graphics.drawOval(rectangle);
+ // }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/models/usecaseDiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/models/usecaseDiagram.gmfgen
index bbc62231c81..e8ef21110cd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/models/usecaseDiagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/models/usecaseDiagram.gmfgen
@@ -1,3012 +1,3212 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
- xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
- <gmfgen:GenEditorGenerator
- packageNamePrefix="org.eclipse.papyrus.uml.diagram.usecase"
- modelID="UseCase"
- domainFileExtension="PapyrusUMLUsecase"
- dynamicTemplates="true"
- templateDirectory="/org.eclipse.papyrus.def/xtend/"
- copyrightText="Copyright (c) 2014 CEA LIST.&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation">
- <diagram
- visualID="1000"
- editPartClassName="UseCaseDiagramEditPart"
- itemSemanticEditPolicyClassName="UseCaseDiagramItemSemanticEditPolicy"
- canonicalEditPolicyClassName="UseCaseDiagramCanonicalEditPolicy"
- iconProviderPriority="Low"
- validationProviderPriority="Low"
- validationEnabled="true"
- validationDecorators="true"
- liveValidationUIFeedback="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="PackageEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomUseCaseDiagramItemSemanticEditPolicy"/>
- <domainDiagramElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3007"
- editPartClassName="ExtensionPointEditPart"
- itemSemanticEditPolicyClassName="ExtensionPointItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ExtensionPointCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ExtensionPointGraphicalNodeEditPolicy"
- createCommandClassName="ExtensionPointCreateCommand"
- containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.3 /0/@diagram/@compartments.5">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ExtensionPointEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.AppliedStereotypeExtensionPointLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExtensionPoint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/extensionPoint"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/extensionPoint"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3008"
- editPartClassName="ExtensionPointInRectangleEditPart"
- itemSemanticEditPolicyClassName="ExtensionPointInRectangleItemSemanticEditPolicy"
- notationViewFactoryClassName="ExtensionPoint2ViewFactory"
- canonicalEditPolicyClassName="ExtensionPointInRectangleCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ExtensionPointInRectangleGraphicalNodeEditPolicy"
- createCommandClassName="ExtensionPointInRectangleCreateCommand"
- containers="/0/@diagram/@compartments.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.AppliedStereotypeExtensionPointLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExtensionPoint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/extensionPoint"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/extensionPoint"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </labelModelFacet>
- </childNodes>
- <childNodes
- visualID="3009"
- editPartClassName="UseCaseInComponentEditPart"
- itemSemanticEditPolicyClassName="UseCaseInComponentItemSemanticEditPolicy"
- notationViewFactoryClassName="UseCase3ViewFactory"
- canonicalEditPolicyClassName="UseCaseInComponentCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.3"
- graphicalNodeEditPolicyClassName="UseCaseInComponentGraphicalNodeEditPolicy"
- createCommandClassName="UseCaseInComponentCreateCommand"
- containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.4 /0/@diagram/@compartments.6">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.2/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="140"
- height="60"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CreateExtensionPointEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/ownedUseCase"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/useCase"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5018"
- editPartClassName="UseCaseInComponentNameEditPart"
- itemSemanticEditPolicyClassName="UseCaseInComponentNameItemSemanticEditPolicy"
- notationViewFactoryClassName="UseCaseName3ViewFactory"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3016"
- editPartClassName="ComponentInComponentEditPart"
- itemSemanticEditPolicyClassName="ComponentInComponentItemSemanticEditPolicy"
- notationViewFactoryClassName="Component2ViewFactory"
- canonicalEditPolicyClassName="ComponentInComponentCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.4"
- graphicalNodeEditPolicyClassName="ComponentInComponentGraphicalNodeEditPolicy"
- createCommandClassName="ComponentInComponentCreateCommand"
- containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.4">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.4/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseSubjectFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="200"
- height="400"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5030"
- editPartClassName="ComponentInComponentNameEditPart"
- itemSemanticEditPolicyClassName="ComponentInComponentNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ComponentName2ViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getUseCaseSubjectFigure_name"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3015"
- editPartClassName="CommentEditPartCN"
- itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyCN"
- notationViewFactoryClassName="Comment2ViewFactory"
- canonicalEditPolicyClassName="CommentCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyCN"
- createCommandClassName="CommentCreateCommandCN"
- containers="/0/@diagram/@compartments.4 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.2 /0/@diagram/@compartments.8">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="CommentEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.3">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5028"
- editPartClassName="CommentBodyEditPartCN"
- itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCornerBentFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3017"
- editPartClassName="ConstraintInComponentEditPart"
- itemSemanticEditPolicyClassName="ConstraintInComponentItemSemanticEditPolicy"
- notationViewFactoryClassName="Constraint2ViewFactory"
- canonicalEditPolicyClassName="ConstraintInComponentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ConstraintInComponentGraphicalNodeEditPolicy"
- createCommandClassName="ConstraintInComponentCreateCommand"
- containers="/0/@diagram/@compartments.4 /0/@diagram/@compartments.6 /0/@diagram/@compartments.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ConstraintEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.2">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5029"
- editPartClassName="ConstraintInComponentNameEditPart"
- itemSemanticEditPolicyClassName="ConstraintInComponentNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintName2ViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6043"
- editPartClassName="ConstraintBodyInCEditPart"
- itemSemanticEditPolicyClassName="ConstraintBodyInCItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.4">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3018"
- editPartClassName="ActorInComponentEditPart"
- itemSemanticEditPolicyClassName="ActorInComponentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ActorInComponentCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ActorInComponentGraphicalNodeEditPolicy"
- createCommandClassName="ActorInComponentCreateCommand"
- containers="/0/@diagram/@compartments.4 /0/@diagram/@compartments.6">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.draw2d.StickMan">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="30"
- height="50"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ExternalNodeActorLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Actor"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5031"
- editPartClassName="ActorInComponentNameEditPart"
- itemSemanticEditPolicyClassName="ActorInComponentNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="20"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="6027"
- editPartClassName="ActorInComponentAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ActorInComponentAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="20"
- y="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.2"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="6041"
- editPartClassName="ActorQualifiedNameInCEditPart"
- itemSemanticEditPolicyClassName="ActorQualifiedNameInCItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.QualifiedNameWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="20"
- y="80"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3010"
- editPartClassName="ConstraintInPackageEditPart"
- itemSemanticEditPolicyClassName="ConstraintInPackageItemSemanticEditPolicy"
- notationViewFactoryClassName="Constraint3ViewFactory"
- canonicalEditPolicyClassName="ConstraintInPackageCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ConstraintInPackageGraphicalNodeEditPolicy"
- createCommandClassName="ConstraintInPackageCreateCommand"
- containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.8">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.5/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.2">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5020"
- editPartClassName="ConstraintInPackageNameEditPart"
- itemSemanticEditPolicyClassName="ConstraintInPackageNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ConstraintName3ViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6044"
- editPartClassName="ConstraintBodyInPEditPart"
- itemSemanticEditPolicyClassName="ConstraintBodyInPItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.4">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3011"
- editPartClassName="ActorInPackageEditPart"
- itemSemanticEditPolicyClassName="ActorInPackageItemSemanticEditPolicy"
- notationViewFactoryClassName="Actor3ViewFactory"
- canonicalEditPolicyClassName="ActorInPackageCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ActorInPackageGraphicalNodeEditPolicy"
- createCommandClassName="ActorInPackageCreateCommand"
- containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.8">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.draw2d.StickMan">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="30"
- height="50"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ExternalNodeActorLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Actor"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5021"
- editPartClassName="ActorInPackageNameEditPart"
- itemSemanticEditPolicyClassName="ActorInPackageNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ActorName3ViewFactory"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="20"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="6028"
- editPartClassName="ActorInPackageAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ActorInPackageAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="20"
- y="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.2"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="6040"
- editPartClassName="ActorQualifiedNameInPEditPart"
- itemSemanticEditPolicyClassName="ActorQualifiedNameInPItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.QualifiedNameWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="20"
- y="80"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </childNodes>
- <childNodes
- visualID="3012"
- editPartClassName="UseCaseInPackageEditPart"
- itemSemanticEditPolicyClassName="UseCaseInPackageItemSemanticEditPolicy"
- notationViewFactoryClassName="UseCase4ViewFactory"
- canonicalEditPolicyClassName="UseCaseInPackageCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.5"
- graphicalNodeEditPolicyClassName="UseCaseInPackageGraphicalNodeEditPolicy"
- createCommandClassName="UseCaseInPackageCreateCommand"
- containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.8">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.2/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="140"
- height="60"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CreateExtensionPointEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5022"
- editPartClassName="UseCaseInPackageNameEditPart"
- itemSemanticEditPolicyClassName="UseCaseInPackageNameItemSemanticEditPolicy"
- notationViewFactoryClassName="UseCaseName4ViewFactory"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3013"
- editPartClassName="ComponentInPackageEditPart"
- itemSemanticEditPolicyClassName="ComponentInPackageItemSemanticEditPolicy"
- notationViewFactoryClassName="Component3ViewFactory"
- canonicalEditPolicyClassName="ComponentInPackageCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.6"
- graphicalNodeEditPolicyClassName="ComponentInPackageGraphicalNodeEditPolicy"
- createCommandClassName="ComponentInPackageCreateCommand"
- containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.8">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.4/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseSubjectFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="200"
- height="400"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5023"
- editPartClassName="ComponentInPackageNameEditPart"
- itemSemanticEditPolicyClassName="ComponentInPackageNameItemSemanticEditPolicy"
- notationViewFactoryClassName="ComponentName3ViewFactory">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getUseCaseSubjectFigure_name"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <childNodes
- visualID="3014"
- editPartClassName="PackageEditPartCN"
- itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicyCN"
- notationViewFactoryClassName="Package3ViewFactory"
- canonicalEditPolicyClassName="PackageCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.7"
- graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicyCN"
- createCommandClassName="PackageCreateCommandCN"
- containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.8">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="150"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/nestedPackage"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5024"
- editPartClassName="PackageNameEditPartCN"
- itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicyCN"
- notationViewFactoryClassName="PackageName2ViewFactory"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </childNodes>
- <topLevelNodes
- visualID="2011"
- editPartClassName="ActorEditPartTN"
- itemSemanticEditPolicyClassName="ActorItemSemanticEditPolicyTN"
- canonicalEditPolicyClassName="ActorCanonicalEditPolicyTN"
- graphicalNodeEditPolicyClassName="ActorGraphicalNodeEditPolicyTN"
- createCommandClassName="ActorCreateCommandTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ActorEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.draw2d.StickMan">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="30"
- height="50"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ExternalNodeActorLayoutEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Actor"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5014"
- editPartClassName="ActorNameEditPartTN"
- itemSemanticEditPolicyClassName="ActorNameItemSemanticEditPolicyTN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.figure.node.PapyrusWrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="20"
- y="60"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="6029"
- editPartClassName="ActorAppliedStereotypeEditPartTN"
- itemSemanticEditPolicyClassName="ActorAppliedStereotypeItemSemanticEditPolicyTN"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="20"
- y="100"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.2"/>
- </labels>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="6037"
- editPartClassName="ActorQualifiedNameEditPartTN"
- itemSemanticEditPolicyClassName="ActorQualifiedNameLabelItemSemanticEditPolicyTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.QualifiedNameWrappingLabelFigure">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- x="20"
- y="80"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayExternalNodeEditPolicy"/>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2012"
- editPartClassName="ActorAsRectangleEditPartTN"
- itemSemanticEditPolicyClassName="ActorAsRectangleItemSemanticEditPolicyTN"
- notationViewFactoryClassName="Actor2ViewFactory"
- canonicalEditPolicyClassName="ActorAsRectangleCanonicalEditPolicyTN"
- graphicalNodeEditPolicyClassName="ActorAsRectangleGraphicalNodeEditPolicyTN"
- createCommandClassName="ActorAsRectangleCreateCommandTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- layoutType="TOOLBAR_LAYOUT"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.ActorAsRectangleFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="60"
- height="80"/>
- </viewmap>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Actor"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5015"
- editPartClassName="ActorAsRectangleNameEditPartTN"
- itemSemanticEditPolicyClassName="ActorAsRectangleNameItemSemanticEditPolicyTN"
- notationViewFactoryClassName="ActorName2ViewFactory"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getActorAsRectangleFigure_name"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2013"
- editPartClassName="UseCaseEditPartTN"
- itemSemanticEditPolicyClassName="UseCaseItemSemanticEditPolicyTN"
- canonicalEditPolicyClassName="UseCaseCanonicalEditPolicyTN"
- compartments="/0/@diagram/@compartments.0"
- graphicalNodeEditPolicyClassName="UseCaseGraphicalNodeEditPolicyTN"
- createCommandClassName="UseCaseCreateCommandTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="UseCaseEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="140"
- height="60"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CreateExtensionPointEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5016"
- editPartClassName="UseCaseNameEditPartTN"
- itemSemanticEditPolicyClassName="UseCaseNameItemSemanticEditPolicyTN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2014"
- editPartClassName="UseCaseAsRectangleEditPartTN"
- itemSemanticEditPolicyClassName="UseCaseAsRectangleItemSemanticEditPolicyTN"
- notationViewFactoryClassName="UseCase2ViewFactory"
- canonicalEditPolicyClassName="UseCaseAsRectangleCanonicalEditPolicyTN"
- compartments="/0/@diagram/@compartments.1"
- graphicalNodeEditPolicyClassName="UseCaseAsRectangleGraphicalNodeEditPolicyTN"
- createCommandClassName="UseCaseAsRectangleCreateCommandTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.2/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseClassifierFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5017"
- editPartClassName="UseCaseAsRectangleNameEditPartTN"
- itemSemanticEditPolicyClassName="UseCaseAsRectangleNameItemSemanticEditPolicyTN"
- notationViewFactoryClassName="UseCaseName2ViewFactory"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2015"
- editPartClassName="SubjectClassifierEditPartTN"
- itemSemanticEditPolicyClassName="SubjectClassifierItemSemanticEditPolicyTN"
- canonicalEditPolicyClassName="SubjectClassifierCanonicalEditPolicyTN"
- compartments="/0/@diagram/@compartments.2"
- graphicalNodeEditPolicyClassName="SubjectClassifiertGraphicalNodeEditPolicyTN"
- createCommandClassName="SubjectClassifierCreateCommandTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="SubjectEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.SubjectFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="200"
- height="400"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5019"
- editPartClassName="SubjectClassifierNameEditPartTN"
- itemSemanticEditPolicyClassName="SubjectClassifierNameItemSemanticEditPolicyTN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2016"
- editPartClassName="PackageEditPartTN"
- itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicyTN"
- notationViewFactoryClassName="Package2ViewFactory"
- canonicalEditPolicyClassName="PackageCanonicalEditPolicyTN"
- compartments="/0/@diagram/@compartments.8"
- graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicyTN"
- createCommandClassName="PackageCreateCommandTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="150"
- height="150"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5025"
- editPartClassName="PackageNameEditPartTN"
- itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicyTN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2017"
- editPartClassName="ConstraintEditPartTN"
- itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyTN"
- canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyTN"
- graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyTN"
- createCommandClassName="ConstraintCreateCommandTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.5/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.2">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5026"
- editPartClassName="ConstraintNameEditPartTN"
- itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicyTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6042"
- editPartClassName="ConstraintBodyEditPart"
- itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.4">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2018"
- editPartClassName="CommentEditPartTN"
- itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyTN"
- canonicalEditPolicyClassName="CommentCanonicalEditPolicyTN"
- graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyTN"
- createCommandClassName="CommentCreateCommandTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.4/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <behaviour
- xsi:type="gmfgen:OpenDiagramBehaviour"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.3">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </initializers>
- </modelElementInitializer>
- </modelFacet>
- <labels
- visualID="5027"
- editPartClassName="CommentBodyEditPartTN"
- itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicyTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCornerBentFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2022"
- editPartClassName="DefaultNamedElementEditPartTN"
- itemSemanticEditPolicyClassName="DefaultNamedElementItemSemanticEditPolicyTN"
- canonicalEditPolicyClassName="DefaultNamedElementCanonicalEditPolicyTN"
- graphicalNodeEditPolicyClassName="DefaultNamedElementEditPolicyTN"
- createCommandClassName="DefaultNamedElementCreateCommandTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.usecase.DefaultNamedElement_2022"
- displayName="DefaultNamedElement"
- editHelperClassName="DefaultNamedElementEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="50"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDefaultNamedElementItemSemanticEditPolicyTN"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- </modelFacet>
- <labels
- visualID="6039"
- editPartClassName="DefaultNamedElementNameEditPart"
- itemSemanticEditPolicyClassName="DefaultNamedElementNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editorPattern=""
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <topLevelNodes
- visualID="2019"
- editPartClassName="ShortCutDiagramEditPart"
- itemSemanticEditPolicyClassName="ShortCutDiagramItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ShortCutDiagramCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ShortCutDiagramGraphicalNodeEditPolicy"
- createCommandClassName="ShortCutDiagramCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- displayName="ShortCutDiagram"
- editHelperClassName="ShortCutDiagramEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DiagramNodeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="20"
- height="20"/>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.OPEN_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShortCutDiagramEditPolicy"/>
- <modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- </modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="5032">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram/name"/>
- </modelFacet>
- </labels>
- </topLevelNodes>
- <links
- visualID="4008"
- editPartClassName="IncludeEditPart"
- itemSemanticEditPolicyClassName="IncludeItemSemanticEditPolicy"
- createCommandClassName="IncludeCreateCommand"
- reorientCommandClassName="IncludeReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="IncludeEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Include"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/include"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/include"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Include/includingCase"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Include/addition"/>
- </modelFacet>
- <labels
- visualID="6006"
- editPartClassName="IncludeLink_fixedEditPart"
- itemSemanticEditPolicyClassName="IncludeLink_fixedItemSemanticEditPolicy"
- notationViewFactoryClassName="IncludeLink_fixedViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.IncludeLink_fixed">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- <labels
- visualID="6030"
- editPartClassName="IncludeAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="IncludeAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.2"/>
- </labels>
- </links>
- <links
- visualID="4009"
- editPartClassName="ExtendEditPart"
- itemSemanticEditPolicyClassName="ExtendItemSemanticEditPolicy"
- createCommandClassName="ExtendCreateCommand"
- reorientCommandClassName="ExtendReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="ExtendEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Extend"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/extend"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/extend"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Extend/extension"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Extend/extendedCase"/>
- </modelFacet>
- <labels
- visualID="6007"
- editPartClassName="ExtendsLink_fixedEditPart"
- itemSemanticEditPolicyClassName="ExtendsLink_fixedItemSemanticEditPolicy"
- notationViewFactoryClassName="ExtendsLink_fixedViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.ExtendsLink_fixed">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.1"/>
- </labels>
- <labels
- visualID="6031"
- editPartClassName="ExtendAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="ExtendAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.2"/>
- </labels>
- </links>
- <links
- visualID="4010"
- editPartClassName="GeneralizationEditPart"
- itemSemanticEditPolicyClassName="GeneralizationItemSemanticEditPolicy"
- createCommandClassName="GeneralizationCreateCommand"
- reorientCommandClassName="GeneralizationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="GeneralizationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.GeneralizationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/specific"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/general"/>
- </modelFacet>
- <labels
- visualID="6032"
- editPartClassName="GeneralizationAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="GeneralizationAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.2"/>
- </labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.0/@expressions.0"
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.1"/>
- </links>
- <links
- visualID="4011"
- editPartClassName="AssociationEditPart"
- itemSemanticEditPolicyClassName="AssociationItemSemanticEditPolicy"
- createCommandClassName="AssociationCreateCommand"
- reorientCommandClassName="AssociationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="AssociationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.AssociationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet"
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.2">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.3">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
- </modelFacet>
- <labels
- visualID="6008"
- editPartClassName="AssociationNameEditPart"
- itemSemanticEditPolicyClassName="AssociationNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAssociationNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6033"
- editPartClassName="AssociationAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="AssociationAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.2"/>
- </labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.1/@expressions.1"
- targetEnd="/0/@expressionProviders/@providers.1/@expressions.1"/>
- </links>
- <links
- visualID="4012"
- editPartClassName="ConstraintConstrainedElementEditPart"
- itemSemanticEditPolicyClassName="ConstraintConstrainedElementItemSemanticEditPolicy"
- createCommandClassName="ConstraintConstrainedElementCreateCommand"
- reorientCommandClassName="ConstraintConstrainedElementReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
- </modelFacet>
- </links>
- <links
- visualID="4013"
- editPartClassName="DependencyEditPart"
- itemSemanticEditPolicyClassName="DependencyItemSemanticEditPolicy"
- createCommandClassName="DependencyCreateCommand"
- reorientCommandClassName="DependencyReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="DependencyEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet"
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.6">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
- </modelFacet>
- <labels
- visualID="6010"
- editPartClassName="DependencyNameEditPart"
- itemSemanticEditPolicyClassName="DependencyNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6034"
- editPartClassName="DependencyAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="DependencyAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.2"/>
- </labels>
- <creationConstraints
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.7"/>
- </links>
- <links
- visualID="4014"
- editPartClassName="CommentAnnotatedElementEditPart"
- itemSemanticEditPolicyClassName="CommentAnnotatedElementItemSemanticEditPolicy"
- createCommandClassName="CommentAnnotatedElementCreateCommand"
- reorientCommandClassName="CommentAnnotatedElementReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
- </modelFacet>
- </links>
- <links
- visualID="4015"
- editPartClassName="AbstractionEditPart"
- itemSemanticEditPolicyClassName="AbstractionItemSemanticEditPolicy"
- createCommandClassName="AbstractionCreateCommand"
- reorientCommandClassName="AbstractionReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="AbstractionEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeAbstractionLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet"
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.8">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Abstraction"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
- </modelFacet>
- <labels
- visualID="6011"
- editPartClassName="AbstractionNameEditPart"
- itemSemanticEditPolicyClassName="AbstractionNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6014"
- editPartClassName="AppliedStereotypeAbstractionEditPart"
- itemSemanticEditPolicyClassName="AbstractionName2ItemSemanticEditPolicy"
- notationViewFactoryClassName="AbstractionName2ViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.2"/>
- </labels>
- </links>
- <links
- visualID="4016"
- editPartClassName="UsageEditPart"
- itemSemanticEditPolicyClassName="UsageItemSemanticEditPolicy"
- createCommandClassName="UsageCreateCommand"
- reorientCommandClassName="UsageReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="UsageEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeUsageLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet"
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.9">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Usage"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
- </modelFacet>
- <labels
- visualID="6012"
- editPartClassName="UsageNameEditPart"
- itemSemanticEditPolicyClassName="UsageNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6013"
- editPartClassName="AppliedStereotypeUsageEditPart"
- itemSemanticEditPolicyClassName="UsageName2ItemSemanticEditPolicy"
- notationViewFactoryClassName="UsageName2ViewFactory"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.2"/>
- </labels>
- </links>
- <links
- visualID="4017"
- editPartClassName="RealizationEditPart"
- itemSemanticEditPolicyClassName="RealizationItemSemanticEditPolicy"
- createCommandClassName="RealizationCreateCommand"
- reorientCommandClassName="RealizationReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="RealizationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.InterfaceRealizationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet"
- modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.10">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Realization"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.1/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </initializers>
- </modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
- </modelFacet>
- <labels
- visualID="6015"
- editPartClassName="RealizationNameEditPart"
- itemSemanticEditPolicyClassName="RealizationNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
- </viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
- </modelFacet>
- </labels>
- <labels
- visualID="6035"
- editPartClassName="RealizationAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="RealizationAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.2"/>
- </labels>
- </links>
- <links
- visualID="4018"
- editPartClassName="PackageMergeEditPart"
- itemSemanticEditPolicyClassName="PackageMergeItemSemanticEditPolicy"
- createCommandClassName="PackageMergeCreateCommand"
- reorientCommandClassName="PackageMergeReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="PackageMergeEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypePackageMergeLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageMerge"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packageMerge"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packageMerge"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageMerge/receivingPackage"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageMerge/mergedPackage"/>
- </modelFacet>
- <labels
- editPartClassName="AppliedStereotypePackageMergeEditPart"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.2"/>
- </labels>
- </links>
- <links
- visualID="4019"
- editPartClassName="PackageImportEditPart"
- itemSemanticEditPolicyClassName="PackageImportItemSemanticEditPolicy"
- createCommandClassName="PackageImportCreateCommand"
- reorientCommandClassName="PackageImportReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- editHelperClassName="PackageImportEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypePackageImportLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/packageImport"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/packageImport"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport/importedPackage"/>
- </modelFacet>
- <labels
- visualID="6036"
- editPartClassName="PackageImportAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="PackageImportAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
- </viewmap>
- <modelFacet
- parser="/0/@labelParsers/@implementations.2"/>
- </labels>
- </links>
- <compartments
- visualID="7009"
- editPartClassName="UseCasePointsEditPartTN"
- itemSemanticEditPolicyClassName="UseCasePointsItemSemanticEditPolicyTN"
- canonicalEditPolicyClassName="UseCasePointsCanonicalEditPolicyTN"
- childNodes="/0/@diagram/@childNodes.0"
- title="points"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@topLevelNodes.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getExtensionPointContainerFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7010"
- editPartClassName="UseCasePointsInRectangleEditPart"
- itemSemanticEditPolicyClassName="UseCasePointsInRectangleItemSemanticEditPolicy"
- canonicalEditPolicyClassName="UseCasePointsInRectangleCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.1"
- title="points"
- node="/0/@diagram/@topLevelNodes.3">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getExtensionPointContainerFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7011"
- editPartClassName="SubjectComponentUsecasesEditPart"
- itemSemanticEditPolicyClassName="SubjectComponentUsecasesItemSemanticEditPolicy"
- canonicalEditPolicyClassName="SubjectComponentUsecasesCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5"
- title="use cases"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@topLevelNodes.4"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getUseCasesContainerFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7012"
- editPartClassName="UseCasePointsInComponentEditPart"
- itemSemanticEditPolicyClassName="UseCasePointsInComponentItemSemanticEditPolicy"
- notationViewFactoryClassName="UseCasePoints2ViewFactory"
- canonicalEditPolicyClassName="UseCasePointsInComponentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.0"
- title="points"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getExtensionPointContainerFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7017"
- editPartClassName="ComponentUsecases2EditPart"
- itemSemanticEditPolicyClassName="ComponentUsecases2ItemSemanticEditPolicy"
- notationViewFactoryClassName="ComponentUsecases2ViewFactory"
- canonicalEditPolicyClassName="ComponentUsecases2CanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6"
- title="use cases"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.3"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getUseCaseSubjectFigure_contents"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7014"
- editPartClassName="UseCasePointsInPackageEditPart"
- itemSemanticEditPolicyClassName="UseCasePointsInPackageItemSemanticEditPolicy"
- notationViewFactoryClassName="UseCasePoints3ViewFactory"
- canonicalEditPolicyClassName="UseCasePointsInPackageCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.0"
- title="points"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.9">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getExtensionPointContainerFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7015"
- editPartClassName="ComponentUsecases3EditPart"
- itemSemanticEditPolicyClassName="ComponentUsecases3ItemSemanticEditPolicy"
- notationViewFactoryClassName="ComponentUsecases3ViewFactory"
- canonicalEditPolicyClassName="ComponentUsecases3CanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6"
- title="use cases"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.10"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getUseCaseSubjectFigure_contents"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7016"
- editPartClassName="PackagePackageableElementCompartment2EditPart"
- itemSemanticEditPolicyClassName="PackagePackageableElementCompartment2ItemSemanticEditPolicy"
- notationViewFactoryClassName="PackagePackageableElementCompartment2ViewFactory"
- canonicalEditPolicyClassName="PackagePackageableElementCompartment2CanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.4"
- title="PackageableElementCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@childNodes.11"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <compartments
- visualID="7013"
- editPartClassName="PackagePackageableElementCompartmentEditPart"
- itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.4"
- title="PackageableElementCompartment"
- canCollapse="false"
- needsTitle="false"
- node="/0/@diagram/@topLevelNodes.5"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
- </compartments>
- <palette>
- <groups
- title="Nodes"
- description="Diagram Nodes"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- id="usecase.group.nodes"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Package"
- description="Create Package"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
- id="&quot;usecase.tool.package&quot;"
- genNodes="/0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.5"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Subject"
- description="Create Subject"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
- id="&quot;usecase.tool.subject&quot;"
- genNodes="/0/@diagram/@topLevelNodes.4 /0/@diagram/@childNodes.10"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Actor"
- description="Create Actor"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Actor.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Actor.gif"
- id="&quot;usecase.tool.actor&quot;"
- genNodes="/0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.8"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Use Case"
- description="Create Use Case"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/UseCase.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/UseCase.gif"
- id="&quot;usecase.tool.usecase&quot;"
- genNodes="/0/@diagram/@topLevelNodes.2 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.9"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Constraint"
- description="Create Constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- id="&quot;usecase.tool.constraint&quot;"
- genNodes="/0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@topLevelNodes.6"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Comment"
- description="Create Comment"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- id="&quot;usecase.tool.comment&quot;"
- genNodes="/0/@diagram/@childNodes.4 /0/@diagram/@topLevelNodes.7"/>
- </groups>
- <groups
- title="Children"
- description="Child Elements of the Diagram Nodes"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- id="&quot;usecase.group.children&quot;"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Extension Point"
- description="Create Extension Point"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExtensionPoint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExtensionPoint.gif"
- id="&quot;usecase.tool.extensionpoint&quot;"
- genNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.1"/>
- </groups>
- <groups
- title="Links"
- description="Diagram Links"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- id="&quot;usecase.group.links&quot;"
- stack="true"
- collapse="true">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Association"
- description="Create Association Link"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- id="&quot;usecase.tool.association&quot;"
- genLinks="/0/@diagram/@links.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Generalization"
- description="Create Generalization Link"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
- id="&quot;usecase.tool.generalization&quot;"
- genLinks="/0/@diagram/@links.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Dependency"
- description="Create Dependency Link"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- id="&quot;usecase.tool.dependency&quot;"
- genLinks="/0/@diagram/@links.5"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Abstraction"
- description="Create Abstraction Link"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
- id="&quot;usecase.tool.abstraction&quot;"
- genLinks="/0/@diagram/@links.7"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Realization"
- description="Create Realization Link"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
- id="&quot;usecase.tool.realization&quot;"
- genLinks="/0/@diagram/@links.9"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Usage"
- description="Create Usage Link"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
- id="&quot;usecase.tool.usage&quot;"
- genLinks="/0/@diagram/@links.8"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="PackageMerge"
- description="Create PackageMerge Link"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif"
- id="&quot;usecase.tool.packagemerge&quot;"
- genLinks="/0/@diagram/@links.10"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="PackageImport"
- description="Create PackageImport Link"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif"
- id="&quot;usecase.tool.packageimport&quot;"
- genLinks="/0/@diagram/@links.11"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Include"
- description="Create Include Link"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Include.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Include.gif"
- id="&quot;usecase.tool.include&quot;"
- genLinks="/0/@diagram/@links.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Extend"
- description="Create Extend"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Extend.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Extend.gif"
- id="&quot;usecase.tool.extend&quot;"
- genLinks="/0/@diagram/@links.1"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Constrained Element"
- description="Create Constrained Element"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- id="&quot;usecase.tool.constraintlink&quot;"
- genLinks="/0/@diagram/@links.4"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Comment link"
- description="Create Comment Link"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- id="&quot;usecase.tool.commentlink&quot;"
- genLinks="/0/@diagram/@links.6"/>
- </groups>
- </palette>
- <preferencePages
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.general"
- name="UML Diagram">
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.appearance"
- name="Appearance"
- kind="Appearance"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.connections"
- name="Connections"
- kind="Connections"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.printing"
- name="Printing"
- kind="Printing"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
- name="Rulers And Grid"
- kind="RulersAndGrid"/>
- </preferencePages>
- </diagram>
- <plugin
- iD="org.eclipse.papyrus.uml.diagram.usecase"
- name="Papyrus useCase editor Plugin"
- provider="Papyrus">
- <requiredPlugins>org.eclipse.draw2d</requiredPlugins>
- <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
- </plugin>
- <editor/>
- <navigator/>
- <diagramUpdater/>
- <propertySheet>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="appearance"/>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="diagram"/>
- <tabs
- xsi:type="gmfgen:GenCustomPropertyTab"
- iD="domain"
- label="Core">
- <filter
- xsi:type="gmfgen:TypeTabFilter">
- <types>org.eclipse.gmf.runtime.notation.View</types>
- <types>org.eclipse.gef.EditPart</types>
- <generatedTypes>abstractNavigatorItem</generatedTypes>
- </filter>
- </tabs>
- </propertySheet>
- <domainGenModel
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
- <expressionProviders>
- <providers
- xsi:type="gmfgen:GenExpressionInterpreter">
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::Actor) or self.oclIsKindOf(uml::UseCase) "/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::Actor) or self.oclIsKindOf(uml::UseCase) "/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="not self.oclIsTypeOf(uml::AssociationClass)"/>
- <expressions
- body="let sourceName : String = self.memberEnd->first().name in&#xD;&#xA;let targetName : String = self.memberEnd->at(2).name in&#xD;&#xA;'A_'.concat(sourceName).concat('_').concat(targetName)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::Actor) or self.oclIsKindOf(uml::UseCase) or self.oclIsKindOf(uml::Class) or or self.oclIsKindOf(uml::Component)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsKindOf(uml::Actor) or self.oclIsKindOf(uml::UseCase) or self.oclIsKindOf(uml::Class) or or self.oclIsKindOf(uml::Component)"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsTypeOf(uml::Dependency) and self.supplier->size() = 1 and self.client->size() = 1 and self.supplier->forAll(e|not e.oclIsKindOf(uml::Interface))"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="not self.oclIsKindOf(uml::Interface)&#xD;&#xA;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsTypeOf(uml::Abstraction) and self.supplier->size() = 1 and self.client->size() = 1 and self.supplier->forAll(e|not e.oclIsKindOf(uml::Interface))"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsTypeOf(uml::Usage) and self.supplier->size() = 1 and self.client->size() = 1 and self.supplier->forAll(e|not e.oclIsKindOf(uml::Interface))"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="self.oclIsTypeOf(uml::Realization) and self.supplier->size() = 1 and self.client->size() = 1 and self.supplier->forAll(e|not e.oclIsKindOf(uml::Interface))"/>
- </providers>
- <providers
- xsi:type="gmfgen:GenJavaExpressionProvider"
- throwException="false"
- injectExpressionBody="true">
- <expressions
- body="return org.eclipse.papyrus.uml.tools.utils.NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="if( (source instanceof org.eclipse.uml2.uml.Class)||(source instanceof org.eclipse.uml2.uml.Component)||(source instanceof org.eclipse.uml2.uml.Actor)||(source instanceof org.eclipse.uml2.uml.UseCase)){&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if((target instanceof org.eclipse.uml2.uml.Class)||(target instanceof org.eclipse.uml2.uml.Component)||(target instanceof org.eclipse.uml2.uml.Actor)||(target instanceof org.eclipse.uml2.uml.UseCase)){&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if( (source instanceof org.eclipse.uml2.uml.UseCase)&amp;&amp;(target instanceof org.eclipse.uml2.uml.UseCase)){&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return (Collections.disjoint(((org.eclipse.uml2.uml.UseCase) source).getSubjects(),((org.eclipse.uml2.uml.UseCase) target).getSubjects()));&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return true;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;else{return false;}"/>
- <expressions
- body="// Constraint specification init&#xD;&#xA;org.eclipse.uml2.uml.LiteralString value = org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();&#xD;&#xA;value.setValue(&quot;&quot;);&#xD;&#xA;return value;"/>
- <expressions
- body="// Comment body init&#xD;&#xA;return &quot;&quot;;"/>
- </providers>
- </expressionProviders>
- <labelParsers
- extensibleViaService="true">
- <implementations
- xsi:type="gmfgen:PredefinedParser"
- uses="/0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.1/@labels.0/@modelFacet /0/@diagram/@childNodes.0/@labelModelFacet /0/@diagram/@topLevelNodes.2/@labels.0/@modelFacet /0/@diagram/@childNodes.1/@labelModelFacet /0/@diagram/@topLevelNodes.3/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@labels.0/@modelFacet /0/@diagram/@childNodes.5/@labels.0/@modelFacet /0/@diagram/@childNodes.6/@labels.0/@modelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.11/@labels.0/@modelFacet /0/@diagram/@childNodes.3/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.4/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.0/@modelFacet /0/@diagram/@links.3/@labels.0/@modelFacet /0/@diagram/@links.5/@labels.0/@modelFacet /0/@diagram/@links.7/@labels.0/@modelFacet /0/@diagram/@links.8/@labels.0/@modelFacet /0/@diagram/@links.9/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.9/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.8/@labels.0/@modelFacet"/>
- <implementations
- xsi:type="gmfgen:ExternalParser"
- uses="/0/@diagram/@links.0/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.2/@modelFacet /0/@diagram/@childNodes.6/@labels.2/@modelFacet /0/@diagram/@childNodes.8/@labels.2/@modelFacet"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.10/@labels.0/@modelFacet /0/@diagram/@childNodes.6/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.1/@modelFacet /0/@diagram/@childNodes.8/@labels.1/@modelFacet /0/@diagram/@links.0/@labels.1/@modelFacet /0/@diagram/@links.1/@labels.1/@modelFacet /0/@diagram/@links.2/@labels.0/@modelFacet /0/@diagram/@links.3/@labels.1/@modelFacet /0/@diagram/@links.5/@labels.1/@modelFacet /0/@diagram/@links.7/@labels.1/@modelFacet /0/@diagram/@links.8/@labels.1/@modelFacet /0/@diagram/@links.9/@labels.1/@modelFacet /0/@diagram/@links.11/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@topLevelNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@topLevelNodes.6/@labels.1/@modelFacet /0/@diagram/@childNodes.5/@labels.1/@modelFacet /0/@diagram/@childNodes.7/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
- </labelParsers>
- <contextMenus
- iD="org.eclipse.papyrus.uml.diagram.usecase.part.LoadResourceAction"
- context="/0/@diagram">
- <items
- xsi:type="gmfgen:LoadResourceAction"
- qualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.part.LoadResourceAction"/>
- </contextMenus>
- </gmfgen:GenEditorGenerator>
- <papyrusgmfgenextension:PapyrusExtensionRootNode
- comment="Required Comment">
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="manage edit part that extends NamedElementEditPart in common"
- genView="/0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.9 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.3 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.10"
- name="NamedElementEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Label in charge to display applied stereotypes on links"
- genView="/0/@diagram/@links.0 /0/@diagram/@links.1 /0/@diagram/@links.2 /0/@diagram/@links.3 /0/@diagram/@links.5 /0/@diagram/@links.7 /0/@diagram/@links.8 /0/@diagram/@links.9 /0/@diagram/@links.10 /0/@diagram/@links.11"
- name="ExtendedUMLLinks"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="add superclass for short cut"
- genView="/0/@diagram/@topLevelNodes.9"
- name="AbstractShortCutDiagramEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortCutDiagramEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Name of the shorcut diagram"
- genView="/0/@diagram/@topLevelNodes.9/@labels.0"
- name="AbstractShortcutDiagramNameEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortcutDiagramNameEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="add superclass for compartment"
- genView="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.3 /0/@diagram/@compartments.5"
- name="ResizeableListCompartmentEditPart"
- superOwnedEditPart="org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="this is an extension to manage the comment"
- genView="/0/@diagram/@childNodes.4 /0/@diagram/@topLevelNodes.7"
- name="comment extended node"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Allow to extend PapyrusLabelEditPart"
- genView="/0/@diagram/@topLevelNodes.0/@labels.0"
- name="PapyrusLabelEditPart"
- superOwnedEditPart="org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="HiddenName"
- role="Name"
- iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png"
- linkLabels="/0/@diagram/@links.3/@labels.0"
- visibleByDefault="false"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Name"
- role="Name"
- iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png"
- linkLabels="/0/@diagram/@links.5/@labels.0 /0/@diagram/@links.7/@labels.0 /0/@diagram/@links.8/@labels.0 /0/@diagram/@links.9/@labels.0"
- externalNodeLabels="/0/@diagram/@topLevelNodes.9/@labels.0 /0/@diagram/@childNodes.6/@labels.0 /0/@diagram/@childNodes.8/@labels.0 /0/@diagram/@topLevelNodes.0/@labels.0"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Stereotype"
- role="Stereotype"
- iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/stereotype.gif"
- linkLabels="/0/@diagram/@links.0/@labels.1 /0/@diagram/@links.1/@labels.1 /0/@diagram/@links.2/@labels.0 /0/@diagram/@links.3/@labels.1 /0/@diagram/@links.5/@labels.1 /0/@diagram/@links.7/@labels.1 /0/@diagram/@links.8/@labels.1 /0/@diagram/@links.9/@labels.1 /0/@diagram/@links.10/@labels.0 /0/@diagram/@links.11/@labels.0"
- externalNodeLabels="/0/@diagram/@childNodes.6/@labels.1 /0/@diagram/@childNodes.8/@labels.1 /0/@diagram/@topLevelNodes.0/@labels.1"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Manages stereotype shown with External Label"
- genView="/0/@diagram/@links.0/@labels.1 /0/@diagram/@links.1/@labels.1 /0/@diagram/@links.2/@labels.0 /0/@diagram/@links.3/@labels.1 /0/@diagram/@links.5/@labels.1 /0/@diagram/@links.7/@labels.1 /0/@diagram/@links.8/@labels.1 /0/@diagram/@links.9/@labels.1 /0/@diagram/@links.10/@labels.0 /0/@diagram/@links.11/@labels.0 /0/@diagram/@childNodes.6/@labels.1 /0/@diagram/@childNodes.8/@labels.1 /0/@diagram/@topLevelNodes.0/@labels.1"
- name="EP_Stereotypes_EXT_NODE"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:EditPartUsingReorientService"
- comment="Use the edit service for reorient command (All DirectedRelationship)"
- name="DirectedRelationship"
- genView="/0/@diagram/@links.0 /0/@diagram/@links.1 /0/@diagram/@links.2 /0/@diagram/@links.5 /0/@diagram/@links.7 /0/@diagram/@links.8 /0/@diagram/@links.9"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:EditPartUsingDeleteService"
- comment="List of editpart using the delete service"
- name="DeleteService editpart List"
- genView="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.0 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.6 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.9 /0/@diagram/@links.0 /0/@diagram/@links.1 /0/@diagram/@links.2 /0/@diagram/@links.3 /0/@diagram/@links.4 /0/@diagram/@links.5 /0/@diagram/@links.6 /0/@diagram/@links.7 /0/@diagram/@links.8 /0/@diagram/@links.9 /0/@diagram/@links.10 /0/@diagram/@links.11"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="to manage SubjectNodes"
- genView="/0/@diagram/@topLevelNodes.4"
- name="SubjectNodes"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Super class to dispay qaulified name of an actor"
- genView="/0/@diagram/@topLevelNodes.0/@labels.2"
- name="QualifiedNameActor"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="It specify the super class for the shape editpart"
- name="AbstractShapeEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShapeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
- comment="External node label locator"
- classpath="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator"
- genExternalNodeLabel="/0/@diagram/@topLevelNodes.0/@labels.0 /0/@diagram/@topLevelNodes.0/@labels.2 /0/@diagram/@topLevelNodes.0/@labels.1 /0/@diagram/@childNodes.6/@labels.0 /0/@diagram/@childNodes.8/@labels.0 /0/@diagram/@childNodes.6/@labels.1 /0/@diagram/@childNodes.8/@labels.1 /0/@diagram/@childNodes.6/@labels.2 /0/@diagram/@childNodes.8/@labels.2"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="this is an extension for constraint "
- genView="/0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7"
- name="ConstraintEditPart extension"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Extends UMLNodeEditPart"
- genView="/0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.6"
- name="Actor Stickman inherits of UMLNodeEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:CustomDiagramUpdaterSingleton"
- comment="specify behavior for get Node"
- singletonPath="org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.CustomUMLDiagramUpdater.INSTANCE"/>
- </papyrusgmfgenextension:PapyrusExtensionRootNode>
-</xmi:XMI>
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
+ xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
+ <gmfgen:GenEditorGenerator
+ packageNamePrefix="org.eclipse.papyrus.uml.diagram.usecase"
+ modelID="UseCase"
+ domainFileExtension="PapyrusUMLUsecase"
+ dynamicTemplates="true"
+ templateDirectory="/org.eclipse.papyrus.def/xtend/"
+ copyrightText="Copyright (c) 2014 CEA LIST.&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation">
+ <diagram
+ visualID="1000"
+ editPartClassName="UseCaseDiagramEditPart"
+ itemSemanticEditPolicyClassName="UseCaseDiagramItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="UseCaseDiagramCanonicalEditPolicy"
+ iconProviderPriority="Low"
+ validationProviderPriority="Low"
+ validationEnabled="true"
+ validationDecorators="true"
+ liveValidationUIFeedback="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="PackageEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomUseCaseDiagramItemSemanticEditPolicy"/>
+ <domainDiagramElement
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3007"
+ editPartClassName="ExtensionPointEditPart"
+ itemSemanticEditPolicyClassName="ExtensionPointItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ExtensionPointCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ExtensionPointGraphicalNodeEditPolicy"
+ createCommandClassName="ExtensionPointCreateCommand"
+ containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.3 /0/@diagram/@compartments.5">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ExtensionPointEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.AppliedStereotypeExtensionPointLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExtensionPoint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/extensionPoint"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/extensionPoint"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ xsi:type="gmfgen:GenChildLabelNode"
+ visualID="3008"
+ editPartClassName="ExtensionPointInRectangleEditPart"
+ itemSemanticEditPolicyClassName="ExtensionPointInRectangleItemSemanticEditPolicy"
+ notationViewFactoryClassName="ExtensionPoint2ViewFactory"
+ canonicalEditPolicyClassName="ExtensionPointInRectangleCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ExtensionPointInRectangleGraphicalNodeEditPolicy"
+ createCommandClassName="ExtensionPointInRectangleCreateCommand"
+ containers="/0/@diagram/@compartments.1">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.0/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.AppliedStereotypeExtensionPointLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ExtensionPoint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/extensionPoint"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/extensionPoint"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labelModelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </labelModelFacet>
+ </childNodes>
+ <childNodes
+ visualID="3009"
+ editPartClassName="UseCaseInComponentEditPart"
+ itemSemanticEditPolicyClassName="UseCaseInComponentItemSemanticEditPolicy"
+ notationViewFactoryClassName="UseCase3ViewFactory"
+ canonicalEditPolicyClassName="UseCaseInComponentCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.3"
+ graphicalNodeEditPolicyClassName="UseCaseInComponentGraphicalNodeEditPolicy"
+ createCommandClassName="UseCaseInComponentCreateCommand"
+ containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.4 /0/@diagram/@compartments.6">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.2/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="140"
+ height="60"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CreateExtensionPointEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/ownedUseCase"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/useCase"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5018"
+ editPartClassName="UseCaseInComponentNameEditPart"
+ itemSemanticEditPolicyClassName="UseCaseInComponentNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="UseCaseName3ViewFactory"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6045"
+ editPartClassName="UseCaseInComponentFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="UseCaseFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3016"
+ editPartClassName="ComponentInComponentEditPart"
+ itemSemanticEditPolicyClassName="ComponentInComponentItemSemanticEditPolicy"
+ notationViewFactoryClassName="Component2ViewFactory"
+ canonicalEditPolicyClassName="ComponentInComponentCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.4"
+ graphicalNodeEditPolicyClassName="ComponentInComponentGraphicalNodeEditPolicy"
+ createCommandClassName="ComponentInComponentCreateCommand"
+ containers="/0/@diagram/@compartments.6 /0/@diagram/@compartments.4">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.4/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseSubjectFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="200"
+ height="400"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5030"
+ editPartClassName="ComponentInComponentNameEditPart"
+ itemSemanticEditPolicyClassName="ComponentInComponentNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ComponentName2ViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getUseCaseSubjectFigure_name"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3015"
+ editPartClassName="CommentEditPartCN"
+ itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyCN"
+ notationViewFactoryClassName="Comment2ViewFactory"
+ canonicalEditPolicyClassName="CommentCanonicalEditPolicyCN"
+ graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyCN"
+ createCommandClassName="CommentCreateCommandCN"
+ containers="/0/@diagram/@compartments.4 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.2 /0/@diagram/@compartments.8">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="CommentEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.3">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5028"
+ editPartClassName="CommentBodyEditPartCN"
+ itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicyCN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCornerBentFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3017"
+ editPartClassName="ConstraintInComponentEditPart"
+ itemSemanticEditPolicyClassName="ConstraintInComponentItemSemanticEditPolicy"
+ notationViewFactoryClassName="Constraint2ViewFactory"
+ canonicalEditPolicyClassName="ConstraintInComponentCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ConstraintInComponentGraphicalNodeEditPolicy"
+ createCommandClassName="ConstraintInComponentCreateCommand"
+ containers="/0/@diagram/@compartments.4 /0/@diagram/@compartments.6 /0/@diagram/@compartments.2">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ConstraintEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.2">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5029"
+ editPartClassName="ConstraintInComponentNameEditPart"
+ itemSemanticEditPolicyClassName="ConstraintInComponentNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ConstraintName2ViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6043"
+ editPartClassName="ConstraintBodyInCEditPart"
+ itemSemanticEditPolicyClassName="ConstraintBodyInCItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.4">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3018"
+ editPartClassName="ActorInComponentEditPart"
+ itemSemanticEditPolicyClassName="ActorInComponentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ActorInComponentCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ActorInComponentGraphicalNodeEditPolicy"
+ createCommandClassName="ActorInComponentCreateCommand"
+ containers="/0/@diagram/@compartments.4 /0/@diagram/@compartments.6">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="30"
+ height="50"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Actor"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/nestedClassifier"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5031"
+ editPartClassName="ActorInComponentNameEditPart"
+ itemSemanticEditPolicyClassName="ActorInComponentNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="20"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6027"
+ editPartClassName="ActorInComponentAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ActorInComponentAppliedStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="20"
+ y="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.2"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6041"
+ editPartClassName="ActorQualifiedNameInCEditPart"
+ itemSemanticEditPolicyClassName="ActorQualifiedNameInCItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.QualifiedNameWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="20"
+ y="80"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6050"
+ editPartClassName="ActorInComponentFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="ActorFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3010"
+ editPartClassName="ConstraintInPackageEditPart"
+ itemSemanticEditPolicyClassName="ConstraintInPackageItemSemanticEditPolicy"
+ notationViewFactoryClassName="Constraint3ViewFactory"
+ canonicalEditPolicyClassName="ConstraintInPackageCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ConstraintInPackageGraphicalNodeEditPolicy"
+ createCommandClassName="ConstraintInPackageCreateCommand"
+ containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.8">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.5/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/ownedRule"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.2">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5020"
+ editPartClassName="ConstraintInPackageNameEditPart"
+ itemSemanticEditPolicyClassName="ConstraintInPackageNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ConstraintName3ViewFactory">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6044"
+ editPartClassName="ConstraintBodyInPEditPart"
+ itemSemanticEditPolicyClassName="ConstraintBodyInPItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.4">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3011"
+ editPartClassName="ActorInPackageEditPart"
+ itemSemanticEditPolicyClassName="ActorInPackageItemSemanticEditPolicy"
+ notationViewFactoryClassName="Actor3ViewFactory"
+ canonicalEditPolicyClassName="ActorInPackageCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ActorInPackageGraphicalNodeEditPolicy"
+ createCommandClassName="ActorInPackageCreateCommand"
+ containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.8">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="30"
+ height="50"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Actor"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5021"
+ editPartClassName="ActorInPackageNameEditPart"
+ itemSemanticEditPolicyClassName="ActorInPackageNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ActorName3ViewFactory"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="20"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6028"
+ editPartClassName="ActorInPackageAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ActorInPackageAppliedStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="20"
+ y="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.2"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6040"
+ editPartClassName="ActorQualifiedNameInPEditPart"
+ itemSemanticEditPolicyClassName="ActorQualifiedNameInPItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.QualifiedNameWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="20"
+ y="80"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6049"
+ editPartClassName="ActorInPackageFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="ActorFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3012"
+ editPartClassName="UseCaseInPackageEditPart"
+ itemSemanticEditPolicyClassName="UseCaseInPackageItemSemanticEditPolicy"
+ notationViewFactoryClassName="UseCase4ViewFactory"
+ canonicalEditPolicyClassName="UseCaseInPackageCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.5"
+ graphicalNodeEditPolicyClassName="UseCaseInPackageGraphicalNodeEditPolicy"
+ createCommandClassName="UseCaseInPackageCreateCommand"
+ containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.8">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.2/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="140"
+ height="60"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CreateExtensionPointEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5022"
+ editPartClassName="UseCaseInPackageNameEditPart"
+ itemSemanticEditPolicyClassName="UseCaseInPackageNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="UseCaseName4ViewFactory"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6046"
+ editPartClassName="UseCaseInPackageFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="UseCaseFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3013"
+ editPartClassName="ComponentInPackageEditPart"
+ itemSemanticEditPolicyClassName="ComponentInPackageItemSemanticEditPolicy"
+ notationViewFactoryClassName="Component3ViewFactory"
+ canonicalEditPolicyClassName="ComponentInPackageCanonicalEditPolicy"
+ compartments="/0/@diagram/@compartments.6"
+ graphicalNodeEditPolicyClassName="ComponentInPackageGraphicalNodeEditPolicy"
+ createCommandClassName="ComponentInPackageCreateCommand"
+ containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.8">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.4/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.SubjectFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="200"
+ height="400"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Component"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5023"
+ editPartClassName="ComponentInPackageNameEditPart"
+ itemSemanticEditPolicyClassName="ComponentInPackageNameItemSemanticEditPolicy"
+ notationViewFactoryClassName="ComponentName3ViewFactory"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6051"
+ editPartClassName="ComponentInPackageFloatingLabelEditPart"
+ itemSemanticEditPolicyClassName="ComponentFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes
+ visualID="3014"
+ editPartClassName="PackageEditPartCN"
+ itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicyCN"
+ notationViewFactoryClassName="Package3ViewFactory"
+ canonicalEditPolicyClassName="PackageCanonicalEditPolicyCN"
+ compartments="/0/@diagram/@compartments.7"
+ graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicyCN"
+ createCommandClassName="PackageCreateCommandCN"
+ containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.8">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="150"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/nestedPackage"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5024"
+ editPartClassName="PackageNameEditPartCN"
+ itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicyCN"
+ notationViewFactoryClassName="PackageName2ViewFactory"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <topLevelNodes
+ visualID="2011"
+ editPartClassName="ActorEditPartTN"
+ itemSemanticEditPolicyClassName="ActorItemSemanticEditPolicyTN"
+ canonicalEditPolicyClassName="ActorCanonicalEditPolicyTN"
+ graphicalNodeEditPolicyClassName="ActorGraphicalNodeEditPolicyTN"
+ createCommandClassName="ActorCreateCommandTN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ActorEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="30"
+ height="50"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Actor"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5014"
+ editPartClassName="ActorNameEditPartTN"
+ itemSemanticEditPolicyClassName="ActorNameItemSemanticEditPolicyTN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="20"
+ y="60"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6029"
+ editPartClassName="ActorAppliedStereotypeEditPartTN"
+ itemSemanticEditPolicyClassName="ActorAppliedStereotypeItemSemanticEditPolicyTN"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.AppliedStereotypeWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="20"
+ y="100"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.2"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6037"
+ editPartClassName="ActorQualifiedNameEditPartTN"
+ itemSemanticEditPolicyClassName="ActorQualifiedNameLabelItemSemanticEditPolicyTN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.QualifiedNameWrappingLabelFigure">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ x="20"
+ y="80"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayExternalNodeEditPolicy"/>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6048"
+ editPartClassName="ActorFloatingLabelEditPartTN"
+ itemSemanticEditPolicyClassName="ActorFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2012"
+ editPartClassName="ActorAsRectangleEditPartTN"
+ itemSemanticEditPolicyClassName="ActorAsRectangleItemSemanticEditPolicyTN"
+ notationViewFactoryClassName="Actor2ViewFactory"
+ canonicalEditPolicyClassName="ActorAsRectangleCanonicalEditPolicyTN"
+ graphicalNodeEditPolicyClassName="ActorAsRectangleGraphicalNodeEditPolicyTN"
+ createCommandClassName="ActorAsRectangleCreateCommandTN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ layoutType="TOOLBAR_LAYOUT"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.ActorAsRectangleFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="60"
+ height="80"/>
+ </viewmap>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Actor"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5015"
+ editPartClassName="ActorAsRectangleNameEditPartTN"
+ itemSemanticEditPolicyClassName="ActorAsRectangleNameItemSemanticEditPolicyTN"
+ notationViewFactoryClassName="ActorName2ViewFactory"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getActorAsRectangleFigure_name"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2013"
+ editPartClassName="UseCaseEditPartTN"
+ itemSemanticEditPolicyClassName="UseCaseItemSemanticEditPolicyTN"
+ canonicalEditPolicyClassName="UseCaseCanonicalEditPolicyTN"
+ compartments="/0/@diagram/@compartments.0"
+ graphicalNodeEditPolicyClassName="UseCaseGraphicalNodeEditPolicyTN"
+ createCommandClassName="UseCaseCreateCommandTN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="UseCaseEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="140"
+ height="60"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CreateExtensionPointEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5016"
+ editPartClassName="UseCaseNameEditPartTN"
+ itemSemanticEditPolicyClassName="UseCaseNameItemSemanticEditPolicyTN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6038"
+ editPartClassName="UseCaseFloatingLabelEditPartTN"
+ itemSemanticEditPolicyClassName="UseCaseFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2014"
+ editPartClassName="UseCaseAsRectangleEditPartTN"
+ itemSemanticEditPolicyClassName="UseCaseAsRectangleItemSemanticEditPolicyTN"
+ notationViewFactoryClassName="UseCase2ViewFactory"
+ canonicalEditPolicyClassName="UseCaseAsRectangleCanonicalEditPolicyTN"
+ compartments="/0/@diagram/@compartments.1"
+ graphicalNodeEditPolicyClassName="UseCaseAsRectangleGraphicalNodeEditPolicyTN"
+ createCommandClassName="UseCaseAsRectangleCreateCommandTN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@topLevelNodes.2/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseClassifierFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5017"
+ editPartClassName="UseCaseAsRectangleNameEditPartTN"
+ itemSemanticEditPolicyClassName="UseCaseAsRectangleNameItemSemanticEditPolicyTN"
+ notationViewFactoryClassName="UseCaseName2ViewFactory"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2015"
+ editPartClassName="SubjectClassifierEditPartTN"
+ itemSemanticEditPolicyClassName="SubjectClassifierItemSemanticEditPolicyTN"
+ canonicalEditPolicyClassName="SubjectClassifierCanonicalEditPolicyTN"
+ compartments="/0/@diagram/@compartments.2"
+ graphicalNodeEditPolicyClassName="SubjectClassifiertGraphicalNodeEditPolicyTN"
+ createCommandClassName="SubjectClassifierCreateCommandTN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="SubjectEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.SubjectFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="200"
+ height="400"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.LAYOUT_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedType"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5019"
+ editPartClassName="SubjectClassifierNameEditPartTN"
+ itemSemanticEditPolicyClassName="SubjectClassifierNameItemSemanticEditPolicyTN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="6047"
+ editPartClassName="SubjectClassifierFloatingLabelEditPartTN"
+ itemSemanticEditPolicyClassName="ClassifierFloatingLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ viewPattern=""
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2016"
+ editPartClassName="PackageEditPartTN"
+ itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicyTN"
+ notationViewFactoryClassName="Package2ViewFactory"
+ canonicalEditPolicyClassName="PackageCanonicalEditPolicyTN"
+ compartments="/0/@diagram/@compartments.8"
+ graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicyTN"
+ createCommandClassName="PackageCreateCommandTN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="150"
+ height="150"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5025"
+ editPartClassName="PackageNameEditPartTN"
+ itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicyTN"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2017"
+ editPartClassName="ConstraintEditPartTN"
+ itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyTN"
+ canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyTN"
+ graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyTN"
+ createCommandClassName="ConstraintCreateCommandTN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.5/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.2">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5026"
+ editPartClassName="ConstraintNameEditPartTN"
+ itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicyTN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6042"
+ editPartClassName="ConstraintBodyEditPart"
+ itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getConstraintFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.4">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2018"
+ editPartClassName="CommentEditPartTN"
+ itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyTN"
+ canonicalEditPolicyClassName="CommentCanonicalEditPolicyTN"
+ graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyTN"
+ createCommandClassName="CommentCreateCommandTN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"
+ metamodelType="/0/@diagram/@childNodes.4/@elementType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <behaviour
+ xsi:type="gmfgen:OpenDiagramBehaviour"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusReflowableShapeEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.3">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels
+ visualID="5027"
+ editPartClassName="CommentBodyEditPartTN"
+ itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicyTN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getCornerBentFigure"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.3">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2022"
+ editPartClassName="DefaultNamedElementEditPartTN"
+ itemSemanticEditPolicyClassName="DefaultNamedElementItemSemanticEditPolicyTN"
+ canonicalEditPolicyClassName="DefaultNamedElementCanonicalEditPolicyTN"
+ graphicalNodeEditPolicyClassName="DefaultNamedElementEditPolicyTN"
+ createCommandClassName="DefaultNamedElementCreateCommandTN">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ uniqueIdentifier="org.eclipse.papyrus.uml.diagram.usecase.DefaultNamedElement_2022"
+ displayName="DefaultNamedElement"
+ editHelperClassName="DefaultNamedElementEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.NodeNamedElementFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="100"
+ height="50"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDefaultNamedElementItemSemanticEditPolicyTN"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ </modelFacet>
+ <labels
+ visualID="6039"
+ editPartClassName="DefaultNamedElementNameEditPart"
+ itemSemanticEditPolicyClassName="DefaultNamedElementNameItemSemanticEditPolicy"
+ elementIcon="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0"
+ editorPattern=""
+ editPattern="">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <topLevelNodes
+ visualID="2019"
+ editPartClassName="ShortCutDiagramEditPart"
+ itemSemanticEditPolicyClassName="ShortCutDiagramItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="ShortCutDiagramCanonicalEditPolicy"
+ graphicalNodeEditPolicyClassName="ShortCutDiagramGraphicalNodeEditPolicy"
+ createCommandClassName="ShortCutDiagramCreateCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ displayName="ShortCutDiagram"
+ editHelperClassName="ShortCutDiagramEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DiagramNodeFigure">
+ <attributes
+ xsi:type="gmfgen:DefaultSizeAttributes"
+ width="20"
+ height="20"/>
+ </viewmap>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.OPEN_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShortCutDiagramEditPolicy"/>
+ <modelFacet>
+ <metaClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
+ </modelFacet>
+ <labels
+ xsi:type="gmfgen:GenExternalNodeLabel"
+ visualID="5032">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram/name"/>
+ </modelFacet>
+ </labels>
+ </topLevelNodes>
+ <links
+ visualID="4008"
+ editPartClassName="IncludeEditPart"
+ itemSemanticEditPolicyClassName="IncludeItemSemanticEditPolicy"
+ createCommandClassName="IncludeCreateCommand"
+ reorientCommandClassName="IncludeReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="IncludeEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Include"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/include"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/include"/>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Include/includingCase"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Include/addition"/>
+ </modelFacet>
+ <labels
+ visualID="6006"
+ editPartClassName="IncludeLink_fixedEditPart"
+ itemSemanticEditPolicyClassName="IncludeLink_fixedItemSemanticEditPolicy"
+ notationViewFactoryClassName="IncludeLink_fixedViewFactory"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.IncludeLink_fixed">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ <labels
+ visualID="6030"
+ editPartClassName="IncludeAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="IncludeAppliedStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.2"/>
+ </labels>
+ </links>
+ <links
+ visualID="4009"
+ editPartClassName="ExtendEditPart"
+ itemSemanticEditPolicyClassName="ExtendItemSemanticEditPolicy"
+ createCommandClassName="ExtendCreateCommand"
+ reorientCommandClassName="ExtendReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="ExtendEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Extend"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/extend"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/UseCase/extend"/>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Extend/extension"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Extend/extendedCase"/>
+ </modelFacet>
+ <labels
+ visualID="6007"
+ editPartClassName="ExtendsLink_fixedEditPart"
+ itemSemanticEditPolicyClassName="ExtendsLink_fixedItemSemanticEditPolicy"
+ notationViewFactoryClassName="ExtendsLink_fixedViewFactory"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.ExtendsLink_fixed">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.1"/>
+ </labels>
+ <labels
+ visualID="6031"
+ editPartClassName="ExtendAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="ExtendAppliedStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.2"/>
+ </labels>
+ </links>
+ <links
+ visualID="4010"
+ editPartClassName="GeneralizationEditPart"
+ itemSemanticEditPolicyClassName="GeneralizationItemSemanticEditPolicy"
+ createCommandClassName="GeneralizationCreateCommand"
+ reorientCommandClassName="GeneralizationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="GeneralizationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.GeneralizationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/specific"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/general"/>
+ </modelFacet>
+ <labels
+ visualID="6032"
+ editPartClassName="GeneralizationAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="GeneralizationAppliedStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.2"/>
+ </labels>
+ <creationConstraints
+ sourceEnd="/0/@expressionProviders/@providers.0/@expressions.0"
+ targetEnd="/0/@expressionProviders/@providers.0/@expressions.1"/>
+ </links>
+ <links
+ visualID="4011"
+ editPartClassName="AssociationEditPart"
+ itemSemanticEditPolicyClassName="AssociationItemSemanticEditPolicy"
+ createCommandClassName="AssociationCreateCommand"
+ reorientCommandClassName="AssociationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="AssociationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.figure.AssociationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet"
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.2">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.0/@expressions.3">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
+ </modelFacet>
+ <labels
+ visualID="6008"
+ editPartClassName="AssociationNameEditPart"
+ itemSemanticEditPolicyClassName="AssociationNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAssociationNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6033"
+ editPartClassName="AssociationAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="AssociationAppliedStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.2"/>
+ </labels>
+ <creationConstraints
+ sourceEnd="/0/@expressionProviders/@providers.1/@expressions.1"
+ targetEnd="/0/@expressionProviders/@providers.1/@expressions.1"/>
+ </links>
+ <links
+ visualID="4012"
+ editPartClassName="ConstraintConstrainedElementEditPart"
+ itemSemanticEditPolicyClassName="ConstraintConstrainedElementItemSemanticEditPolicy"
+ createCommandClassName="ConstraintConstrainedElementCreateCommand"
+ reorientCommandClassName="ConstraintConstrainedElementReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4013"
+ editPartClassName="DependencyEditPart"
+ itemSemanticEditPolicyClassName="DependencyItemSemanticEditPolicy"
+ createCommandClassName="DependencyCreateCommand"
+ reorientCommandClassName="DependencyReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="DependencyEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet"
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.6">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ </modelFacet>
+ <labels
+ visualID="6010"
+ editPartClassName="DependencyNameEditPart"
+ itemSemanticEditPolicyClassName="DependencyNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6034"
+ editPartClassName="DependencyAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="DependencyAppliedStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.2"/>
+ </labels>
+ <creationConstraints
+ targetEnd="/0/@expressionProviders/@providers.0/@expressions.7"/>
+ </links>
+ <links
+ visualID="4014"
+ editPartClassName="CommentAnnotatedElementEditPart"
+ itemSemanticEditPolicyClassName="CommentAnnotatedElementItemSemanticEditPolicy"
+ createCommandClassName="CommentAnnotatedElementCreateCommand"
+ reorientCommandClassName="CommentAnnotatedElementReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:SpecializationType"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
+ </modelFacet>
+ </links>
+ <links
+ visualID="4015"
+ editPartClassName="AbstractionEditPart"
+ itemSemanticEditPolicyClassName="AbstractionItemSemanticEditPolicy"
+ createCommandClassName="AbstractionCreateCommand"
+ reorientCommandClassName="AbstractionReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="AbstractionEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeAbstractionLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet"
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.8">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Abstraction"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ </modelFacet>
+ <labels
+ visualID="6011"
+ editPartClassName="AbstractionNameEditPart"
+ itemSemanticEditPolicyClassName="AbstractionNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6014"
+ editPartClassName="AppliedStereotypeAbstractionEditPart"
+ itemSemanticEditPolicyClassName="AbstractionName2ItemSemanticEditPolicy"
+ notationViewFactoryClassName="AbstractionName2ViewFactory"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.2"/>
+ </labels>
+ </links>
+ <links
+ visualID="4016"
+ editPartClassName="UsageEditPart"
+ itemSemanticEditPolicyClassName="UsageItemSemanticEditPolicy"
+ createCommandClassName="UsageCreateCommand"
+ reorientCommandClassName="UsageReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="UsageEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeUsageLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet"
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.9">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Usage"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ </modelFacet>
+ <labels
+ visualID="6012"
+ editPartClassName="UsageNameEditPart"
+ itemSemanticEditPolicyClassName="UsageNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6013"
+ editPartClassName="AppliedStereotypeUsageEditPart"
+ itemSemanticEditPolicyClassName="UsageName2ItemSemanticEditPolicy"
+ notationViewFactoryClassName="UsageName2ViewFactory"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.2"/>
+ </labels>
+ </links>
+ <links
+ visualID="4017"
+ editPartClassName="RealizationEditPart"
+ itemSemanticEditPolicyClassName="RealizationItemSemanticEditPolicy"
+ createCommandClassName="RealizationCreateCommand"
+ reorientCommandClassName="RealizationReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="RealizationEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.InterfaceRealizationFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet"
+ modelElementSelector="/0/@expressionProviders/@providers.0/@expressions.10">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Realization"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer
+ xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers
+ xsi:type="gmfgen:GenFeatureValueSpec"
+ value="/0/@expressionProviders/@providers.1/@expressions.0">
+ <feature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ </modelFacet>
+ <labels
+ visualID="6015"
+ editPartClassName="RealizationNameEditPart"
+ itemSemanticEditPolicyClassName="RealizationNameItemSemanticEditPolicy">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getNameLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="40"/>
+ </viewmap>
+ <modelFacet
+ xsi:type="gmfgen:FeatureLabelModelFacet"
+ parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ <labels
+ visualID="6035"
+ editPartClassName="RealizationAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="RealizationAppliedStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.2"/>
+ </labels>
+ </links>
+ <links
+ visualID="4018"
+ editPartClassName="PackageMergeEditPart"
+ itemSemanticEditPolicyClassName="PackageMergeItemSemanticEditPolicy"
+ createCommandClassName="PackageMergeCreateCommand"
+ reorientCommandClassName="PackageMergeReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="PackageMergeEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypePackageMergeLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageMerge"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packageMerge"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packageMerge"/>
+ <sourceMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageMerge/receivingPackage"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageMerge/mergedPackage"/>
+ </modelFacet>
+ <labels
+ editPartClassName="AppliedStereotypePackageMergeEditPart"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.2"/>
+ </labels>
+ </links>
+ <links
+ visualID="4019"
+ editPartClassName="PackageImportEditPart"
+ itemSemanticEditPolicyClassName="PackageImportItemSemanticEditPolicy"
+ createCommandClassName="PackageImportCreateCommand"
+ reorientCommandClassName="PackageImportReorientCommand">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType
+ xsi:type="gmfgen:MetamodelType"
+ editHelperClassName="PackageImportEditHelper"/>
+ <viewmap
+ xsi:type="gmfgen:FigureViewmap"
+ figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypePackageImportLabelDisplayEditPolicy"/>
+ <modelFacet
+ xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport"/>
+ <containmentMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/packageImport"/>
+ <childMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/packageImport"/>
+ <targetMetaFeature
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport/importedPackage"/>
+ </modelFacet>
+ <labels
+ visualID="6036"
+ editPartClassName="PackageImportAppliedStereotypeEditPart"
+ itemSemanticEditPolicyClassName="PackageImportAppliedStereotypeItemSemanticEditPolicy"
+ readOnly="true">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getAppliedStereotypeLabel"
+ figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes
+ xsi:type="gmfgen:LabelOffsetAttributes"
+ y="-20"/>
+ </viewmap>
+ <modelFacet
+ parser="/0/@labelParsers/@implementations.2"/>
+ </labels>
+ </links>
+ <compartments
+ visualID="7009"
+ editPartClassName="UseCasePointsEditPartTN"
+ itemSemanticEditPolicyClassName="UseCasePointsItemSemanticEditPolicyTN"
+ canonicalEditPolicyClassName="UseCasePointsCanonicalEditPolicyTN"
+ childNodes="/0/@diagram/@childNodes.0"
+ title="points"
+ needsTitle="false"
+ node="/0/@diagram/@topLevelNodes.2">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getExtensionPointContainerFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7010"
+ editPartClassName="UseCasePointsInRectangleEditPart"
+ itemSemanticEditPolicyClassName="UseCasePointsInRectangleItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="UseCasePointsInRectangleCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.1"
+ title="points"
+ node="/0/@diagram/@topLevelNodes.3">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getExtensionPointContainerFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7011"
+ editPartClassName="SubjectComponentUsecasesEditPart"
+ itemSemanticEditPolicyClassName="SubjectComponentUsecasesItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="SubjectComponentUsecasesCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5"
+ title="use cases"
+ needsTitle="false"
+ node="/0/@diagram/@topLevelNodes.4"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getUseCasesContainerFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7012"
+ editPartClassName="UseCasePointsInComponentEditPart"
+ itemSemanticEditPolicyClassName="UseCasePointsInComponentItemSemanticEditPolicy"
+ notationViewFactoryClassName="UseCasePoints2ViewFactory"
+ canonicalEditPolicyClassName="UseCasePointsInComponentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.0"
+ title="points"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.2">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getExtensionPointContainerFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7017"
+ editPartClassName="ComponentUsecases2EditPart"
+ itemSemanticEditPolicyClassName="ComponentUsecases2ItemSemanticEditPolicy"
+ notationViewFactoryClassName="ComponentUsecases2ViewFactory"
+ canonicalEditPolicyClassName="ComponentUsecases2CanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6"
+ title="use cases"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.3"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getUseCaseSubjectFigure_contents"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7014"
+ editPartClassName="UseCasePointsInPackageEditPart"
+ itemSemanticEditPolicyClassName="UseCasePointsInPackageItemSemanticEditPolicy"
+ notationViewFactoryClassName="UseCasePoints3ViewFactory"
+ canonicalEditPolicyClassName="UseCasePointsInPackageCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.0"
+ title="points"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.9">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getExtensionPointContainerFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7015"
+ editPartClassName="ComponentUsecases3EditPart"
+ itemSemanticEditPolicyClassName="ComponentUsecases3ItemSemanticEditPolicy"
+ notationViewFactoryClassName="ComponentUsecases3ViewFactory"
+ canonicalEditPolicyClassName="ComponentUsecases3CanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6"
+ title="use cases"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.10"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getUseCasesContainerFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7016"
+ editPartClassName="PackagePackageableElementCompartment2EditPart"
+ itemSemanticEditPolicyClassName="PackagePackageableElementCompartment2ItemSemanticEditPolicy"
+ notationViewFactoryClassName="PackagePackageableElementCompartment2ViewFactory"
+ canonicalEditPolicyClassName="PackagePackageableElementCompartment2CanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.4"
+ title="PackageableElementCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@childNodes.11"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPackageableElementFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <compartments
+ visualID="7013"
+ editPartClassName="PackagePackageableElementCompartmentEditPart"
+ itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicy"
+ canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicy"
+ childNodes="/0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.4"
+ title="PackageableElementCompartment"
+ canCollapse="false"
+ needsTitle="false"
+ node="/0/@diagram/@topLevelNodes.5"
+ listLayout="false">
+ <diagramRunTimeClass
+ href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap
+ xsi:type="gmfgen:ParentAssignedViewmap"
+ getterName="getPackageableElementFigure"
+ figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour
+ xsi:type="gmfgen:CustomBehaviour"
+ key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
+ editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy"/>
+ </compartments>
+ <palette>
+ <groups
+ title="Nodes"
+ description="Diagram Nodes"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="usecase.group.nodes"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Package"
+ description="Create Package"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
+ id="&quot;usecase.tool.package&quot;"
+ genNodes="/0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.5"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Subject"
+ description="Create Subject"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
+ id="&quot;usecase.tool.subject&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.4 /0/@diagram/@childNodes.10"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Actor"
+ description="Create Actor"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Actor.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Actor.gif"
+ id="&quot;usecase.tool.actor&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.8"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Use Case"
+ description="Create Use Case"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/UseCase.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/UseCase.gif"
+ id="&quot;usecase.tool.usecase&quot;"
+ genNodes="/0/@diagram/@topLevelNodes.2 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.9"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Constraint"
+ description="Create Constraint"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ id="&quot;usecase.tool.constraint&quot;"
+ genNodes="/0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7 /0/@diagram/@topLevelNodes.6"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Comment"
+ description="Create Comment"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ id="&quot;usecase.tool.comment&quot;"
+ genNodes="/0/@diagram/@childNodes.4 /0/@diagram/@topLevelNodes.7"/>
+ </groups>
+ <groups
+ title="Children"
+ description="Child Elements of the Diagram Nodes"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="&quot;usecase.group.children&quot;"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Extension Point"
+ description="Create Extension Point"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExtensionPoint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExtensionPoint.gif"
+ id="&quot;usecase.tool.extensionpoint&quot;"
+ genNodes="/0/@diagram/@childNodes.0 /0/@diagram/@childNodes.1"/>
+ </groups>
+ <groups
+ title="Links"
+ description="Diagram Links"
+ largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="&quot;usecase.group.links&quot;"
+ stack="true"
+ collapse="true">
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Association"
+ description="Create Association Link"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ id="&quot;usecase.tool.association&quot;"
+ genLinks="/0/@diagram/@links.3"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Generalization"
+ description="Create Generalization Link"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
+ id="&quot;usecase.tool.generalization&quot;"
+ genLinks="/0/@diagram/@links.2"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Dependency"
+ description="Create Dependency Link"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ id="&quot;usecase.tool.dependency&quot;"
+ genLinks="/0/@diagram/@links.5"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Abstraction"
+ description="Create Abstraction Link"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
+ id="&quot;usecase.tool.abstraction&quot;"
+ genLinks="/0/@diagram/@links.7"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Realization"
+ description="Create Realization Link"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
+ id="&quot;usecase.tool.realization&quot;"
+ genLinks="/0/@diagram/@links.9"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Usage"
+ description="Create Usage Link"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
+ id="&quot;usecase.tool.usage&quot;"
+ genLinks="/0/@diagram/@links.8"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="PackageMerge"
+ description="Create PackageMerge Link"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif"
+ id="&quot;usecase.tool.packagemerge&quot;"
+ genLinks="/0/@diagram/@links.10"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="PackageImport"
+ description="Create PackageImport Link"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif"
+ id="&quot;usecase.tool.packageimport&quot;"
+ genLinks="/0/@diagram/@links.11"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Include"
+ description="Create Include Link"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Include.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Include.gif"
+ id="&quot;usecase.tool.include&quot;"
+ genLinks="/0/@diagram/@links.0"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Extend"
+ description="Create Extend"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Extend.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Extend.gif"
+ id="&quot;usecase.tool.extend&quot;"
+ genLinks="/0/@diagram/@links.1"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Constrained Element"
+ description="Create Constrained Element"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ id="&quot;usecase.tool.constraintlink&quot;"
+ genLinks="/0/@diagram/@links.4"/>
+ <entries
+ xsi:type="gmfgen:ToolEntry"
+ title="Comment link"
+ description="Create Comment Link"
+ largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ id="&quot;usecase.tool.commentlink&quot;"
+ genLinks="/0/@diagram/@links.6"/>
+ </groups>
+ </palette>
+ <preferencePages
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.general"
+ name="UML Diagram">
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.appearance"
+ name="Appearance"
+ kind="Appearance"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.connections"
+ name="Connections"
+ kind="Connections"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.printing"
+ name="Printing"
+ kind="Printing"/>
+ <children
+ xsi:type="gmfgen:GenStandardPreferencePage"
+ iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
+ name="Rulers And Grid"
+ kind="RulersAndGrid"/>
+ </preferencePages>
+ </diagram>
+ <plugin
+ iD="org.eclipse.papyrus.uml.diagram.usecase"
+ name="Papyrus useCase editor Plugin"
+ provider="Papyrus"
+ version="1.1.0.qualifier">
+ <requiredPlugins>org.eclipse.draw2d</requiredPlugins>
+ <requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
+ </plugin>
+ <editor/>
+ <navigator/>
+ <diagramUpdater/>
+ <propertySheet>
+ <tabs
+ xsi:type="gmfgen:GenStandardPropertyTab"
+ iD="appearance"/>
+ <tabs
+ xsi:type="gmfgen:GenStandardPropertyTab"
+ iD="diagram"/>
+ <tabs
+ xsi:type="gmfgen:GenCustomPropertyTab"
+ iD="domain"
+ label="Core">
+ <filter
+ xsi:type="gmfgen:TypeTabFilter">
+ <types>org.eclipse.gmf.runtime.notation.View</types>
+ <types>org.eclipse.gef.EditPart</types>
+ <generatedTypes>abstractNavigatorItem</generatedTypes>
+ </filter>
+ </tabs>
+ </propertySheet>
+ <domainGenModel
+ href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
+ <expressionProviders>
+ <providers
+ xsi:type="gmfgen:GenExpressionInterpreter">
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.oclIsKindOf(uml::Actor) or self.oclIsKindOf(uml::UseCase) "/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.oclIsKindOf(uml::Actor) or self.oclIsKindOf(uml::UseCase) "/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="not self.oclIsTypeOf(uml::AssociationClass)"/>
+ <expressions
+ body="let sourceName : String = self.memberEnd->first().name in&#xD;&#xA;let targetName : String = self.memberEnd->at(2).name in&#xD;&#xA;'A_'.concat(sourceName).concat('_').concat(targetName)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.oclIsKindOf(uml::Actor) or self.oclIsKindOf(uml::UseCase) or self.oclIsKindOf(uml::Class) or or self.oclIsKindOf(uml::Component)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.oclIsKindOf(uml::Actor) or self.oclIsKindOf(uml::UseCase) or self.oclIsKindOf(uml::Class) or or self.oclIsKindOf(uml::Component)"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.oclIsTypeOf(uml::Dependency) and self.supplier->size() = 1 and self.client->size() = 1 and self.supplier->forAll(e|not e.oclIsKindOf(uml::Interface))"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="not self.oclIsKindOf(uml::Interface)&#xD;&#xA;"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.oclIsTypeOf(uml::Abstraction) and self.supplier->size() = 1 and self.client->size() = 1 and self.supplier->forAll(e|not e.oclIsKindOf(uml::Interface))"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.oclIsTypeOf(uml::Usage) and self.supplier->size() = 1 and self.client->size() = 1 and self.supplier->forAll(e|not e.oclIsKindOf(uml::Interface))"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="self.oclIsTypeOf(uml::Realization) and self.supplier->size() = 1 and self.client->size() = 1 and self.supplier->forAll(e|not e.oclIsKindOf(uml::Interface))"/>
+ </providers>
+ <providers
+ xsi:type="gmfgen:GenJavaExpressionProvider"
+ throwException="false"
+ injectExpressionBody="true">
+ <expressions
+ body="return org.eclipse.papyrus.uml.tools.utils.NamedElementUtil.getDefaultNameWithIncrement(it, it.getOwner().eContents());"/>
+ <expressions
+ xsi:type="gmfgen:GenConstraint"
+ body="if( (source instanceof org.eclipse.uml2.uml.Class)||(source instanceof org.eclipse.uml2.uml.Component)||(source instanceof org.eclipse.uml2.uml.Actor)||(source instanceof org.eclipse.uml2.uml.UseCase)){&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if((target instanceof org.eclipse.uml2.uml.Class)||(target instanceof org.eclipse.uml2.uml.Component)||(target instanceof org.eclipse.uml2.uml.Actor)||(target instanceof org.eclipse.uml2.uml.UseCase)){&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if( (source instanceof org.eclipse.uml2.uml.UseCase)&amp;&amp;(target instanceof org.eclipse.uml2.uml.UseCase)){&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return (Collections.disjoint(((org.eclipse.uml2.uml.UseCase) source).getSubjects(),((org.eclipse.uml2.uml.UseCase) target).getSubjects()));&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return true;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;}&#xD;&#xA;else{return false;}"/>
+ <expressions
+ body="// Constraint specification init&#xD;&#xA;org.eclipse.uml2.uml.LiteralString value = org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();&#xD;&#xA;value.setValue(&quot;&quot;);&#xD;&#xA;return value;"/>
+ <expressions
+ body="// Comment body init&#xD;&#xA;return &quot;&quot;;"/>
+ </providers>
+ </expressionProviders>
+ <labelParsers
+ extensibleViaService="true">
+ <implementations
+ xsi:type="gmfgen:PredefinedParser"
+ uses="/0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.1/@labels.0/@modelFacet /0/@diagram/@childNodes.0/@labelModelFacet /0/@diagram/@topLevelNodes.2/@labels.0/@modelFacet /0/@diagram/@childNodes.1/@labelModelFacet /0/@diagram/@topLevelNodes.3/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@labels.0/@modelFacet /0/@diagram/@childNodes.5/@labels.0/@modelFacet /0/@diagram/@childNodes.6/@labels.0/@modelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.11/@labels.0/@modelFacet /0/@diagram/@childNodes.3/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.4/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.0/@modelFacet /0/@diagram/@links.3/@labels.0/@modelFacet /0/@diagram/@links.5/@labels.0/@modelFacet /0/@diagram/@links.7/@labels.0/@modelFacet /0/@diagram/@links.8/@labels.0/@modelFacet /0/@diagram/@links.9/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.9/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.8/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.2/@labels.1/@modelFacet /0/@diagram/@childNodes.2/@labels.1/@modelFacet /0/@diagram/@childNodes.9/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.4/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.3/@modelFacet /0/@diagram/@childNodes.8/@labels.3/@modelFacet /0/@diagram/@childNodes.6/@labels.3/@modelFacet /0/@diagram/@childNodes.10/@labels.1/@modelFacet"/>
+ <implementations
+ xsi:type="gmfgen:ExternalParser"
+ uses="/0/@diagram/@links.0/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.2/@modelFacet /0/@diagram/@childNodes.6/@labels.2/@modelFacet /0/@diagram/@childNodes.8/@labels.2/@modelFacet"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@links.10/@labels.0/@modelFacet /0/@diagram/@childNodes.6/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.1/@modelFacet /0/@diagram/@childNodes.8/@labels.1/@modelFacet /0/@diagram/@links.0/@labels.1/@modelFacet /0/@diagram/@links.1/@labels.1/@modelFacet /0/@diagram/@links.2/@labels.0/@modelFacet /0/@diagram/@links.3/@labels.1/@modelFacet /0/@diagram/@links.5/@labels.1/@modelFacet /0/@diagram/@links.7/@labels.1/@modelFacet /0/@diagram/@links.8/@labels.1/@modelFacet /0/@diagram/@links.9/@labels.1/@modelFacet /0/@diagram/@links.11/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@topLevelNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.4/@labels.0/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
+ <implementations
+ xsi:type="gmfgen:CustomParser"
+ uses="/0/@diagram/@topLevelNodes.6/@labels.1/@modelFacet /0/@diagram/@childNodes.5/@labels.1/@modelFacet /0/@diagram/@childNodes.7/@labels.1/@modelFacet"
+ qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
+ </labelParsers>
+ <contextMenus
+ iD="org.eclipse.papyrus.uml.diagram.usecase.part.LoadResourceAction"
+ context="/0/@diagram">
+ <items
+ xsi:type="gmfgen:LoadResourceAction"
+ qualifiedClassName="org.eclipse.papyrus.uml.diagram.usecase.part.LoadResourceAction"/>
+ </contextMenus>
+ </gmfgen:GenEditorGenerator>
+ <papyrusgmfgenextension:PapyrusExtensionRootNode
+ comment="Required Comment">
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="manage edit part that extends NamedElementEditPart in common"
+ genView="/0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.8 /0/@diagram/@topLevelNodes.3 /0/@diagram/@childNodes.3"
+ name="NamedElementEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Label in charge to display applied stereotypes on links"
+ genView="/0/@diagram/@links.0 /0/@diagram/@links.1 /0/@diagram/@links.2 /0/@diagram/@links.3 /0/@diagram/@links.5 /0/@diagram/@links.7 /0/@diagram/@links.8 /0/@diagram/@links.9 /0/@diagram/@links.10 /0/@diagram/@links.11"
+ name="ExtendedUMLLinks"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add superclass for short cut"
+ genView="/0/@diagram/@topLevelNodes.9"
+ name="AbstractShortCutDiagramEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortCutDiagramEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Name of the shorcut diagram"
+ genView="/0/@diagram/@topLevelNodes.9/@labels.0"
+ name="AbstractShortcutDiagramNameEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortcutDiagramNameEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add superclass for compartment"
+ genView="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.3 /0/@diagram/@compartments.5"
+ name="ResizeableListCompartmentEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="this is an extension to manage the comment"
+ genView="/0/@diagram/@childNodes.4 /0/@diagram/@topLevelNodes.7"
+ name="comment extended node"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Allow to extend PapyrusLabelEditPart"
+ genView="/0/@diagram/@topLevelNodes.0/@labels.0"
+ name="PapyrusLabelEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="HiddenName"
+ role="Name"
+ iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png"
+ linkLabels="/0/@diagram/@links.3/@labels.0"
+ visibleByDefault="false"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="Name"
+ role="Name"
+ iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png"
+ linkLabels="/0/@diagram/@links.5/@labels.0 /0/@diagram/@links.7/@labels.0 /0/@diagram/@links.8/@labels.0 /0/@diagram/@links.9/@labels.0"
+ externalNodeLabels="/0/@diagram/@topLevelNodes.9/@labels.0 /0/@diagram/@childNodes.6/@labels.0 /0/@diagram/@childNodes.8/@labels.0 /0/@diagram/@topLevelNodes.0/@labels.0"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
+ comment="Stereotype"
+ role="Stereotype"
+ iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/stereotype.gif"
+ linkLabels="/0/@diagram/@links.0/@labels.1 /0/@diagram/@links.1/@labels.1 /0/@diagram/@links.2/@labels.0 /0/@diagram/@links.3/@labels.1 /0/@diagram/@links.5/@labels.1 /0/@diagram/@links.7/@labels.1 /0/@diagram/@links.8/@labels.1 /0/@diagram/@links.9/@labels.1 /0/@diagram/@links.10/@labels.0 /0/@diagram/@links.11/@labels.0"
+ externalNodeLabels="/0/@diagram/@childNodes.6/@labels.1 /0/@diagram/@childNodes.8/@labels.1 /0/@diagram/@topLevelNodes.0/@labels.1"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Manages stereotype shown with External Label"
+ genView="/0/@diagram/@links.0/@labels.1 /0/@diagram/@links.1/@labels.1 /0/@diagram/@links.2/@labels.0 /0/@diagram/@links.3/@labels.1 /0/@diagram/@links.5/@labels.1 /0/@diagram/@links.7/@labels.1 /0/@diagram/@links.8/@labels.1 /0/@diagram/@links.9/@labels.1 /0/@diagram/@links.10/@labels.0 /0/@diagram/@links.11/@labels.0 /0/@diagram/@childNodes.6/@labels.1 /0/@diagram/@childNodes.8/@labels.1 /0/@diagram/@topLevelNodes.0/@labels.1"
+ name="EP_Stereotypes_EXT_NODE"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:EditPartUsingReorientService"
+ comment="Use the edit service for reorient command (All DirectedRelationship)"
+ name="DirectedRelationship"
+ genView="/0/@diagram/@links.0 /0/@diagram/@links.1 /0/@diagram/@links.2 /0/@diagram/@links.5 /0/@diagram/@links.7 /0/@diagram/@links.8 /0/@diagram/@links.9"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:EditPartUsingDeleteService"
+ comment="List of editpart using the delete service"
+ name="DeleteService editpart List"
+ genView="/0/@diagram/@childNodes.2 /0/@diagram/@childNodes.3 /0/@diagram/@childNodes.4 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@topLevelNodes.0 /0/@diagram/@topLevelNodes.1 /0/@diagram/@topLevelNodes.2 /0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.5 /0/@diagram/@topLevelNodes.6 /0/@diagram/@topLevelNodes.7 /0/@diagram/@topLevelNodes.9 /0/@diagram/@links.0 /0/@diagram/@links.1 /0/@diagram/@links.2 /0/@diagram/@links.3 /0/@diagram/@links.4 /0/@diagram/@links.5 /0/@diagram/@links.6 /0/@diagram/@links.7 /0/@diagram/@links.8 /0/@diagram/@links.9 /0/@diagram/@links.10 /0/@diagram/@links.11"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="Super class to dispay qaulified name of an actor"
+ genView="/0/@diagram/@topLevelNodes.0/@labels.2"
+ name="QualifiedNameActor"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="It specify the super class for the shape editpart"
+ name="AbstractShapeEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShapeEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
+ comment="External node label locator"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator"
+ genExternalNodeLabel="/0/@diagram/@topLevelNodes.0/@labels.0 /0/@diagram/@topLevelNodes.0/@labels.2 /0/@diagram/@topLevelNodes.0/@labels.1 /0/@diagram/@childNodes.6/@labels.0 /0/@diagram/@childNodes.8/@labels.0 /0/@diagram/@childNodes.6/@labels.1 /0/@diagram/@childNodes.8/@labels.1 /0/@diagram/@childNodes.6/@labels.2 /0/@diagram/@childNodes.8/@labels.2"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="this is an extension for constraint "
+ genView="/0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.5 /0/@diagram/@childNodes.7"
+ name="ConstraintEditPart extension"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:CustomDiagramUpdaterSingleton"
+ comment="specify behavior for get Node"
+ singletonPath="org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.CustomUMLDiagramUpdater.INSTANCE"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="add superclass for floating Label"
+ genView="/0/@diagram/@topLevelNodes.2/@labels.1 /0/@diagram/@childNodes.2/@labels.1 /0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@topLevelNodes.4/@labels.1 /0/@diagram/@topLevelNodes.0/@labels.3 /0/@diagram/@childNodes.8/@labels.3 /0/@diagram/@childNodes.6/@labels.3 /0/@diagram/@childNodes.10/@labels.1"
+ name="FloatingLabelEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="extends for UseCaseEP"
+ genView="/0/@diagram/@topLevelNodes.2 /0/@diagram/@childNodes.2 /0/@diagram/@childNodes.9"
+ name="UseCaseNodeEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.UseCaseNodeEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:SpecificLocatorExternalLabel"
+ comment="Locator for external Floating label of RoundedCompartment EP"
+ classpath="org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator"
+ genExternalNodeLabel="/0/@diagram/@topLevelNodes.2/@labels.1 /0/@diagram/@childNodes.2/@labels.1 /0/@diagram/@childNodes.9/@labels.1 /0/@diagram/@topLevelNodes.4/@labels.1 /0/@diagram/@topLevelNodes.0/@labels.3 /0/@diagram/@childNodes.8/@labels.3 /0/@diagram/@childNodes.6/@labels.3 /0/@diagram/@childNodes.10/@labels.1"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment=""
+ genView="/0/@diagram/@topLevelNodes.0 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.8"
+ name="RoundedCompartmentEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart"/>
+ <extensionNodes
+ xsi:type="papyrusgmfgenextension:ExtendedGenView"
+ comment="extends for SubjectNodeEditPart"
+ genView="/0/@diagram/@topLevelNodes.4 /0/@diagram/@childNodes.10"
+ name="SubjectNodeEditPart"
+ superOwnedEditPart="org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.SubjectNodeEditPart"/>
+ </papyrusgmfgenextension:PapyrusExtensionRootNode>
+</xmi:XMI>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/plugin.xml
index 818ae72859c..b4e179f8430 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/plugin.xml
@@ -15,15 +15,15 @@
-->
<plugin>
- <extension point="org.eclipse.ui.contexts" id="ui-context">
- <?gmfgen generated="true"?>
- <context
- description="%context.description"
- id="org.eclipse.papyrus.uml.diagram.usecase.ui.diagramContext"
- name="%context.name"
- parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
- </context>
- </extension>
+ <extension point="org.eclipse.ui.contexts" id="ui-context">
+ <?gmfgen generated="true"?>
+ <context
+ description="%context.description"
+ id="org.eclipse.papyrus.uml.diagram.usecase.ui.diagramContext"
+ name="%context.name"
+ parentId="org.eclipse.gmf.runtime.diagram.ui.diagramContext">
+ </context>
+ </extension>
<extension
point="org.eclipse.ui.commands">
@@ -59,1005 +59,1005 @@
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
- <?gmfgen generated="true"?>
- <propertyContributor
- contributorId="org.eclipse.papyrus.uml.diagram.usecase"
- labelProvider="org.eclipse.papyrus.uml.diagram.usecase.sheet.UMLSheetLabelProvider">
- <propertyCategory category="domain"/>
- <propertyCategory category="visual"/>
- <propertyCategory category="extra"/>
- </propertyContributor>
- </extension>
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
+ <?gmfgen generated="true"?>
+ <propertyContributor
+ contributorId="org.eclipse.papyrus.uml.diagram.usecase"
+ labelProvider="org.eclipse.papyrus.uml.diagram.usecase.sheet.UMLSheetLabelProvider">
+ <propertyCategory category="domain"/>
+ <propertyCategory category="visual"/>
+ <propertyCategory category="extra"/>
+ </propertyContributor>
+ </extension>
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
- <?gmfgen generated="true"?>
- <propertyTabs contributorId="org.eclipse.papyrus.uml.diagram.usecase">
- <propertyTab
- category="visual"
- id="property.tab.AppearancePropertySection"
- label="%tab.appearance"/>
- <propertyTab
- category="visual"
- id="property.tab.DiagramPropertySection"
- label="%tab.diagram"/>
- <propertyTab
- category="domain"
- id="property.tab.domain"
- label="%tab.domain"/>
- </propertyTabs>
- </extension>
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
+ <?gmfgen generated="true"?>
+ <propertyTabs contributorId="org.eclipse.papyrus.uml.diagram.usecase">
+ <propertyTab
+ category="visual"
+ id="property.tab.AppearancePropertySection"
+ label="%tab.appearance"/>
+ <propertyTab
+ category="visual"
+ id="property.tab.DiagramPropertySection"
+ label="%tab.diagram"/>
+ <propertyTab
+ category="domain"
+ id="property.tab.domain"
+ label="%tab.domain"/>
+ </propertyTabs>
+ </extension>
- <extension point="org.eclipse.ui.views.properties.tabbed.propertySections" id="propsections">
- <?gmfgen generated="true"?>
- <propertySections contributorId="org.eclipse.papyrus.uml.diagram.usecase">
- <propertySection id="property.section.ConnectorAppearancePropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.ShapeColorAndFontPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.DiagramColorsAndFontsPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection"
- tab="property.tab.AppearancePropertySection">
- </propertySection>
- <propertySection id="property.section.RulerGridPropertySection"
- filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
- class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection"
- tab="property.tab.DiagramPropertySection">
- </propertySection>
- <propertySection
- id="property.section.domain"
- tab="property.tab.domain"
- class="org.eclipse.papyrus.uml.diagram.usecase.sheet.UMLPropertySection">
- <input type="org.eclipse.gmf.runtime.notation.View"/>
- <input type="org.eclipse.gef.EditPart"/>
- <input type="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLAbstractNavigatorItem"/>
- </propertySection>
- </propertySections>
- </extension>
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertySections" id="propsections">
+ <?gmfgen generated="true"?>
+ <propertySections contributorId="org.eclipse.papyrus.uml.diagram.usecase">
+ <propertySection id="property.section.ConnectorAppearancePropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.ShapeColorAndFontPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.DiagramColorsAndFontsPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection"
+ tab="property.tab.AppearancePropertySection">
+ </propertySection>
+ <propertySection id="property.section.RulerGridPropertySection"
+ filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter"
+ class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection"
+ tab="property.tab.DiagramPropertySection">
+ </propertySection>
+ <propertySection
+ id="property.section.domain"
+ tab="property.tab.domain"
+ class="org.eclipse.papyrus.uml.diagram.usecase.sheet.UMLPropertySection">
+ <input type="org.eclipse.gmf.runtime.notation.View"/>
+ <input type="org.eclipse.gef.EditPart"/>
+ <input type="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLAbstractNavigatorItem"/>
+ </propertySection>
+ </propertySections>
+ </extension>
- <extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
- <?gmfgen generated="true"?>
- <IconProvider class="org.eclipse.papyrus.uml.diagram.usecase.providers.UMLIconProvider">
- <Priority name="Low"/>
- </IconProvider>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
+ <?gmfgen generated="true"?>
+ <IconProvider class="org.eclipse.papyrus.uml.diagram.usecase.providers.UMLIconProvider">
+ <Priority name="Low"/>
+ </IconProvider>
+ </extension>
- <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
- <?gmfgen generated="true"?>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Package_1000"
- name="%metatype.name.Package_1000"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Package"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.PackageEditHelper">
- <param name="semanticHint" value="1000"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Actor_2011"
- name="%metatype.name.Actor_2011"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Actor"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.ActorEditHelper">
- <param name="semanticHint" value="2011"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.Actor_2012"
- name="%metatype.name.Actor_2012"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Actor_2011"/>
- <param name="semanticHint" value="2012"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2013"
- name="%metatype.name.UseCase_2013"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="UseCase"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.UseCaseEditHelper">
- <param name="semanticHint" value="2013"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2014"
- name="%metatype.name.UseCase_2014"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2013"/>
- <param name="semanticHint" value="2014"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Classifier_2015"
- name="%metatype.name.Classifier_2015"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Classifier"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.SubjectEditHelper">
- <param name="semanticHint" value="2015"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.Package_2016"
- name="%metatype.name.Package_2016"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Package_1000"/>
- <param name="semanticHint" value="2016"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.Constraint_2017"
- name="%metatype.name.Constraint_2017"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Constraint_3017"/>
- <param name="semanticHint" value="2017"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.Comment_2018"
- name="%metatype.name.Comment_2018"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Comment_3015"/>
- <param name="semanticHint" value="2018"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.DefaultNamedElement_2022"
- name="%metatype.name.NamedElement_2022"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="NamedElement"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.DefaultNamedElementEditHelper">
- <param name="semanticHint" value="2022"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/gmf/runtime/1.0.2/notation">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Diagram_2019"
- name="%metatype.name.Diagram_2019"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Diagram"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.ShortCutDiagramEditHelper">
- <param name="semanticHint" value="2019"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.ExtensionPoint_3007"
- name="%metatype.name.ExtensionPoint_3007"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="ExtensionPoint"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.ExtensionPointEditHelper">
- <param name="semanticHint" value="3007"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.ExtensionPoint_3008"
- name="%metatype.name.ExtensionPoint_3008"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.ExtensionPoint_3007"/>
- <param name="semanticHint" value="3008"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_3009"
- name="%metatype.name.UseCase_3009"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2013"/>
- <param name="semanticHint" value="3009"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.Component_3016"
- name="%metatype.name.Component_3016"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Classifier_2015"/>
- <param name="semanticHint" value="3016"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Comment_3015"
- name="%metatype.name.Comment_3015"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Comment"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.CommentEditHelper">
- <param name="semanticHint" value="3015"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Constraint_3017"
- name="%metatype.name.Constraint_3017"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Constraint"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.ConstraintEditHelper">
- <param name="semanticHint" value="3017"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.Actor_3018"
- name="%metatype.name.Actor_3018"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Actor_2011"/>
- <param name="semanticHint" value="3018"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.Constraint_3010"
- name="%metatype.name.Constraint_3010"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Constraint_3017"/>
- <param name="semanticHint" value="3010"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.Actor_3011"
- name="%metatype.name.Actor_3011"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Actor_2011"/>
- <param name="semanticHint" value="3011"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_3012"
- name="%metatype.name.UseCase_3012"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2013"/>
- <param name="semanticHint" value="3012"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.Component_3013"
- name="%metatype.name.Component_3013"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Classifier_2015"/>
- <param name="semanticHint" value="3013"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.Package_3014"
- name="%metatype.name.Package_3014"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Package_1000"/>
- <param name="semanticHint" value="3014"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Include_4008"
- name="%metatype.name.Include_4008"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Include"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.IncludeEditHelper">
- <param name="semanticHint" value="4008"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Extend_4009"
- name="%metatype.name.Extend_4009"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Extend"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.ExtendEditHelper">
- <param name="semanticHint" value="4009"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Generalization_4010"
- name="%metatype.name.Generalization_4010"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Generalization"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.GeneralizationEditHelper">
- <param name="semanticHint" value="4010"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Association_4011"
- name="%metatype.name.Association_4011"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Association"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.AssociationEditHelper">
- <param name="semanticHint" value="4011"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.ConstraintConstrainedElement_4012"
- name="%metatype.name.ConstraintConstrainedElement_4012"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4012"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Dependency_4013"
- name="%metatype.name.Dependency_4013"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Dependency"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.DependencyEditHelper">
- <param name="semanticHint" value="4013"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <specializationType
- id="org.eclipse.papyrus.uml.diagram.usecase.CommentAnnotatedElement_4014"
- name="%metatype.name.CommentAnnotatedElement_4014"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
- <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
- <param name="semanticHint" value="4014"/>
- </specializationType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Abstraction_4015"
- name="%metatype.name.Abstraction_4015"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Abstraction"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.AbstractionEditHelper">
- <param name="semanticHint" value="4015"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Usage_4016"
- name="%metatype.name.Usage_4016"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Usage"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.UsageEditHelper">
- <param name="semanticHint" value="4016"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.Realization_4017"
- name="%metatype.name.Realization_4017"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="Realization"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.RealizationEditHelper">
- <param name="semanticHint" value="4017"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.PackageMerge_4018"
- name="%metatype.name.PackageMerge_4018"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="PackageMerge"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.PackageMergeEditHelper">
- <param name="semanticHint" value="4018"/>
- </metamodelType>
- </metamodel>
- <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <metamodelType
- id="org.eclipse.papyrus.uml.diagram.usecase.PackageImport_4019"
- name="%metatype.name.PackageImport_4019"
- kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
- eclass="PackageImport"
- edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.PackageImportEditHelper">
- <param name="semanticHint" value="4019"/>
- </metamodelType>
- </metamodel>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
+ <?gmfgen generated="true"?>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Package_1000"
+ name="%metatype.name.Package_1000"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Package"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.PackageEditHelper">
+ <param name="semanticHint" value="1000"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Actor_2011"
+ name="%metatype.name.Actor_2011"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Actor"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.ActorEditHelper">
+ <param name="semanticHint" value="2011"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Actor_2012"
+ name="%metatype.name.Actor_2012"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Actor_2011"/>
+ <param name="semanticHint" value="2012"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2013"
+ name="%metatype.name.UseCase_2013"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="UseCase"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.UseCaseEditHelper">
+ <param name="semanticHint" value="2013"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2014"
+ name="%metatype.name.UseCase_2014"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2013"/>
+ <param name="semanticHint" value="2014"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Classifier_2015"
+ name="%metatype.name.Classifier_2015"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Classifier"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.SubjectEditHelper">
+ <param name="semanticHint" value="2015"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Package_2016"
+ name="%metatype.name.Package_2016"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Package_1000"/>
+ <param name="semanticHint" value="2016"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Constraint_2017"
+ name="%metatype.name.Constraint_2017"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Constraint_3017"/>
+ <param name="semanticHint" value="2017"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Comment_2018"
+ name="%metatype.name.Comment_2018"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Comment_3015"/>
+ <param name="semanticHint" value="2018"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.DefaultNamedElement_2022"
+ name="%metatype.name.NamedElement_2022"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="NamedElement"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.DefaultNamedElementEditHelper">
+ <param name="semanticHint" value="2022"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/gmf/runtime/1.0.2/notation">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Diagram_2019"
+ name="%metatype.name.Diagram_2019"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Diagram"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.ShortCutDiagramEditHelper">
+ <param name="semanticHint" value="2019"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.ExtensionPoint_3007"
+ name="%metatype.name.ExtensionPoint_3007"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="ExtensionPoint"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.ExtensionPointEditHelper">
+ <param name="semanticHint" value="3007"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.ExtensionPoint_3008"
+ name="%metatype.name.ExtensionPoint_3008"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.ExtensionPoint_3007"/>
+ <param name="semanticHint" value="3008"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_3009"
+ name="%metatype.name.UseCase_3009"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2013"/>
+ <param name="semanticHint" value="3009"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Component_3016"
+ name="%metatype.name.Component_3016"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Classifier_2015"/>
+ <param name="semanticHint" value="3016"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Comment_3015"
+ name="%metatype.name.Comment_3015"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Comment"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.CommentEditHelper">
+ <param name="semanticHint" value="3015"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Constraint_3017"
+ name="%metatype.name.Constraint_3017"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Constraint"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.ConstraintEditHelper">
+ <param name="semanticHint" value="3017"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Actor_3018"
+ name="%metatype.name.Actor_3018"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Actor_2011"/>
+ <param name="semanticHint" value="3018"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Constraint_3010"
+ name="%metatype.name.Constraint_3010"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Constraint_3017"/>
+ <param name="semanticHint" value="3010"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Actor_3011"
+ name="%metatype.name.Actor_3011"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Actor_2011"/>
+ <param name="semanticHint" value="3011"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_3012"
+ name="%metatype.name.UseCase_3012"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2013"/>
+ <param name="semanticHint" value="3012"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Component_3013"
+ name="%metatype.name.Component_3013"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Classifier_2015"/>
+ <param name="semanticHint" value="3013"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Package_3014"
+ name="%metatype.name.Package_3014"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.usecase.Package_1000"/>
+ <param name="semanticHint" value="3014"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Include_4008"
+ name="%metatype.name.Include_4008"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Include"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.IncludeEditHelper">
+ <param name="semanticHint" value="4008"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Extend_4009"
+ name="%metatype.name.Extend_4009"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Extend"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.ExtendEditHelper">
+ <param name="semanticHint" value="4009"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Generalization_4010"
+ name="%metatype.name.Generalization_4010"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Generalization"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.GeneralizationEditHelper">
+ <param name="semanticHint" value="4010"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Association_4011"
+ name="%metatype.name.Association_4011"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Association"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.AssociationEditHelper">
+ <param name="semanticHint" value="4011"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.ConstraintConstrainedElement_4012"
+ name="%metatype.name.ConstraintConstrainedElement_4012"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4012"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Dependency_4013"
+ name="%metatype.name.Dependency_4013"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Dependency"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.DependencyEditHelper">
+ <param name="semanticHint" value="4013"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.usecase.CommentAnnotatedElement_4014"
+ name="%metatype.name.CommentAnnotatedElement_4014"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
+ <param name="semanticHint" value="4014"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Abstraction_4015"
+ name="%metatype.name.Abstraction_4015"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Abstraction"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.AbstractionEditHelper">
+ <param name="semanticHint" value="4015"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Usage_4016"
+ name="%metatype.name.Usage_4016"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Usage"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.UsageEditHelper">
+ <param name="semanticHint" value="4016"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.Realization_4017"
+ name="%metatype.name.Realization_4017"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Realization"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.RealizationEditHelper">
+ <param name="semanticHint" value="4017"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.PackageMerge_4018"
+ name="%metatype.name.PackageMerge_4018"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="PackageMerge"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.PackageMergeEditHelper">
+ <param name="semanticHint" value="4018"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.usecase.PackageImport_4019"
+ name="%metatype.name.PackageImport_4019"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="PackageImport"
+ edithelper="org.eclipse.papyrus.uml.diagram.usecase.edit.helpers.PackageImportEditHelper">
+ <param name="semanticHint" value="4019"/>
+ </metamodelType>
+ </metamodel>
+ </extension>
- <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
- <?gmfgen generated="true"?>
- <clientContext id="org.eclipse.papyrus.uml.diagram.usecase.TypeContext">
- <enablement>
- <test
- property="org.eclipse.gmf.runtime.emf.core.editingDomain"
- value="org.eclipse.papyrus.uml.diagram.usecase.EditingDomain"/>
- </enablement>
- </clientContext>
- <binding context="org.eclipse.papyrus.uml.diagram.usecase.TypeContext">
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Package_1000"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Actor_2011"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Actor_2012"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2013"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2014"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Classifier_2015"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Package_2016"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Constraint_2017"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Comment_2018"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.DefaultNamedElement_2022"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Diagram_2019"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.ExtensionPoint_3007"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.ExtensionPoint_3008"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.UseCase_3009"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Component_3016"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Comment_3015"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Constraint_3017"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Actor_3018"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Constraint_3010"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Actor_3011"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.UseCase_3012"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Component_3013"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Package_3014"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Include_4008"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Extend_4009"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Generalization_4010"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Association_4011"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.ConstraintConstrainedElement_4012"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Dependency_4013"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.CommentAnnotatedElement_4014"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Abstraction_4015"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Usage_4016"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Realization_4017"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.PackageMerge_4018"/>
- <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.PackageImport_4019"/>
- <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
- </binding>
- </extension>
+ <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
+ <?gmfgen generated="true"?>
+ <clientContext id="org.eclipse.papyrus.uml.diagram.usecase.TypeContext">
+ <enablement>
+ <test
+ property="org.eclipse.gmf.runtime.emf.core.editingDomain"
+ value="org.eclipse.papyrus.uml.diagram.usecase.EditingDomain"/>
+ </enablement>
+ </clientContext>
+ <binding context="org.eclipse.papyrus.uml.diagram.usecase.TypeContext">
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Package_1000"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Actor_2011"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Actor_2012"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2013"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.UseCase_2014"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Classifier_2015"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Package_2016"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Constraint_2017"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Comment_2018"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.DefaultNamedElement_2022"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Diagram_2019"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.ExtensionPoint_3007"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.ExtensionPoint_3008"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.UseCase_3009"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Component_3016"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Comment_3015"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Constraint_3017"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Actor_3018"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Constraint_3010"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Actor_3011"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.UseCase_3012"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Component_3013"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Package_3014"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Include_4008"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Extend_4009"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Generalization_4010"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Association_4011"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.ConstraintConstrainedElement_4012"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Dependency_4013"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.CommentAnnotatedElement_4014"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Abstraction_4015"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Usage_4016"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.Realization_4017"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.PackageMerge_4018"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.usecase.PackageImport_4019"/>
+ <advice ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
+ </binding>
+ </extension>
- <extension point="org.eclipse.core.runtime.preferences" id="prefs">
- <?gmfgen generated="true"?>
- <initializer class="org.eclipse.papyrus.uml.diagram.usecase.preferences.DiagramPreferenceInitializer"/>
- </extension>
+ <extension point="org.eclipse.core.runtime.preferences" id="prefs">
+ <?gmfgen generated="true"?>
+ <initializer class="org.eclipse.papyrus.uml.diagram.usecase.preferences.DiagramPreferenceInitializer"/>
+ </extension>
-<extension point="org.eclipse.ui.menus" id="context-menus">
- <?gmfgen generated="true"?>
- <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
- </menuContribution>
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
- </menuContribution -->
- <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
- <command commandId="org.eclipse.papyrus.uml.diagram.usecase.LoadResourceAction">
- <visibleWhen>
- <and>
- <with variable="activePartId"><equals value="org.eclipse.papyrus.uml.diagram.usecase.part.UMLDiagramEditorID"/></with>
- <with variable="selection"><iterate ifEmpty="false">
- <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseDiagramEditPart"/>
- </iterate></with>
- </and>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
+<extension point="org.eclipse.ui.menus" id="context-menus">
+ <?gmfgen generated="true"?>
+ <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
+ </menuContribution>
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
+ </menuContribution -->
+ <menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
+ <command commandId="org.eclipse.papyrus.uml.diagram.usecase.LoadResourceAction">
+ <visibleWhen>
+ <and>
+ <with variable="activePartId"><equals value="org.eclipse.papyrus.uml.diagram.usecase.part.UMLDiagramEditorID"/></with>
+ <with variable="selection"><iterate ifEmpty="false">
+ <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseDiagramEditPart"/>
+ </iterate></with>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
-<extension point="org.eclipse.ui.commands" id="menu-commands">
- <?gmfgen generated="true"?>
- <category id="org.eclipse.papyrus.uml.diagram.usecase.part.UMLDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
- <command id="org.eclipse.papyrus.uml.diagram.usecase.LoadResourceAction"
- name="Load Resource"
- categoryId="org.eclipse.papyrus.uml.diagram.usecase.part.UMLDiagramEditorID"
- defaultHandler="org.eclipse.papyrus.uml.diagram.usecase.part.LoadResourceAction"/>
- </extension>
+<extension point="org.eclipse.ui.commands" id="menu-commands">
+ <?gmfgen generated="true"?>
+ <category id="org.eclipse.papyrus.uml.diagram.usecase.part.UMLDiagramEditorID" name="%cmdcategory.name" description="%cmdcategory.desc"/>
+ <command id="org.eclipse.papyrus.uml.diagram.usecase.LoadResourceAction"
+ name="Load Resource"
+ categoryId="org.eclipse.papyrus.uml.diagram.usecase.part.UMLDiagramEditorID"
+ defaultHandler="org.eclipse.papyrus.uml.diagram.usecase.part.LoadResourceAction"/>
+ </extension>
-<extension point="org.eclipse.ui.handlers" id="menu-handlers">
- <?gmfgen generated="true"?>
- </extension>
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
- <?gmfgen generated="true"?>
-<page
- id="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.UseCase"
- name="UseCase Diagram"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
- class="org.eclipse.papyrus.uml.diagram.usecase.preferences.DiagramGeneralPreferencePage">
-</page>
-<page
- id="org.eclipse.papyrus.uml.diagram.usecase.preferences.DiagramPrintingPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.printing"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.UseCase"
- class="org.eclipse.papyrus.uml.diagram.usecase.preferences.DiagramPrintingPreferencePage">
-</page>
-<page
- id="org.eclipse.papyrus.uml.diagram.usecase.preferences.DiagramRulersAndGridPreferencePage"
- name="%prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.UseCase"
- class="org.eclipse.papyrus.uml.diagram.usecase.preferences.DiagramRulersAndGridPreferencePage">
-</page>
- </extension>
+<extension point="org.eclipse.ui.handlers" id="menu-handlers">
+ <?gmfgen generated="true"?>
+ </extension>
+<extension point="org.eclipse.ui.preferencePages" id="prefpages">
+ <?gmfgen generated="true"?>
+<page
+ id="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.UseCase"
+ name="UseCase Diagram"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
+ class="org.eclipse.papyrus.uml.diagram.usecase.preferences.DiagramGeneralPreferencePage">
+</page>
+<page
+ id="org.eclipse.papyrus.uml.diagram.usecase.preferences.DiagramPrintingPreferencePage"
+ name="%prefpage.org.eclipse.uml2.uml.diagram.printing"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.UseCase"
+ class="org.eclipse.papyrus.uml.diagram.usecase.preferences.DiagramPrintingPreferencePage">
+</page>
+<page
+ id="org.eclipse.papyrus.uml.diagram.usecase.preferences.DiagramRulersAndGridPreferencePage"
+ name="%prefpage.org.eclipse.uml2.uml.diagram.rulersAndGrid"
+ category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams.UseCase"
+ class="org.eclipse.papyrus.uml.diagram.usecase.preferences.DiagramRulersAndGridPreferencePage">
+</page>
+ </extension>
-<extension
- id="Papyrus useCase editor Plugin.palettedefinition"
- name="Papyrus useCase editor Plugin Predefined Entries"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Lowest"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.usecase.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
-
- <entry
- defineOnly="true"
- description="Create Package"
- id="usecase.tool.package"
- kind="tool"
- label="Package"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Subject"
- id="usecase.tool.subject"
- kind="tool"
- label="Subject"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Actor"
- id="usecase.tool.actor"
- kind="tool"
- label="Actor"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Actor.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Actor.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Use Case"
- id="usecase.tool.usecase"
- kind="tool"
- label="Use Case"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/UseCase.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/UseCase.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Constraint"
- id="usecase.tool.constraint"
- kind="tool"
- label="Constraint"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Comment"
- id="usecase.tool.comment"
- kind="tool"
- label="Comment"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Extension Point"
- id="usecase.tool.extensionpoint"
- kind="tool"
- label="Extension Point"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExtensionPoint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExtensionPoint.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Association Link"
- id="usecase.tool.association"
- kind="tool"
- label="Association"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Generalization Link"
- id="usecase.tool.generalization"
- kind="tool"
- label="Generalization"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Dependency Link"
- id="usecase.tool.dependency"
- kind="tool"
- label="Dependency"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Abstraction Link"
- id="usecase.tool.abstraction"
- kind="tool"
- label="Abstraction"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Realization Link"
- id="usecase.tool.realization"
- kind="tool"
- label="Realization"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Usage Link"
- id="usecase.tool.usage"
- kind="tool"
- label="Usage"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create PackageMerge Link"
- id="usecase.tool.packagemerge"
- kind="tool"
- label="PackageMerge"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create PackageImport Link"
- id="usecase.tool.packageimport"
- kind="tool"
- label="PackageImport"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Include Link"
- id="usecase.tool.include"
- kind="tool"
- label="Include"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Include.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Include.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Extend"
- id="usecase.tool.extend"
- kind="tool"
- label="Extend"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Extend.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Extend.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Constrained Element"
- id="usecase.tool.constraintlink"
- kind="tool"
- label="Constrained Element"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
- </entry>
- <entry
- defineOnly="true"
- description="Create Comment Link"
- id="usecase.tool.commentlink"
- kind="tool"
- label="Comment link"
- large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- path=""
- small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
- </entry>
-
- </contribution>
- </paletteProvider>
-
- </extension>
+<extension
+ id="Papyrus useCase editor Plugin.palettedefinition"
+ name="Papyrus useCase editor Plugin Predefined Entries"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Lowest"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.usecase.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+
+ <entry
+ defineOnly="true"
+ description="Create Package"
+ id="usecase.tool.package"
+ kind="tool"
+ label="Package"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Subject"
+ id="usecase.tool.subject"
+ kind="tool"
+ label="Subject"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Component.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Actor"
+ id="usecase.tool.actor"
+ kind="tool"
+ label="Actor"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Actor.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Actor.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Use Case"
+ id="usecase.tool.usecase"
+ kind="tool"
+ label="Use Case"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/UseCase.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/UseCase.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Constraint"
+ id="usecase.tool.constraint"
+ kind="tool"
+ label="Constraint"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Comment"
+ id="usecase.tool.comment"
+ kind="tool"
+ label="Comment"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Extension Point"
+ id="usecase.tool.extensionpoint"
+ kind="tool"
+ label="Extension Point"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExtensionPoint.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ExtensionPoint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Association Link"
+ id="usecase.tool.association"
+ kind="tool"
+ label="Association"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Generalization Link"
+ id="usecase.tool.generalization"
+ kind="tool"
+ label="Generalization"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Dependency Link"
+ id="usecase.tool.dependency"
+ kind="tool"
+ label="Dependency"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Abstraction Link"
+ id="usecase.tool.abstraction"
+ kind="tool"
+ label="Abstraction"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Abstraction.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Realization Link"
+ id="usecase.tool.realization"
+ kind="tool"
+ label="Realization"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Realization.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Usage Link"
+ id="usecase.tool.usage"
+ kind="tool"
+ label="Usage"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Usage.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create PackageMerge Link"
+ id="usecase.tool.packagemerge"
+ kind="tool"
+ label="PackageMerge"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageMerge.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create PackageImport Link"
+ id="usecase.tool.packageimport"
+ kind="tool"
+ label="PackageImport"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PackageImport.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Include Link"
+ id="usecase.tool.include"
+ kind="tool"
+ label="Include"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Include.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Include.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Extend"
+ id="usecase.tool.extend"
+ kind="tool"
+ label="Extend"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Extend.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Extend.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Constrained Element"
+ id="usecase.tool.constraintlink"
+ kind="tool"
+ label="Constrained Element"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
+ </entry>
+ <entry
+ defineOnly="true"
+ description="Create Comment Link"
+ id="usecase.tool.commentlink"
+ kind="tool"
+ label="Comment link"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
+ </entry>
+
+ </contribution>
+ </paletteProvider>
+
+ </extension>
-<extension
- id="Papyrus useCase editor Plugin.standard"
- name="Papyrus useCase editor Plugin Standard Palette"
- point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
-
- <?gmfgen generated="true"?>
- <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
- <Priority name="Low"/>
- <contribution
- factoryClass="org.eclipse.papyrus.uml.diagram.usecase.part.UMLPaletteFactory">
- <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
- <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
-
- <entry
- description="Diagram Nodes"
- id="usecase.group.nodes"
- kind="drawer"
- label="Nodes"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
- <predefinedEntry
- id="usecase.tool.package"
- path="/usecase.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.subject"
- path="/usecase.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.actor"
- path="/usecase.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.usecase"
- path="/usecase.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.constraint"
- path="/usecase.group.nodes">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.comment"
- path="/usecase.group.nodes">
- </predefinedEntry>
- <entry
- description="Child Elements of the Diagram Nodes"
- id="usecase.group.children"
- kind="drawer"
- label="Children"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
- <predefinedEntry
- id="usecase.tool.extensionpoint"
- path="/usecase.group.children">
- </predefinedEntry>
- <entry
- description="Diagram Links"
- id="usecase.group.links"
- kind="drawer"
- label="Links"
- large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="/"
- small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <expand
- force="true">
- </expand>
- </entry>
- <predefinedEntry
- id="usecase.tool.association"
- path="/usecase.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.generalization"
- path="/usecase.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.dependency"
- path="/usecase.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.abstraction"
- path="/usecase.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.realization"
- path="/usecase.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.usage"
- path="/usecase.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.packagemerge"
- path="/usecase.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.packageimport"
- path="/usecase.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.include"
- path="/usecase.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.extend"
- path="/usecase.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.constraintlink"
- path="/usecase.group.links">
- </predefinedEntry>
- <predefinedEntry
- id="usecase.tool.commentlink"
- path="/usecase.group.links">
- </predefinedEntry>
- </contribution>
- <editor id="org.eclipse.papyrus.uml.diagram.usecase"/>
- </paletteProvider>
-
-</extension>
-<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
- <?gmfgen generated="true"?>
- <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.usecase.providers.UMLMarkerNavigationProvider">
- <MarkerType name="org.eclipse.papyrus.uml.diagram.usecase.diagnostic"/>
- <Priority name="Lowest"/>
- </MarkerNavigationProvider>
- </extension>
+<extension
+ id="Papyrus useCase editor Plugin.standard"
+ name="Papyrus useCase editor Plugin Standard Palette"
+ point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
+
+ <?gmfgen generated="true"?>
+ <paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
+ <Priority name="Low"/>
+ <contribution
+ factoryClass="org.eclipse.papyrus.uml.diagram.usecase.part.UMLPaletteFactory">
+ <predefinedEntry id="standardGroup/noteStack/noteTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/textTool" remove="true"/>
+ <predefinedEntry id="standardGroup/noteStack/noteattachmentTool" remove="true"/>
+
+ <entry
+ description="Diagram Nodes"
+ id="usecase.group.nodes"
+ kind="drawer"
+ label="Nodes"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="usecase.tool.package"
+ path="/usecase.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.subject"
+ path="/usecase.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.actor"
+ path="/usecase.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.usecase"
+ path="/usecase.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.constraint"
+ path="/usecase.group.nodes">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.comment"
+ path="/usecase.group.nodes">
+ </predefinedEntry>
+ <entry
+ description="Child Elements of the Diagram Nodes"
+ id="usecase.group.children"
+ kind="drawer"
+ label="Children"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="usecase.tool.extensionpoint"
+ path="/usecase.group.children">
+ </predefinedEntry>
+ <entry
+ description="Diagram Links"
+ id="usecase.group.links"
+ kind="drawer"
+ label="Links"
+ large_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ path="/"
+ small_icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <expand
+ force="true">
+ </expand>
+ </entry>
+ <predefinedEntry
+ id="usecase.tool.association"
+ path="/usecase.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.generalization"
+ path="/usecase.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.dependency"
+ path="/usecase.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.abstraction"
+ path="/usecase.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.realization"
+ path="/usecase.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.usage"
+ path="/usecase.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.packagemerge"
+ path="/usecase.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.packageimport"
+ path="/usecase.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.include"
+ path="/usecase.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.extend"
+ path="/usecase.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.constraintlink"
+ path="/usecase.group.links">
+ </predefinedEntry>
+ <predefinedEntry
+ id="usecase.tool.commentlink"
+ path="/usecase.group.links">
+ </predefinedEntry>
+ </contribution>
+ <editor id="org.eclipse.papyrus.uml.diagram.usecase"/>
+ </paletteProvider>
+
+</extension>
+<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
+ <?gmfgen generated="true"?>
+ <MarkerNavigationProvider class="org.eclipse.papyrus.uml.diagram.usecase.providers.UMLMarkerNavigationProvider">
+ <MarkerType name="org.eclipse.papyrus.uml.diagram.usecase.diagnostic"/>
+ <Priority name="Lowest"/>
+ </MarkerNavigationProvider>
+ </extension>
-<extension id="diagnostic" name="Papyrus useCase editor Plugin problems" point="org.eclipse.core.resources.markers">
- <?gmfgen generated="true"?>
- <super type="org.eclipse.core.resources.problemmarker"/>
- <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
- <persistent value="true"/>
- </extension><extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
- <?gmfgen generated="true"?>
- <decoratorProvider class="org.eclipse.papyrus.uml.diagram.usecase.providers.UMLValidationDecoratorProvider">
- <Priority name="Lowest"/>
- <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
- <context decoratorTargets="PRIMARY_VIEW"/>
- </decoratorProvider>
- </extension>
+<extension id="diagnostic" name="Papyrus useCase editor Plugin problems" point="org.eclipse.core.resources.markers">
+ <?gmfgen generated="true"?>
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
+ <persistent value="true"/>
+ </extension><extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
+ <?gmfgen generated="true"?>
+ <decoratorProvider class="org.eclipse.papyrus.uml.diagram.usecase.providers.UMLValidationDecoratorProvider">
+ <Priority name="Lowest"/>
+ <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
+ <context decoratorTargets="PRIMARY_VIEW"/>
+ </decoratorProvider>
+ </extension>
<!-- Custom extension point-->
-<extension point="org.eclipse.core.expressions.propertyTesters" id="navigator-proptest.isURIEditorInput">
- <?gmfgen generated="true"?>
- <propertyTester
- id="org.eclipse.papyrus.uml.diagram.usecase.URIEditorInputPropertyTester"
- type="org.eclipse.emf.common.ui.URIEditorInput"
- namespace="org.eclipse.papyrus.uml.diagram.usecase"
- properties="isURIEditorInput"
- class="org.eclipse.papyrus.uml.diagram.usecase.part.UMLUriEditorInputTester">
- </propertyTester>
- </extension>
+<extension point="org.eclipse.core.expressions.propertyTesters" id="navigator-proptest.isURIEditorInput">
+ <?gmfgen generated="true"?>
+ <propertyTester
+ id="org.eclipse.papyrus.uml.diagram.usecase.URIEditorInputPropertyTester"
+ type="org.eclipse.emf.common.ui.URIEditorInput"
+ namespace="org.eclipse.papyrus.uml.diagram.usecase"
+ properties="isURIEditorInput"
+ class="org.eclipse.papyrus.uml.diagram.usecase.part.UMLUriEditorInputTester">
+ </propertyTester>
+ </extension>
-<extension point="org.eclipse.ui.navigator.viewer" id="navigator-viewbinding">
- <?gmfgen generated="true"?>
- <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <contentExtension pattern="org.eclipse.papyrus.uml.diagram.usecase.resourceContent"/>
- <contentExtension pattern="org.eclipse.papyrus.uml.diagram.usecase.domainResourceContent"/>
- <contentExtension pattern="org.eclipse.papyrus.uml.diagram.usecase.navigatorLinkHelper"/>
- </includes>
- </viewerContentBinding>
- <viewerActionBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <actionExtension pattern="org.eclipse.papyrus.uml.diagram.usecase.navigatorActionProvider"/>
- </includes>
- </viewerActionBinding>
- </extension>
+<extension point="org.eclipse.ui.navigator.viewer" id="navigator-viewbinding">
+ <?gmfgen generated="true"?>
+ <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
+ <includes>
+ <contentExtension pattern="org.eclipse.papyrus.uml.diagram.usecase.resourceContent"/>
+ <contentExtension pattern="org.eclipse.papyrus.uml.diagram.usecase.domainResourceContent"/>
+ <contentExtension pattern="org.eclipse.papyrus.uml.diagram.usecase.navigatorLinkHelper"/>
+ </includes>
+ </viewerContentBinding>
+ <viewerActionBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
+ <includes>
+ <actionExtension pattern="org.eclipse.papyrus.uml.diagram.usecase.navigatorActionProvider"/>
+ </includes>
+ </viewerActionBinding>
+ </extension>
-<extension point="org.eclipse.ui.navigator.navigatorContent" id="navigator-content">
- <?gmfgen generated="true"?>
- <navigatorContent
- id="org.eclipse.papyrus.uml.diagram.usecase.resourceContent"
- name="%navigatorContentName"
- priority="normal"
- contentProvider="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLNavigatorContentProvider"
- labelProvider="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLNavigatorLabelProvider"
- icon="icons/obj16/UMLDiagramFile.gif"
- activeByDefault="true">
- <triggerPoints>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="PapyrusUMLUsecase_diagram"/>
- </and>
- <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </triggerPoints>
- <possibleChildren>
- <or>
- <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </possibleChildren>
- <commonSorter
- id="org.eclipse.papyrus.uml.diagram.usecase.navigatorSorter"
- class="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLNavigatorSorter">
- <parentExpression>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="PapyrusUMLUsecase_diagram"/>
- </and>
- <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </parentExpression>
- </commonSorter>
- </navigatorContent>
- <navigatorContent
- id="org.eclipse.papyrus.uml.diagram.usecase.domainResourceContent"
- name="%domainNavigatorContentName"
- priority="normal"
- contentProvider="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLDomainNavigatorContentProvider"
- labelProvider="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLDomainNavigatorLabelProvider"
- icon="icons/obj16/UMLDiagramFile.gif"
- activeByDefault="true">
- <triggerPoints>
- <or>
- <and>
- <instanceof value="org.eclipse.core.resources.IFile"/>
- <test property="org.eclipse.core.resources.extension" value="PapyrusUMLUsecase"/>
- </and>
- <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLDomainNavigatorItem"/>
- </or>
- </triggerPoints>
- <possibleChildren>
- <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLDomainNavigatorItem"/>
- </possibleChildren>
- </navigatorContent>
- <actionProvider
- id="org.eclipse.papyrus.uml.diagram.usecase.navigatorActionProvider"
- class="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLNavigatorActionProvider">
- <enablement>
- <or>
- <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLAbstractNavigatorItem"/>
- </or>
- </enablement>
- </actionProvider>
- </extension>
+<extension point="org.eclipse.ui.navigator.navigatorContent" id="navigator-content">
+ <?gmfgen generated="true"?>
+ <navigatorContent
+ id="org.eclipse.papyrus.uml.diagram.usecase.resourceContent"
+ name="%navigatorContentName"
+ priority="normal"
+ contentProvider="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLNavigatorContentProvider"
+ labelProvider="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLNavigatorLabelProvider"
+ icon="icons/obj16/UMLDiagramFile.gif"
+ activeByDefault="true">
+ <triggerPoints>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <test property="org.eclipse.core.resources.extension" value="PapyrusUMLUsecase_diagram"/>
+ </and>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLAbstractNavigatorItem"/>
+ </or>
+ </triggerPoints>
+ <possibleChildren>
+ <or>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLAbstractNavigatorItem"/>
+ </or>
+ </possibleChildren>
+ <commonSorter
+ id="org.eclipse.papyrus.uml.diagram.usecase.navigatorSorter"
+ class="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLNavigatorSorter">
+ <parentExpression>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <test property="org.eclipse.core.resources.extension" value="PapyrusUMLUsecase_diagram"/>
+ </and>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLAbstractNavigatorItem"/>
+ </or>
+ </parentExpression>
+ </commonSorter>
+ </navigatorContent>
+ <navigatorContent
+ id="org.eclipse.papyrus.uml.diagram.usecase.domainResourceContent"
+ name="%domainNavigatorContentName"
+ priority="normal"
+ contentProvider="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLDomainNavigatorContentProvider"
+ labelProvider="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLDomainNavigatorLabelProvider"
+ icon="icons/obj16/UMLDiagramFile.gif"
+ activeByDefault="true">
+ <triggerPoints>
+ <or>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <test property="org.eclipse.core.resources.extension" value="PapyrusUMLUsecase"/>
+ </and>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLDomainNavigatorItem"/>
+ </or>
+ </triggerPoints>
+ <possibleChildren>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLDomainNavigatorItem"/>
+ </possibleChildren>
+ </navigatorContent>
+ <actionProvider
+ id="org.eclipse.papyrus.uml.diagram.usecase.navigatorActionProvider"
+ class="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLNavigatorActionProvider">
+ <enablement>
+ <or>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLAbstractNavigatorItem"/>
+ </or>
+ </enablement>
+ </actionProvider>
+ </extension>
-<extension point="org.eclipse.ui.navigator.linkHelper" id="navigator-linkhelper">
- <?gmfgen generated="true"?>
- <linkHelper
- id="org.eclipse.papyrus.uml.diagram.usecase.navigatorLinkHelper"
- class="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLNavigatorLinkHelper">
- <editorInputEnablement>
- <and>
- <instanceof value="org.eclipse.emf.common.ui.URIEditorInput"/>
- <test property="org.eclipse.papyrus.uml.diagram.usecase.isURIEditorInput"/>
- </and>
- </editorInputEnablement>
- <selectionEnablement>
- <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLAbstractNavigatorItem"/>
- </selectionEnablement>
- </linkHelper>
- </extension>
+<extension point="org.eclipse.ui.navigator.linkHelper" id="navigator-linkhelper">
+ <?gmfgen generated="true"?>
+ <linkHelper
+ id="org.eclipse.papyrus.uml.diagram.usecase.navigatorLinkHelper"
+ class="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLNavigatorLinkHelper">
+ <editorInputEnablement>
+ <and>
+ <instanceof value="org.eclipse.emf.common.ui.URIEditorInput"/>
+ <test property="org.eclipse.papyrus.uml.diagram.usecase.isURIEditorInput"/>
+ </and>
+ </editorInputEnablement>
+ <selectionEnablement>
+ <instanceof value="org.eclipse.papyrus.uml.diagram.usecase.navigator.UMLAbstractNavigatorItem"/>
+ </selectionEnablement>
+ </linkHelper>
+ </extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
@@ -1287,15 +1287,15 @@
</diagramMappings>
</extension>
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
- <?gmfgen generated="true"?>
- <viewProvider class="org.eclipse.papyrus.uml.diagram.usecase.providers.UMLViewProvider">
- <Priority name="Lowest"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="UseCase"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2011,2012,2013,2014,2015,2016,2017,2018,2022,2019,3007,3008,3009,3016,3015,3017,3018,3010,3011,3012,3013,3014"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019"/>
- </viewProvider>
- </extension>
+<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
+ <?gmfgen generated="true"?>
+ <viewProvider class="org.eclipse.papyrus.uml.diagram.usecase.providers.UMLViewProvider">
+ <Priority name="Lowest"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="UseCase"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2011,2012,2013,2014,2015,2016,2017,2018,2022,2019,3007,3008,3009,3016,3015,3017,3018,3010,3011,3012,3013,3014"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019"/>
+ </viewProvider>
+ </extension>
<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
<?gmfgen generated="false"?>
@@ -1319,12 +1319,12 @@
<context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
</editpartProvider>
</extension>
-<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
- <?gmfgen generated="true"?>
- <ParserProvider class="org.eclipse.papyrus.uml.diagram.usecase.providers.UMLParserProvider">
- <Priority name="Lowest"/>
- </ParserProvider>
- </extension>
+<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
+ <?gmfgen generated="true"?>
+ <ParserProvider class="org.eclipse.papyrus.uml.diagram.usecase.providers.UMLParserProvider">
+ <Priority name="Lowest"/>
+ </ParserProvider>
+ </extension>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentAnnotatedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentAnnotatedElementReorientCommand.java
index 8957032f1c7..76a3b341162 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentAnnotatedElementReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentAnnotatedElementReorientCommand.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
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.emf.type.core.requests.ReorientRequest;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UMLBaseItemSemanticEditPolicy;
import org.eclipse.uml2.uml.Comment;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintConstrainedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintConstrainedElementReorientCommand.java
index f19720c271f..9e5af48d442 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintConstrainedElementReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintConstrainedElementReorientCommand.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
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.emf.type.core.requests.ReorientRequest;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UMLBaseItemSemanticEditPolicy;
import org.eclipse.uml2.uml.Constraint;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShortCutDiagramCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShortCutDiagramCreateCommand.java
index 569a4006729..57a1be6e9a5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShortCutDiagramCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShortCutDiagramCreateCommand.java
@@ -68,9 +68,9 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
// 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();
+ // ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getContainer().eResource();
// if (resource == null) {
- // return null;
+ // return null;
// }
Resource resource = getElementToEdit().eResource();
Diagram newElement = NotationFactory.eINSTANCE.createDiagram();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AbstractionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AbstractionNameEditPart.java
index a577dea047d..9508e6bc9d0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AbstractionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AbstractionNameEditPart.java
@@ -1,829 +1,830 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 AbstractionNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6011;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AbstractionNameEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public AbstractionNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4015, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AbstractionNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 AbstractionNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6011;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AbstractionNameEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public AbstractionNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4015, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AbstractionNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAppliedStereotypeEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAppliedStereotypeEditPartTN.java
index dc593c55d75..b11aeeee713 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAppliedStereotypeEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAppliedStereotypeEditPartTN.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -60,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -150,6 +150,7 @@ public class ActorAppliedStereotypeEditPartTN extends AbstractLabelEditPart impl
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAsRectangleEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAsRectangleEditPartTN.java
index c2568cbeb2b..fb4a134075b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAsRectangleEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAsRectangleEditPartTN.java
@@ -20,11 +20,11 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-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.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ActorAsRectangleItemSemanticEditPolicyTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UMLTextSelectionEditPolicy;
@@ -167,7 +167,7 @@ public class ActorAsRectangleEditPartTN extends NodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(60, 80);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(60, 80);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAsRectangleNameEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAsRectangleNameEditPartTN.java
index b3f505ac73c..701f4f8152a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAsRectangleNameEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorAsRectangleNameEditPartTN.java
@@ -30,7 +30,6 @@ 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;
@@ -865,7 +864,7 @@ public class ActorAsRectangleNameEditPartTN extends PapyrusCompartmentEditPart i
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorEditPartTN.java
index 765e4952603..a584c4c5e18 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorEditPartTN.java
@@ -29,25 +29,26 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.usecase.draw2d.StickMan;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ActorItemSemanticEditPolicyTN;
-import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ExternalNodeActorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class ActorEditPartTN extends UMLNodeEditPart {
+public class ActorEditPartTN extends RoundedCompartmentEditPart {
/**
* @generated
@@ -79,7 +80,7 @@ public class ActorEditPartTN extends UMLNodeEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActorItemSemanticEditPolicyTN());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, new ExternalNodeActorLayoutEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -97,6 +98,7 @@ public class ActorEditPartTN extends UMLNodeEditPart {
case ActorNameEditPartTN.VISUAL_ID:
case ActorAppliedStereotypeEditPartTN.VISUAL_ID:
case ActorQualifiedNameEditPartTN.VISUAL_ID:
+ case ActorFloatingLabelEditPartTN.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
@@ -157,7 +159,7 @@ public class ActorEditPartTN extends UMLNodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new StickMan();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -166,8 +168,8 @@ public class ActorEditPartTN extends UMLNodeEditPart {
* @generated
*/
@Override
- public StickMan getPrimaryShape() {
- return (StickMan) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -184,6 +186,9 @@ public class ActorEditPartTN extends UMLNodeEditPart {
} else if (borderItemEditPart instanceof ActorQualifiedNameEditPartTN) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else if (borderItemEditPart instanceof ActorFloatingLabelEditPartTN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else
{
super.addBorderItem(borderItemContainer, borderItemEditPart);
@@ -195,7 +200,7 @@ public class ActorEditPartTN extends UMLNodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(30, 50);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(30, 50);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorFloatingLabelEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorFloatingLabelEditPartTN.java
new file mode 100644
index 00000000000..8c452e4eb25
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorFloatingLabelEditPartTN.java
@@ -0,0 +1,861 @@
+/**
+ * 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.usecase.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 ActorFloatingLabelEditPartTN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6048;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorFloatingLabelEditPartTN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ActorFloatingLabelEditPartTN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Actor_2011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorFloatingLabelEditPartTN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentAppliedStereotypeEditPart.java
index 05a71831654..88c7d3cfa0d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentAppliedStereotypeEditPart.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -60,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -150,6 +150,7 @@ public class ActorInComponentAppliedStereotypeEditPart extends AbstractLabelEdit
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentEditPart.java
index 2771ac5fe9f..b2ffa353abd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentEditPart.java
@@ -29,25 +29,26 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.usecase.draw2d.StickMan;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ActorInComponentItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ExternalNodeActorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class ActorInComponentEditPart extends UMLNodeEditPart {
+public class ActorInComponentEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -79,7 +80,7 @@ public class ActorInComponentEditPart extends UMLNodeEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActorInComponentItemSemanticEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, new ExternalNodeActorLayoutEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -97,6 +98,7 @@ public class ActorInComponentEditPart extends UMLNodeEditPart {
case ActorInComponentNameEditPart.VISUAL_ID:
case ActorInComponentAppliedStereotypeEditPart.VISUAL_ID:
case ActorQualifiedNameInCEditPart.VISUAL_ID:
+ case ActorInComponentFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
@@ -157,7 +159,7 @@ public class ActorInComponentEditPart extends UMLNodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new StickMan();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -166,8 +168,8 @@ public class ActorInComponentEditPart extends UMLNodeEditPart {
* @generated
*/
@Override
- public StickMan getPrimaryShape() {
- return (StickMan) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -184,6 +186,9 @@ public class ActorInComponentEditPart extends UMLNodeEditPart {
} else if (borderItemEditPart instanceof ActorQualifiedNameInCEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else if (borderItemEditPart instanceof ActorInComponentFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else
{
super.addBorderItem(borderItemContainer, borderItemEditPart);
@@ -195,7 +200,7 @@ public class ActorInComponentEditPart extends UMLNodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(30, 50);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(30, 50);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentFloatingLabelEditPart.java
new file mode 100644
index 00000000000..b5b51b66163
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.usecase.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 ActorInComponentFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6050;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInComponentFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ActorInComponentFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Actor_3018, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInComponentFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentNameEditPart.java
index c78dfaee415..4986b4eed80 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInComponentNameEditPart.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -62,6 +61,7 @@ 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.gmfdiag.common.editpart.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +148,7 @@ public class ActorInComponentNameEditPart extends PapyrusLabelEditPart implement
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageAppliedStereotypeEditPart.java
index 1bd86c5eef0..1857d4416a9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageAppliedStereotypeEditPart.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -60,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -150,6 +150,7 @@ public class ActorInPackageAppliedStereotypeEditPart extends AbstractLabelEditPa
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageEditPart.java
index 68ec27f7e75..83c7caa1a85 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageEditPart.java
@@ -29,25 +29,26 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.common.editparts.RoundedCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
-import org.eclipse.papyrus.uml.diagram.usecase.draw2d.StickMan;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ActorInPackageItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ExternalNodeActorLayoutEditPolicy;
import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class ActorInPackageEditPart extends UMLNodeEditPart {
+public class ActorInPackageEditPart extends RoundedCompartmentEditPart {
/**
* @generated
@@ -79,7 +80,7 @@ public class ActorInPackageEditPart extends UMLNodeEditPart {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ActorInPackageItemSemanticEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- installEditPolicy(EditPolicy.LAYOUT_ROLE, new ExternalNodeActorLayoutEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -97,6 +98,7 @@ public class ActorInPackageEditPart extends UMLNodeEditPart {
case ActorInPackageNameEditPart.VISUAL_ID:
case ActorInPackageAppliedStereotypeEditPart.VISUAL_ID:
case ActorQualifiedNameInPEditPart.VISUAL_ID:
+ case ActorInPackageFloatingLabelEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
@Override
@@ -157,7 +159,7 @@ public class ActorInPackageEditPart extends UMLNodeEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new StickMan();
+ return primaryShape = new RoundedCompartmentFigure();
}
/**
@@ -166,8 +168,8 @@ public class ActorInPackageEditPart extends UMLNodeEditPart {
* @generated
*/
@Override
- public StickMan getPrimaryShape() {
- return (StickMan) primaryShape;
+ public RoundedCompartmentFigure getPrimaryShape() {
+ return (RoundedCompartmentFigure) primaryShape;
}
/**
@@ -184,6 +186,9 @@ public class ActorInPackageEditPart extends UMLNodeEditPart {
} else if (borderItemEditPart instanceof ActorQualifiedNameInPEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else if (borderItemEditPart instanceof ActorInPackageFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
} else
{
super.addBorderItem(borderItemContainer, borderItemEditPart);
@@ -195,7 +200,7 @@ public class ActorInPackageEditPart extends UMLNodeEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(30, 50);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(30, 50);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageFloatingLabelEditPart.java
new file mode 100644
index 00000000000..9df3299ffc0
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.usecase.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 ActorInPackageFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6049;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInPackageFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ActorInPackageFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Actor_3011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInPackageFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageNameEditPart.java
index 25b6d9c329f..2b86ed10ecb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorInPackageNameEditPart.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -62,6 +61,7 @@ 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.gmfdiag.common.editpart.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -148,6 +148,7 @@ public class ActorInPackageNameEditPart extends PapyrusLabelEditPart implements
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorNameEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorNameEditPartTN.java
index fbd4436cf7e..46939bf09a0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorNameEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorNameEditPartTN.java
@@ -1,880 +1,882 @@
-/**
- * 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.usecase.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.draw2d.geometry.Rectangle;
-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.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-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.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.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.gmfdiag.common.editpart.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editparts.ILabelRoleProvider;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 ActorNameEditPartTN extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart, ILabelRoleProvider {
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorNameEditPartTN.VISUAL_ID), new Point(0, 0));
- }
-
- /**
- * @generated
- */
- public ActorNameEditPartTN(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if (parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator) constraint;
- }
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public void refreshBounds() {
- int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Actor_2011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorNameEditPartTN.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new PapyrusWrappingLabel();
- }
-
- /**
- * @generated
- */
- @Override
- public String getLabelRole() {
- return "Name";//$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- @Override
- public String getIconPathRole() {
- return "platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png";//$NON-NLS-1$
- }
-}
+/**
+ * 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.usecase.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.gmfdiag.common.editpart.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.ILabelRoleProvider;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 ActorNameEditPartTN extends PapyrusLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart, ILabelRoleProvider {
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorNameEditPartTN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ActorNameEditPartTN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Actor_2011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorNameEditPartTN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getLabelRole() {
+ return "Name";//$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getIconPathRole() {
+ return "platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png";//$NON-NLS-1$
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameEditPartTN.java
index e00b58b723b..525abe26034 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameEditPartTN.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -60,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -149,6 +149,7 @@ public class ActorQualifiedNameEditPartTN extends AbstractLabelEditPart implemen
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameInCEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameInCEditPart.java
index 1d8df913678..85bfcbcaf41 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameInCEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameInCEditPart.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -61,6 +60,7 @@ 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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -149,6 +149,7 @@ public class ActorQualifiedNameInCEditPart extends PapyrusLabelEditPart implemen
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameInPEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameInPEditPart.java
index 5306edadbf7..4787112ea47 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameInPEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ActorQualifiedNameInPEditPart.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -61,6 +60,7 @@ 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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -149,6 +149,7 @@ public class ActorQualifiedNameInPEditPart extends PapyrusLabelEditPart implemen
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayExternalNodeEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypeAbstractionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypeAbstractionEditPart.java
index e54c2fe4272..4c3b38af25e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypeAbstractionEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypeAbstractionEditPart.java
@@ -1,821 +1,822 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 AppliedStereotypeAbstractionEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6014;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AppliedStereotypeAbstractionEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypeAbstractionEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4015, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AppliedStereotypeAbstractionEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 AppliedStereotypeAbstractionEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6014;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AppliedStereotypeAbstractionEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypeAbstractionEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Abstraction_4015, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AppliedStereotypeAbstractionEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypePackageMergeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypePackageMergeEditPart.java
index 49ea08d8fe7..ceed6ce2419 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypePackageMergeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypePackageMergeEditPart.java
@@ -1,821 +1,822 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 AppliedStereotypePackageMergeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 0;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AppliedStereotypePackageMergeEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypePackageMergeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.PackageMerge_4018, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AppliedStereotypePackageMergeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 AppliedStereotypePackageMergeEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 0;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AppliedStereotypePackageMergeEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypePackageMergeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.PackageMerge_4018, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AppliedStereotypePackageMergeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypeUsageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypeUsageEditPart.java
index 5d1672388df..266f14848ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypeUsageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AppliedStereotypeUsageEditPart.java
@@ -1,821 +1,822 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 AppliedStereotypeUsageEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6013;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AppliedStereotypeUsageEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public AppliedStereotypeUsageEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Usage_4016, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AppliedStereotypeUsageEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 AppliedStereotypeUsageEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6013;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AppliedStereotypeUsageEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public AppliedStereotypeUsageEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Usage_4016, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AppliedStereotypeUsageEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AssociationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AssociationAppliedStereotypeEditPart.java
index 3a56d9db3ff..a040b5c4e46 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AssociationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AssociationAppliedStereotypeEditPart.java
@@ -1,821 +1,822 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6033;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AssociationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public AssociationAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Association_4011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AssociationAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 AssociationAppliedStereotypeEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6033;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AssociationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public AssociationAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Association_4011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AssociationAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AssociationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AssociationNameEditPart.java
index ee5628af625..f562d853843 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AssociationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/AssociationNameEditPart.java
@@ -1,829 +1,830 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 AssociationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6008;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AssociationNameEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public AssociationNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Association_4011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AssociationNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 AssociationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6008;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AssociationNameEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public AssociationNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Association_4011, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AssociationNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentBodyEditPartCN.java
index 443f4572ef8..e753100593a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentBodyEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentBodyEditPartCN.java
@@ -29,7 +29,6 @@ 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;
@@ -848,7 +847,7 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentBodyEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentBodyEditPartTN.java
index f88896c04aa..19f45289bbe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentBodyEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentBodyEditPartTN.java
@@ -29,7 +29,6 @@ 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;
@@ -848,7 +847,7 @@ public class CommentBodyEditPartTN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentEditPartCN.java
index 1575a97fd08..8ac06660068 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentEditPartCN.java
@@ -23,11 +23,11 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.editpolicies.PapyrusReflowableShapeEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -196,7 +196,7 @@ public class CommentEditPartCN extends AbstractCommentEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentEditPartTN.java
index 68ac7c4f477..232f44427fb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/CommentEditPartTN.java
@@ -23,11 +23,11 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.editpolicies.PapyrusReflowableShapeEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -76,6 +76,7 @@ public class CommentEditPartTN extends AbstractCommentEditPart {
installEditPolicy(EditPolicyRoles.OPEN_ROLE,
new OpenDiagramEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusReflowableShapeEditPolicy());
// 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);
}
@@ -195,7 +196,7 @@ public class CommentEditPartTN extends AbstractCommentEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInComponentEditPart.java
index 10859a3df82..329b0aa4b71 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInComponentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInComponentEditPart.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -208,7 +208,7 @@ public class ComponentInComponentEditPart extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 400);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(200, 400);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInComponentNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInComponentNameEditPart.java
index e10d536fe29..7caa1697a86 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInComponentNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInComponentNameEditPart.java
@@ -29,7 +29,6 @@ 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;
@@ -848,7 +847,7 @@ public class ComponentInComponentNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageEditPart.java
index f6f9d104276..1e48e438cb3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageEditPart.java
@@ -11,36 +11,48 @@
*/
package org.eclipse.papyrus.uml.diagram.usecase.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
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.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.SubjectNodeEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ComponentInPackageItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseSubjectFigure;
+import org.eclipse.papyrus.uml.diagram.usecase.figure.SubjectFigure;
import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class ComponentInPackageEditPart extends NamedElementEditPart {
+public class ComponentInPackageEditPart extends SubjectNodeEditPart {
/**
* @generated
@@ -74,6 +86,7 @@ public class ComponentInPackageEditPart extends NamedElementEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -86,6 +99,20 @@ public class ComponentInPackageEditPart extends NamedElementEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case ComponentInPackageFloatingLabelEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -113,6 +140,19 @@ public class ComponentInPackageEditPart extends NamedElementEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -122,7 +162,7 @@ public class ComponentInPackageEditPart extends NamedElementEditPart {
*/
@Override
protected IFigure createNodeShape() {
- return primaryShape = new UseCaseSubjectFigure();
+ return primaryShape = new SubjectFigure();
}
/**
@@ -131,8 +171,8 @@ public class ComponentInPackageEditPart extends NamedElementEditPart {
* @generated
*/
@Override
- public UseCaseSubjectFigure getPrimaryShape() {
- return (UseCaseSubjectFigure) primaryShape;
+ public SubjectFigure getPrimaryShape() {
+ return (SubjectFigure) primaryShape;
}
/**
@@ -140,13 +180,13 @@ public class ComponentInPackageEditPart extends NamedElementEditPart {
*/
protected boolean addFixedChild(EditPart childEditPart) {
if (childEditPart instanceof ComponentInPackageNameEditPart) {
- ((ComponentInPackageNameEditPart) childEditPart).setLabel(getPrimaryShape().getUseCaseSubjectFigure_name());
+ ((ComponentInPackageNameEditPart) childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
if (childEditPart instanceof ComponentUsecases3EditPart) {
- IFigure pane = getPrimaryShape().getUseCaseSubjectFigure_contents();
+ IFigure pane = getPrimaryShape().getUseCasesContainerFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ComponentUsecases3EditPart) childEditPart).getFigure());
return true;
@@ -163,7 +203,7 @@ public class ComponentInPackageEditPart extends NamedElementEditPart {
return true;
}
if (childEditPart instanceof ComponentUsecases3EditPart) {
- IFigure pane = getPrimaryShape().getUseCaseSubjectFigure_contents();
+ IFigure pane = getPrimaryShape().getUseCasesContainerFigure();
pane.remove(((ComponentUsecases3EditPart) childEditPart).getFigure());
return true;
}
@@ -198,7 +238,10 @@ public class ComponentInPackageEditPart extends NamedElementEditPart {
@Override
protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
if (editPart instanceof ComponentUsecases3EditPart) {
- return getPrimaryShape().getUseCaseSubjectFigure_contents();
+ return getPrimaryShape().getUseCasesContainerFigure();
+ }
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
}
return getContentPane();
}
@@ -207,8 +250,22 @@ public class ComponentInPackageEditPart extends NamedElementEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof ComponentInPackageFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 400);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(200, 400);
return result;
}
@@ -221,7 +278,7 @@ public class ComponentInPackageEditPart extends NamedElementEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageFloatingLabelEditPart.java
new file mode 100644
index 00000000000..ff5874efb8b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.usecase.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 ComponentInPackageFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6051;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInPackageFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public ComponentInPackageFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Component_3013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInPackageFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageNameEditPart.java
index 82148d2284a..0ac6fcfaed0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentInPackageNameEditPart.java
@@ -18,6 +18,7 @@ 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;
@@ -29,7 +30,6 @@ 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;
@@ -58,6 +58,8 @@ 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;
@@ -65,6 +67,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEd
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.usecase.edit.policies.UMLTextSelectionEditPolicy;
import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
@@ -240,6 +243,16 @@ public class ComponentInPackageNameEditPart extends PapyrusCompartmentEditPart i
* @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;
}
@@ -818,6 +831,9 @@ public class ComponentInPackageNameEditPart extends PapyrusCompartmentEditPart i
}
}
}
+ if (event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation) event.getNewValue()).getSource())) {
+ refreshLabel();
+ }
super.handleNotificationEvent(event);
}
@@ -848,7 +864,7 @@ public class ComponentInPackageNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentUsecases2EditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentUsecases2EditPart.java
index b32e80c73f5..ce5d208bf6f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentUsecases2EditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentUsecases2EditPart.java
@@ -77,8 +77,8 @@ public class ComponentUsecases2EditPart extends ShapeCompartmentEditPart {
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ComponentUsecases2CanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ComponentUsecases2CanonicalEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentUsecases3EditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentUsecases3EditPart.java
index 5fdc7fb1f79..278df43c447 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentUsecases3EditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ComponentUsecases3EditPart.java
@@ -17,11 +17,13 @@ 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.ShapeCompartmentEditPart;
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.diagram.ui.figures.ResizableCompartmentFigure;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
import org.eclipse.gmf.runtime.notation.NotationPackage;
@@ -73,12 +75,13 @@ public class ComponentUsecases3EditPart extends ShapeCompartmentEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ComponentUsecases3ItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ComponentUsecases3CanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.ComponentUsecases3CanonicalEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyEditPart.java
index ea81bfc4738..1b01f3f03dd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyEditPart.java
@@ -29,7 +29,6 @@ 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;
@@ -848,7 +847,7 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyInCEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyInCEditPart.java
index 6d1d2549054..9411f231f80 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyInCEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyInCEditPart.java
@@ -29,7 +29,6 @@ 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;
@@ -848,7 +847,7 @@ public class ConstraintBodyInCEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyInPEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyInPEditPart.java
index 61fc0806085..116485fb5e0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyInPEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintBodyInPEditPart.java
@@ -29,7 +29,6 @@ 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;
@@ -848,7 +847,7 @@ public class ConstraintBodyInPEditPart extends PapyrusCompartmentEditPart implem
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintEditPartTN.java
index 9cc7ec4b2f9..7fa94b35fd4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintEditPartTN.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -198,7 +198,7 @@ public class ConstraintEditPartTN extends AbstractConstraintEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInComponentEditPart.java
index 615790aa8bd..24f10b58646 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInComponentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInComponentEditPart.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -198,7 +198,7 @@ public class ConstraintInComponentEditPart extends AbstractConstraintEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInComponentNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInComponentNameEditPart.java
index 0494ecb9da1..d34c49f611a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInComponentNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInComponentNameEditPart.java
@@ -29,7 +29,6 @@ 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;
@@ -848,7 +847,7 @@ public class ConstraintInComponentNameEditPart extends PapyrusCompartmentEditPar
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInPackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInPackageEditPart.java
index b7690c1e4ac..27963f257d1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInPackageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInPackageEditPart.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -198,7 +198,7 @@ public class ConstraintInPackageEditPart extends AbstractConstraintEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInPackageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInPackageNameEditPart.java
index 4fbdea32af5..6b28f98f794 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInPackageNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintInPackageNameEditPart.java
@@ -29,7 +29,6 @@ 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;
@@ -848,7 +847,7 @@ public class ConstraintInPackageNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintNameEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintNameEditPartTN.java
index 7ea75dbbf44..863f23e08ae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintNameEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ConstraintNameEditPartTN.java
@@ -29,7 +29,6 @@ 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;
@@ -848,7 +847,7 @@ public class ConstraintNameEditPartTN extends PapyrusCompartmentEditPart impleme
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DefaultNamedElementEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DefaultNamedElementEditPartTN.java
index 7a3f715e7bf..2c9bdec0a14 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DefaultNamedElementEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DefaultNamedElementEditPartTN.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -195,7 +195,7 @@ public class DefaultNamedElementEditPartTN extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(100, 50);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DefaultNamedElementNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DefaultNamedElementNameEditPart.java
index a4f99478c05..74bd48d7891 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DefaultNamedElementNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DefaultNamedElementNameEditPart.java
@@ -30,7 +30,6 @@ 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;
@@ -865,7 +864,7 @@ public class DefaultNamedElementNameEditPart extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DependencyAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DependencyAppliedStereotypeEditPart.java
index 45208e51645..edeb711a9e3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DependencyAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DependencyAppliedStereotypeEditPart.java
@@ -1,821 +1,822 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6034;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.DependencyAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public DependencyAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.DependencyAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 DependencyAppliedStereotypeEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6034;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.DependencyAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public DependencyAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.DependencyAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DependencyNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DependencyNameEditPart.java
index 1fe99cf31f3..8d92095674b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DependencyNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DependencyNameEditPart.java
@@ -1,829 +1,830 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 DependencyNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6010;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.DependencyNameEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public DependencyNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.DependencyNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 DependencyNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6010;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.DependencyNameEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public DependencyNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Dependency_4013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.DependencyNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DiagramNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DiagramNameEditPart.java
index ca60f966eab..1765c8dd5b1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DiagramNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/DiagramNameEditPart.java
@@ -30,7 +30,6 @@ 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.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
@@ -60,6 +59,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.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
@@ -146,6 +146,7 @@ public class DiagramNameEditPart extends AbstractShortcutDiagramNameEditPart imp
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtendAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtendAppliedStereotypeEditPart.java
index dfbcf7787cc..b88b1020aac 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtendAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtendAppliedStereotypeEditPart.java
@@ -1,821 +1,822 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 ExtendAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6031;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ExtendAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public ExtendAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Extend_4009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ExtendAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 ExtendAppliedStereotypeEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6031;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ExtendAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public ExtendAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Extend_4009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ExtendAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtendsLink_fixedEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtendsLink_fixedEditPart.java
index 814f274a90b..25aca2da707 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtendsLink_fixedEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtendsLink_fixedEditPart.java
@@ -1,830 +1,831 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.figure.ExtendsLink_fixed;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 ExtendsLink_fixedEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6007;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ExtendsLink_fixedEditPart.VISUAL_ID), new Point(0, 20));
- }
-
- /**
- * @generated
- */
- public ExtendsLink_fixedEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Extend_4009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ExtendsLink_fixedEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new ExtendsLink_fixed();
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.figure.ExtendsLink_fixed;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 ExtendsLink_fixedEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6007;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ExtendsLink_fixedEditPart.VISUAL_ID), new Point(0, 20));
+ }
+
+ /**
+ * @generated
+ */
+ public ExtendsLink_fixedEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Extend_4009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ExtendsLink_fixedEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new ExtendsLink_fixed();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtensionPointEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtensionPointEditPart.java
index 5ed15841e17..f7ab8447b8f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtensionPointEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtensionPointEditPart.java
@@ -31,7 +31,6 @@ import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.gef.tools.DirectEditManager;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtensionPointInRectangleEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtensionPointInRectangleEditPart.java
index fcb973fc3e1..da2b301a9b7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtensionPointInRectangleEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ExtensionPointInRectangleEditPart.java
@@ -31,7 +31,6 @@ import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.gef.tools.DirectEditManager;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/GeneralizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/GeneralizationAppliedStereotypeEditPart.java
index 770e946fa88..2eef7af2086 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/GeneralizationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/GeneralizationAppliedStereotypeEditPart.java
@@ -1,821 +1,822 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6032;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.GeneralizationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public GeneralizationAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Generalization_4010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.GeneralizationAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 GeneralizationAppliedStereotypeEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6032;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.GeneralizationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public GeneralizationAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Generalization_4010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.GeneralizationAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/IncludeAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/IncludeAppliedStereotypeEditPart.java
index 3e0bbd185bf..8df562716f6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/IncludeAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/IncludeAppliedStereotypeEditPart.java
@@ -1,821 +1,822 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 IncludeAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6030;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.IncludeAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public IncludeAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Include_4008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.IncludeAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 IncludeAppliedStereotypeEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6030;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.IncludeAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public IncludeAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Include_4008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.IncludeAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/IncludeLink_fixedEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/IncludeLink_fixedEditPart.java
index 3bf359b9fea..cd1b2dd3f44 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/IncludeLink_fixedEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/IncludeLink_fixedEditPart.java
@@ -1,830 +1,831 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.figure.IncludeLink_fixed;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 IncludeLink_fixedEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6006;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.IncludeLink_fixedEditPart.VISUAL_ID), new Point(0, 20));
- }
-
- /**
- * @generated
- */
- public IncludeLink_fixedEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Include_4008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.IncludeLink_fixedEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new IncludeLink_fixed();
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.figure.IncludeLink_fixed;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 IncludeLink_fixedEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6006;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.IncludeLink_fixedEditPart.VISUAL_ID), new Point(0, 20));
+ }
+
+ /**
+ * @generated
+ */
+ public IncludeLink_fixedEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Include_4008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.IncludeLink_fixedEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new IncludeLink_fixed();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageEditPartCN.java
index dd1bcf78acd..16256e5e251 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageEditPartCN.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -211,7 +211,7 @@ public class PackageEditPartCN extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 150);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 150);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageEditPartTN.java
index f263c53dc79..61febc56297 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageEditPartTN.java
@@ -23,10 +23,10 @@ import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -211,7 +211,7 @@ public class PackageEditPartTN extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(150, 150);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(150, 150);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageImportAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageImportAppliedStereotypeEditPart.java
index 9b44a3fcdee..805c4112e89 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageImportAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageImportAppliedStereotypeEditPart.java
@@ -1,821 +1,822 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6036;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.PackageImportAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public PackageImportAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.PackageImport_4019, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.PackageImportAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 PackageImportAppliedStereotypeEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6036;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.PackageImportAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public PackageImportAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.PackageImport_4019, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.PackageImportAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageNameEditPartCN.java
index e63647f3da0..7b3e0072032 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageNameEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageNameEditPartCN.java
@@ -30,7 +30,6 @@ 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;
@@ -865,7 +864,7 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageNameEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageNameEditPartTN.java
index 854fa65c1b9..b17e851cac7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageNameEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackageNameEditPartTN.java
@@ -30,7 +30,6 @@ 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;
@@ -865,7 +864,7 @@ public class PackageNameEditPartTN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackagePackageableElementCompartment2EditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackagePackageableElementCompartment2EditPart.java
index a3cd87c010b..3b3d9c88df9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackagePackageableElementCompartment2EditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackagePackageableElementCompartment2EditPart.java
@@ -79,8 +79,8 @@ public class PackagePackageableElementCompartment2EditPart extends ShapeCompartm
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.PackagePackageableElementCompartment2CanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.PackagePackageableElementCompartment2CanonicalEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackagePackageableElementCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackagePackageableElementCompartmentEditPart.java
index 3e4d746902f..bf5d69daf29 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackagePackageableElementCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/PackagePackageableElementCompartmentEditPart.java
@@ -79,8 +79,8 @@ public class PackagePackageableElementCompartmentEditPart extends ShapeCompartme
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.PackagePackageableElementCompartmentCanonicalEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomContainerEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/RealizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/RealizationAppliedStereotypeEditPart.java
index 75a9300623b..dee9284d8db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/RealizationAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/RealizationAppliedStereotypeEditPart.java
@@ -1,821 +1,822 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6035;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
- }
-
- /**
- * @generated
- */
- public RealizationAppliedStereotypeEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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 false;
- }
-
- /**
- * @generated
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Realization_4017, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationAppliedStereotypeEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
- // The label is read-only (defined in GMFGen model)
- 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 RealizationAppliedStereotypeEditPart extends AbstractLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6035;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationAppliedStereotypeEditPart.VISUAL_ID), new Point(0, -20));
+ }
+
+ /**
+ * @generated
+ */
+ public RealizationAppliedStereotypeEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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 false;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Realization_4017, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationAppliedStereotypeEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+ // The label is read-only (defined in GMFGen model)
+ 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/RealizationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/RealizationNameEditPart.java
index 4bea0b7fb28..4d66bb90f1a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/RealizationNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/RealizationNameEditPart.java
@@ -1,829 +1,830 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 RealizationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6015;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationNameEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public RealizationNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Realization_4017, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 RealizationNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6015;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationNameEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public RealizationNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Realization_4017, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ShortCutDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ShortCutDiagramEditPart.java
index bf44c7de584..72c944449e3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ShortCutDiagramEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/ShortCutDiagramEditPart.java
@@ -31,12 +31,12 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortCutDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShortCutDiagramEditPolicy;
@@ -189,7 +189,7 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(20, 20);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(20, 20);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierEditPartTN.java
index d0bc212a36b..a3e5c30044f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierEditPartTN.java
@@ -11,27 +11,39 @@
*/
package org.eclipse.papyrus.uml.diagram.usecase.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
-import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
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.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.locator.RoundedRectangleLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.SubjectNodeEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.SubjectClassifierItemSemanticEditPolicyTN;
import org.eclipse.papyrus.uml.diagram.usecase.figure.SubjectFigure;
import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
@@ -40,7 +52,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class SubjectClassifierEditPartTN extends NamedElementEditPart {
+public class SubjectClassifierEditPartTN extends SubjectNodeEditPart {
/**
* @generated
@@ -74,6 +86,7 @@ public class SubjectClassifierEditPartTN extends NamedElementEditPart {
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -86,6 +99,20 @@ public class SubjectClassifierEditPartTN extends NamedElementEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case SubjectClassifierFloatingLabelEditPartTN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -113,6 +140,19 @@ public class SubjectClassifierEditPartTN extends NamedElementEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -200,6 +240,9 @@ public class SubjectClassifierEditPartTN extends NamedElementEditPart {
if (editPart instanceof SubjectComponentUsecasesEditPart) {
return getPrimaryShape().getUseCasesContainerFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -207,8 +250,22 @@ public class SubjectClassifierEditPartTN extends NamedElementEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof SubjectClassifierFloatingLabelEditPartTN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 400);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(200, 400);
return result;
}
@@ -221,7 +278,7 @@ public class SubjectClassifierEditPartTN extends NamedElementEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierFloatingLabelEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierFloatingLabelEditPartTN.java
new file mode 100644
index 00000000000..0d1fb8d7110
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierFloatingLabelEditPartTN.java
@@ -0,0 +1,861 @@
+/**
+ * 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.usecase.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 SubjectClassifierFloatingLabelEditPartTN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6047;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectClassifierFloatingLabelEditPartTN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public SubjectClassifierFloatingLabelEditPartTN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Classifier_2015, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectClassifierFloatingLabelEditPartTN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierNameEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierNameEditPartTN.java
index 6f87ee93634..6ec5498edad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierNameEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectClassifierNameEditPartTN.java
@@ -30,7 +30,6 @@ 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;
@@ -865,7 +864,7 @@ public class SubjectClassifierNameEditPartTN extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectComponentUsecasesEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectComponentUsecasesEditPart.java
index 82edfcd7c40..7ad5ce959b3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectComponentUsecasesEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/SubjectComponentUsecasesEditPart.java
@@ -17,15 +17,18 @@ 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.ShapeCompartmentEditPart;
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.diagram.ui.figures.ResizableCompartmentFigure;
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.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CustomDiagramDragDropEditPolicy;
@@ -73,14 +76,16 @@ public class SubjectComponentUsecasesEditPart extends ShapeCompartmentEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SubjectComponentUsecasesItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.SubjectComponentUsecasesCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.SubjectComponentUsecasesCanonicalEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UMLEditPartFactory.java
index 5b0f87dbbf5..ffe75015805 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UMLEditPartFactory.java
@@ -54,6 +54,9 @@ public class UMLEditPartFactory implements EditPartFactory {
case ActorQualifiedNameEditPartTN.VISUAL_ID:
return new ActorQualifiedNameEditPartTN(view);
+ case ActorFloatingLabelEditPartTN.VISUAL_ID:
+ return new ActorFloatingLabelEditPartTN(view);
+
case ActorAsRectangleEditPartTN.VISUAL_ID:
return new ActorAsRectangleEditPartTN(view);
@@ -66,6 +69,9 @@ public class UMLEditPartFactory implements EditPartFactory {
case UseCaseNameEditPartTN.VISUAL_ID:
return new UseCaseNameEditPartTN(view);
+ case UseCaseFloatingLabelEditPartTN.VISUAL_ID:
+ return new UseCaseFloatingLabelEditPartTN(view);
+
case UseCaseAsRectangleEditPartTN.VISUAL_ID:
return new UseCaseAsRectangleEditPartTN(view);
@@ -78,6 +84,9 @@ public class UMLEditPartFactory implements EditPartFactory {
case SubjectClassifierNameEditPartTN.VISUAL_ID:
return new SubjectClassifierNameEditPartTN(view);
+ case SubjectClassifierFloatingLabelEditPartTN.VISUAL_ID:
+ return new SubjectClassifierFloatingLabelEditPartTN(view);
+
case PackageEditPartTN.VISUAL_ID:
return new PackageEditPartTN(view);
@@ -123,6 +132,9 @@ public class UMLEditPartFactory implements EditPartFactory {
case UseCaseInComponentNameEditPart.VISUAL_ID:
return new UseCaseInComponentNameEditPart(view);
+ case UseCaseInComponentFloatingLabelEditPart.VISUAL_ID:
+ return new UseCaseInComponentFloatingLabelEditPart(view);
+
case ComponentInComponentEditPart.VISUAL_ID:
return new ComponentInComponentEditPart(view);
@@ -156,6 +168,9 @@ public class UMLEditPartFactory implements EditPartFactory {
case ActorQualifiedNameInCEditPart.VISUAL_ID:
return new ActorQualifiedNameInCEditPart(view);
+ case ActorInComponentFloatingLabelEditPart.VISUAL_ID:
+ return new ActorInComponentFloatingLabelEditPart(view);
+
case ConstraintInPackageEditPart.VISUAL_ID:
return new ConstraintInPackageEditPart(view);
@@ -177,18 +192,27 @@ public class UMLEditPartFactory implements EditPartFactory {
case ActorQualifiedNameInPEditPart.VISUAL_ID:
return new ActorQualifiedNameInPEditPart(view);
+ case ActorInPackageFloatingLabelEditPart.VISUAL_ID:
+ return new ActorInPackageFloatingLabelEditPart(view);
+
case UseCaseInPackageEditPart.VISUAL_ID:
return new UseCaseInPackageEditPart(view);
case UseCaseInPackageNameEditPart.VISUAL_ID:
return new UseCaseInPackageNameEditPart(view);
+ case UseCaseInPackageFloatingLabelEditPart.VISUAL_ID:
+ return new UseCaseInPackageFloatingLabelEditPart(view);
+
case ComponentInPackageEditPart.VISUAL_ID:
return new ComponentInPackageEditPart(view);
case ComponentInPackageNameEditPart.VISUAL_ID:
return new ComponentInPackageNameEditPart(view);
+ case ComponentInPackageFloatingLabelEditPart.VISUAL_ID:
+ return new ComponentInPackageFloatingLabelEditPart(view);
+
case PackageEditPartCN.VISUAL_ID:
return new PackageEditPartCN(view);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UsageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UsageNameEditPart.java
index 0033ae850d0..a8e9e2831c4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UsageNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UsageNameEditPart.java
@@ -1,829 +1,830 @@
-/**
- * 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.usecase.edit.parts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.ConnectionLocator;
-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.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.PapyrusLabelEditPart;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
-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.usecase.edit.policies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.usecase.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 UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
-
- /**
- * @generated
- */
- public static final int VISUAL_ID = 6012;
-
- /**
- * @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
- */
- static {
- registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UsageNameEditPart.VISUAL_ID), new Point(0, 40));
- }
-
- /**
- * @generated
- */
- public UsageNameEditPart(View view) {
- super(view);
- }
-
- /**
- * @generated
- */
- @Override
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
- }
-
- /**
- * @generated
- */
- @Override
- public int getKeyPoint() {
- return ConnectionLocator.MIDDLE;
- }
-
- /**
- * @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
- */
- @Override
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @generated
- */
- @Override
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- 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
- */
- @Override
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- 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>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
-
- // shouldn't get here
- return null;
- }
- };
- }
-
- /**
- * @generated
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor() {
- if (getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- /**
- * @generated
- */
- @Override
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- /**
- * @generated
- */
- @Override
- public IParser getParser() {
- if (parser == null) {
- parser = UMLParserProvider.getParser(UMLElementTypes.Usage_4016, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UsageNameEditPart.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() {
-
- @Override
- 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
- */
- @Override
- 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(), configuration.getTextToEdit(resolveSemanticElement()),
- 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() {
- @Override
- 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
- */
- @Override
- 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) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if (maskLabelPolicy == null) {
- View view = (View) getModel();
- if (view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
- }
- }
-
- /**
- * @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
- */
- @Override
- 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
- */
- @Override
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- /**
- * @generated
- */
- @Override
- 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
- */
- @Override
- protected void removeSemanticListeners() {
- if (parserElements != null) {
- for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected AccessibleEditPart getAccessibleEditPart() {
- if (accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- /**
- * @generated
- */
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * 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() {
-
- @Override
- 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
- */
- @Override
- protected void handleNotificationEvent(Notification event) {
- 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
- */
- @Override
- protected IFigure createFigure() {
- // Parent should assign one using setLabel() method
- return null;
- }
-}
+/**
+ * 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.usecase.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ConnectionLocator;
+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.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.DefaultLinkLabelDragPolicy;
+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.PapyrusLabelEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.PapyrusLinkLabelDragPolicy;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6012;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UsageNameEditPart.VISUAL_ID), new Point(0, 40));
+ }
+
+ /**
+ * @generated
+ */
+ public UsageNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PapyrusLinkLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public int getKeyPoint() {
+ return ConnectionLocator.MIDDLE;
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Usage_4016, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UsageNameEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseAsRectangleEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseAsRectangleEditPartTN.java
index 65ebf639a1f..7da4b6b45ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseAsRectangleEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseAsRectangleEditPartTN.java
@@ -26,10 +26,10 @@ 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.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
@@ -213,7 +213,7 @@ public class UseCaseAsRectangleEditPartTN extends NamedElementEditPart {
*/
@Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(40, 40);
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseAsRectangleNameEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseAsRectangleNameEditPartTN.java
index 7024753ec9e..5145ba448ca 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseAsRectangleNameEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseAsRectangleNameEditPartTN.java
@@ -30,7 +30,6 @@ 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;
@@ -865,7 +864,7 @@ public class UseCaseAsRectangleNameEditPartTN extends PapyrusCompartmentEditPart
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseDiagramEditPart.java
index 1440ffd54b7..812899f6521 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseDiagramEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseDiagramEditPart.java
@@ -53,8 +53,8 @@ public class UseCaseDiagramEditPart extends PapyrusDiagramEditPart {
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new UseCaseDiagramItemSemanticEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UseCaseDiagramCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UseCaseDiagramCanonicalEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomUseCaseDiagramItemSemanticEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseEditPartTN.java
index 5208ab0ba82..15578bbc908 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseEditPartTN.java
@@ -11,32 +11,44 @@
*/
package org.eclipse.papyrus.uml.diagram.usecase.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
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.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.locator.RoundedRectangleLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.UseCaseNodeEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CreateExtensionPointEditPolicy;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UseCaseItemSemanticEditPolicyTN;
import org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseFigure;
@@ -47,7 +59,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class UseCaseEditPartTN extends NamedElementEditPart {
+public class UseCaseEditPartTN extends UseCaseNodeEditPart {
/**
* @generated
@@ -84,6 +96,7 @@ public class UseCaseEditPartTN extends NamedElementEditPart {
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CreateExtensionPointEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -96,6 +109,20 @@ public class UseCaseEditPartTN extends NamedElementEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case UseCaseFloatingLabelEditPartTN.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -123,6 +150,19 @@ public class UseCaseEditPartTN extends NamedElementEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -210,6 +250,9 @@ public class UseCaseEditPartTN extends NamedElementEditPart {
if (editPart instanceof UseCasePointsEditPartTN) {
return getPrimaryShape().getExtensionPointContainerFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -217,8 +260,22 @@ public class UseCaseEditPartTN extends NamedElementEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof UseCaseFloatingLabelEditPartTN) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(140, 60);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(140, 60);
return result;
}
@@ -231,7 +288,7 @@ public class UseCaseEditPartTN extends NamedElementEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseFloatingLabelEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseFloatingLabelEditPartTN.java
new file mode 100644
index 00000000000..f235cf13585
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseFloatingLabelEditPartTN.java
@@ -0,0 +1,861 @@
+/**
+ * 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.usecase.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 UseCaseFloatingLabelEditPartTN extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6038;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseFloatingLabelEditPartTN.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public UseCaseFloatingLabelEditPartTN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.UseCase_2013, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseFloatingLabelEditPartTN.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentEditPart.java
index 182b7c639d6..007df8119a3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentEditPart.java
@@ -11,32 +11,44 @@
*/
package org.eclipse.papyrus.uml.diagram.usecase.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
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.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.locator.RoundedRectangleLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.UseCaseNodeEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CreateExtensionPointEditPolicy;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UseCaseInComponentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseFigure;
@@ -47,7 +59,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class UseCaseInComponentEditPart extends NamedElementEditPart {
+public class UseCaseInComponentEditPart extends UseCaseNodeEditPart {
/**
* @generated
@@ -84,6 +96,7 @@ public class UseCaseInComponentEditPart extends NamedElementEditPart {
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CreateExtensionPointEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -96,6 +109,20 @@ public class UseCaseInComponentEditPart extends NamedElementEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case UseCaseInComponentFloatingLabelEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -123,6 +150,19 @@ public class UseCaseInComponentEditPart extends NamedElementEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -210,6 +250,9 @@ public class UseCaseInComponentEditPart extends NamedElementEditPart {
if (editPart instanceof UseCasePointsInComponentEditPart) {
return getPrimaryShape().getExtensionPointContainerFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -217,8 +260,22 @@ public class UseCaseInComponentEditPart extends NamedElementEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof UseCaseInComponentFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(140, 60);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(140, 60);
return result;
}
@@ -231,7 +288,7 @@ public class UseCaseInComponentEditPart extends NamedElementEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentFloatingLabelEditPart.java
new file mode 100644
index 00000000000..1a83ddc600c
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.usecase.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 UseCaseInComponentFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6045;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInComponentFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public UseCaseInComponentFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.UseCase_3009, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInComponentFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentNameEditPart.java
index 083a618be3a..d3a122afc1a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInComponentNameEditPart.java
@@ -30,7 +30,6 @@ 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;
@@ -865,7 +864,7 @@ public class UseCaseInComponentNameEditPart extends PapyrusCompartmentEditPart i
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageEditPart.java
index 3f8e78c5b07..99950198589 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageEditPart.java
@@ -11,32 +11,44 @@
*/
package org.eclipse.papyrus.uml.diagram.usecase.edit.parts;
+import java.util.Collections;
+import java.util.List;
+
import org.eclipse.draw2d.IFigure;
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.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.handles.MoveHandle;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
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.Edge;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.GetChildLayoutEditPolicy;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.RoundedRectangleNodePlateFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
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.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.locator.RoundedRectangleLabelPositionLocator;
+import org.eclipse.papyrus.uml.diagram.usecase.custom.edit.parts.UseCaseNodeEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.CreateExtensionPointEditPolicy;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UseCaseInPackageItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.usecase.figure.UseCaseFigure;
@@ -47,7 +59,7 @@ import org.eclipse.swt.graphics.Color;
/**
* @generated
*/
-public class UseCaseInPackageEditPart extends NamedElementEditPart {
+public class UseCaseInPackageEditPart extends UseCaseNodeEditPart {
/**
* @generated
@@ -84,6 +96,7 @@ public class UseCaseInPackageEditPart extends NamedElementEditPart {
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CreateExtensionPointEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new GetChildLayoutEditPolicy());
// 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);
}
@@ -96,6 +109,20 @@ public class UseCaseInPackageEditPart extends NamedElementEditPart {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
+ View childView = (View) child.getModel();
+ switch (UMLVisualIDRegistry.getVisualID(childView)) {
+ case UseCaseInPackageFloatingLabelEditPart.VISUAL_ID:
+ return new BorderItemSelectionEditPolicy() {
+
+ @Override
+ protected List<?> createSelectionHandles() {
+ MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost());
+ mh.setBorder(null);
+ return Collections.singletonList(mh);
+ }
+ }
+ ;
+ }
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
@@ -123,6 +150,19 @@ public class UseCaseInPackageEditPart extends NamedElementEditPart {
**/
@Override
protected void handleNotificationEvent(Notification event) {
+ /*
+ * when a node have external node labels, the methods refreshChildren() remove the EditPart corresponding to the Label from the EditPart
+ * Registry. After that, we can't reset the visibility to true (using the Show/Hide Label Action)!
+ */
+ if (NotationPackage.eINSTANCE.getView_Visible().equals(event.getFeature())) {
+ Object notifier = event.getNotifier();
+ List<?> modelChildren = ((View) getModel()).getChildren();
+ if (!(notifier instanceof Edge)) {
+ if (modelChildren.contains(event.getNotifier())) {
+ return;
+ }
+ }
+ }
super.handleNotificationEvent(event);
}
@@ -210,6 +250,9 @@ public class UseCaseInPackageEditPart extends NamedElementEditPart {
if (editPart instanceof UseCasePointsInPackageEditPart) {
return getPrimaryShape().getExtensionPointContainerFigure();
}
+ if (editPart instanceof IBorderItemEditPart) {
+ return getBorderedFigure().getBorderItemContainer();
+ }
return getContentPane();
}
@@ -217,8 +260,22 @@ public class UseCaseInPackageEditPart extends NamedElementEditPart {
* @generated
*/
@Override
+ protected void addBorderItem(IFigure borderItemContainer, IBorderItemEditPart borderItemEditPart) {
+ if (borderItemEditPart instanceof UseCaseInPackageFloatingLabelEditPart) {
+ IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
+ borderItemContainer.add(borderItemEditPart.getFigure(), locator);
+ } else
+ {
+ super.addBorderItem(borderItemContainer, borderItemEditPart);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
protected NodeFigure createNodePlate() {
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(140, 60);
+ RoundedRectangleNodePlateFigure result = new RoundedRectangleNodePlateFigure(140, 60);
return result;
}
@@ -231,7 +288,7 @@ public class UseCaseInPackageEditPart extends NamedElementEditPart {
* @generated
*/
@Override
- protected NodeFigure createNodeFigure() {
+ protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageFloatingLabelEditPart.java
new file mode 100644
index 00000000000..568d1d18e83
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageFloatingLabelEditPart.java
@@ -0,0 +1,861 @@
+/**
+ * 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.usecase.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.draw2d.geometry.Rectangle;
+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.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+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.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.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.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editparts.FloatingLabelEditPart;
+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.usecase.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.usecase.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.usecase.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 UseCaseInPackageFloatingLabelEditPart extends
+ FloatingLabelEditPart
+ implements ITextAwareEditPart, IBorderItemEditPart
+{
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6046;
+
+ /**
+ * @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
+ */
+ static {
+ registerSnapBackPosition(UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInPackageFloatingLabelEditPart.VISUAL_ID), new Point(0, 0));
+ }
+
+ /**
+ * @generated
+ */
+ public UseCaseInPackageFloatingLabelEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if (parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator) constraint;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public void refreshBounds() {
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+
+ /**
+ * @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
+ */
+ @Override
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ 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
+ */
+ @Override
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ 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>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor() {
+ if (getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IParser getParser() {
+ if (parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.UseCase_3012, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInPackageFloatingLabelEditPart.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() {
+
+ @Override
+ 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
+ */
+ @Override
+ 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(), configuration.getTextToEdit(resolveSemanticElement()),
+ 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() {
+ @Override
+ 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
+ */
+ @Override
+ 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) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if (maskLabelPolicy == null) {
+ View view = (View) getModel();
+ if (view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if (pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if (sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy) sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @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
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ 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
+ */
+ @Override
+ protected void removeSemanticListeners() {
+ if (parserElements != null) {
+ for (int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if (accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * 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() {
+
+ @Override
+ 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
+ */
+ @Override
+ protected void handleNotificationEvent(Notification event) {
+ 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
+ */
+ @Override
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageNameEditPart.java
index 7cb6c76d236..e670e6afae5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseInPackageNameEditPart.java
@@ -30,7 +30,6 @@ 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;
@@ -865,7 +864,7 @@ public class UseCaseInPackageNameEditPart extends PapyrusCompartmentEditPart imp
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseNameEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseNameEditPartTN.java
index af315721645..d55323e66a6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseNameEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCaseNameEditPartTN.java
@@ -30,7 +30,6 @@ 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;
@@ -865,7 +864,7 @@ public class UseCaseNameEditPartTN extends PapyrusCompartmentEditPart implements
* @generated
*/
protected void addOwnerElementListeners() {
- addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View) getParent().getModel()));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsEditPartTN.java
index a68809035ee..ce8cf69fb62 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsEditPartTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsEditPartTN.java
@@ -17,10 +17,12 @@ 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.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.diagram.ui.figures.ResizableCompartmentFigure;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
import org.eclipse.gmf.runtime.notation.NotationPackage;
@@ -81,12 +83,13 @@ public class UseCasePointsEditPartTN extends ResizeableListCompartmentEditPart {
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new UseCasePointsItemSemanticEditPolicyTN());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UseCasePointsCanonicalEditPolicyTN());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UseCasePointsCanonicalEditPolicyTN());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInComponentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInComponentEditPart.java
index b929e418bd8..4bf53622dff 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInComponentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInComponentEditPart.java
@@ -17,10 +17,12 @@ 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.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.diagram.ui.figures.ResizableCompartmentFigure;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
import org.eclipse.gmf.runtime.notation.NotationPackage;
@@ -81,12 +83,13 @@ public class UseCasePointsInComponentEditPart extends ResizeableListCompartmentE
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new UseCasePointsInComponentItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UseCasePointsInComponentCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UseCasePointsInComponentCanonicalEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInPackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInPackageEditPart.java
index 08b74959a3f..635cfc9722b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInPackageEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInPackageEditPart.java
@@ -17,10 +17,12 @@ 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.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.diagram.ui.figures.ResizableCompartmentFigure;
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
import org.eclipse.gmf.runtime.notation.NotationPackage;
@@ -81,12 +83,13 @@ public class UseCasePointsInPackageEditPart extends ResizeableListCompartmentEdi
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new UseCasePointsInPackageItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UseCasePointsInPackageCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UseCasePointsInPackageCanonicalEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInRectangleEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInRectangleEditPart.java
index 4cd759bceca..c621ae6537e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInRectangleEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/parts/UseCasePointsInRectangleEditPart.java
@@ -76,8 +76,8 @@ public class UseCasePointsInRectangleEditPart extends ResizeableListCompartmentE
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- //in Papyrus diagrams are not strongly synchronised
- //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UseCasePointsInRectangleCanonicalEditPolicy());
+ // in Papyrus diagrams are not strongly synchronised
+ // installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UseCasePointsInRectangleCanonicalEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/DefaultNamedElementItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/DefaultNamedElementItemSemanticEditPolicyTN.java
index ee28c14a737..ee04379aed2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/DefaultNamedElementItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/DefaultNamedElementItemSemanticEditPolicyTN.java
@@ -75,7 +75,7 @@ public class DefaultNamedElementItemSemanticEditPolicyTN extends UMLBaseItemSema
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ExtensionPointInRectangleItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ExtensionPointInRectangleItemSemanticEditPolicy.java
index 9dcf241b0d8..6c94fad354a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ExtensionPointInRectangleItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ExtensionPointInRectangleItemSemanticEditPolicy.java
@@ -51,7 +51,7 @@ public class ExtensionPointInRectangleItemSemanticEditPolicy extends UMLBaseItem
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ExtensionPointItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ExtensionPointItemSemanticEditPolicy.java
index 2671f5b332b..d73d02eab72 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ExtensionPointItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ExtensionPointItemSemanticEditPolicy.java
@@ -51,7 +51,7 @@ public class ExtensionPointItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
// 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 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));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseDiagramCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseDiagramCanonicalEditPolicy.java
index bf72f18f857..f22058c3f4e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseDiagramCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseDiagramCanonicalEditPolicy.java
@@ -39,7 +39,6 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.notation.Bounds;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/navigator/UMLDomainNavigatorContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/navigator/UMLDomainNavigatorContentProvider.java
index e45e4a85e3c..b35b4fac60f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/navigator/UMLDomainNavigatorContentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/navigator/UMLDomainNavigatorContentProvider.java
@@ -26,7 +26,6 @@ import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.papyrus.uml.diagram.usecase.part.UMLDiagramEditorPlugin;
import org.eclipse.ui.IMemento;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/navigator/UMLNavigatorContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/navigator/UMLNavigatorContentProvider.java
index 1cb86b076bc..e0708b81eb0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/navigator/UMLNavigatorContentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/navigator/UMLNavigatorContentProvider.java
@@ -26,7 +26,6 @@ import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseDiagramEditPart;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDiagramEditorUtil.java
index da498eb334a..316cc7e2f54 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDiagramEditorUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDiagramEditorUtil.java
@@ -48,7 +48,6 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart;
import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalViewer;
import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart;
import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
@@ -183,6 +182,7 @@ public class UMLDiagramEditorUtil {
* Create a new instance of domain element associated with canvas.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static Package createInitialModel() {
@@ -193,6 +193,7 @@ public class UMLDiagramEditorUtil {
* Store model element in the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static void attachModelToResource(Package model, Resource resource) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDiagramUpdater.java
index b29344ccbc5..9573d68993f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDiagramUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDiagramUpdater.java
@@ -101,7 +101,7 @@ public class UMLDiagramUpdater implements DiagramUpdater {
* @generated
*/
protected UMLDiagramUpdater() {
- //to prevent instantiation allowing the override
+ // to prevent instantiation allowing the override
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDocumentProvider.java
index de75706a3f2..7958a7b8ef9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDocumentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLDocumentProvider.java
@@ -554,7 +554,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi
info.stopResourceListening();
fireElementStateChanging(element);
try {
- monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); //"Saving diagram"
+ monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); // "Saving diagram"
for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
monitor.setTaskName(NLS.bind(
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLInitDiagramFileAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLInitDiagramFileAction.java
index d4fab58ac32..9839d5234db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLInitDiagramFileAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLInitDiagramFileAction.java
@@ -19,7 +19,6 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
-import org.eclipse.gmf.runtime.emf.core.GMFEditingDomainFactory;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLVisualIDRegistry.java
index d93a606d287..f9014b83a29 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLVisualIDRegistry.java
@@ -24,11 +24,14 @@ import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorAppliedStereotype
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorAsRectangleEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorAsRectangleNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorEditPartTN;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorFloatingLabelEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInComponentAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInComponentEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInComponentFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInComponentNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInPackageAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInPackageEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInPackageFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInPackageNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorQualifiedNameEditPartTN;
@@ -47,6 +50,7 @@ import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.CommentEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInComponentEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInComponentNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInPackageEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInPackageFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInPackageNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentUsecases2EditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentUsecases3EditPart;
@@ -89,6 +93,7 @@ import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ShortCutDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectClassifierEditPartTN;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectClassifierFloatingLabelEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectClassifierNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectComponentUsecasesEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UsageEditPart;
@@ -97,9 +102,12 @@ import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseAsRectangleEdit
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseAsRectangleNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseEditPartTN;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseFloatingLabelEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInComponentEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInComponentFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInComponentNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInPackageEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInPackageFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInPackageNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCasePointsEditPartTN;
@@ -413,6 +421,9 @@ public class UMLVisualIDRegistry {
if (ActorQualifiedNameEditPartTN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (ActorFloatingLabelEditPartTN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case ActorAsRectangleEditPartTN.VISUAL_ID:
if (ActorAsRectangleNameEditPartTN.VISUAL_ID == nodeVisualID) {
@@ -423,6 +434,9 @@ public class UMLVisualIDRegistry {
if (UseCaseNameEditPartTN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (UseCaseFloatingLabelEditPartTN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (UseCasePointsEditPartTN.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -439,6 +453,9 @@ public class UMLVisualIDRegistry {
if (SubjectClassifierNameEditPartTN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (SubjectClassifierFloatingLabelEditPartTN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (SubjectComponentUsecasesEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -478,6 +495,9 @@ public class UMLVisualIDRegistry {
if (UseCaseInComponentNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (UseCaseInComponentFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (UseCasePointsInComponentEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -513,6 +533,9 @@ public class UMLVisualIDRegistry {
if (ActorQualifiedNameInCEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (ActorInComponentFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case ConstraintInPackageEditPart.VISUAL_ID:
if (ConstraintInPackageNameEditPart.VISUAL_ID == nodeVisualID) {
@@ -532,11 +555,17 @@ public class UMLVisualIDRegistry {
if (ActorQualifiedNameInPEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (ActorInPackageFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case UseCaseInPackageEditPart.VISUAL_ID:
if (UseCaseInPackageNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (UseCaseInPackageFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (UseCasePointsInPackageEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -545,6 +574,9 @@ public class UMLVisualIDRegistry {
if (ComponentInPackageNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if (ComponentInPackageFloatingLabelEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if (ComponentUsecases3EditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -832,7 +864,7 @@ public class UMLVisualIDRegistry {
*/
public static boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
if (candidate == -1) {
- //unrecognized id is always bad
+ // unrecognized id is always bad
return false;
}
int basic = getNodeVisualID(containerView, domainElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/providers/UMLParserProvider.java
index 30e3bd0aed2..80fc0eedc2a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/providers/UMLParserProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/providers/UMLParserProvider.java
@@ -30,9 +30,12 @@ import org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotyp
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AbstractionNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorAppliedStereotypeEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorAsRectangleNameEditPartTN;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorFloatingLabelEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInComponentAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInComponentFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInComponentNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInPackageAppliedStereotypeEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInPackageFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInPackageNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AppliedStereotypeAbstractionEditPart;
@@ -43,6 +46,7 @@ import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.AssociationNameEditPar
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.CommentBodyEditPartCN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.CommentBodyEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInComponentNameEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInPackageFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInPackageNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ConstraintBodyEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ConstraintBodyInCEditPart;
@@ -64,10 +68,14 @@ import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.PackageNameEditPartCN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.PackageNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationNameEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectClassifierFloatingLabelEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectClassifierNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UsageNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseAsRectangleNameEditPartTN;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseFloatingLabelEditPartTN;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInComponentFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInComponentNameEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInPackageFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInPackageNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.parsers.MessageFormatParser;
@@ -116,6 +124,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser actorName_6048Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActorName_6048Parser() {
+ if (actorName_6048Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ actorName_6048Parser = parser;
+ }
+ return actorName_6048Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser actorName_5015Parser;
/**
@@ -154,6 +181,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser useCaseName_6038Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getUseCaseName_6038Parser() {
+ if (useCaseName_6038Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ useCaseName_6038Parser = parser;
+ }
+ return useCaseName_6038Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser useCaseName_5017Parser;
/**
@@ -192,6 +238,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser classifierName_6047Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getClassifierName_6047Parser() {
+ if (classifierName_6047Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ classifierName_6047Parser = parser;
+ }
+ return classifierName_6047Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser packageName_5025Parser;
/**
@@ -355,6 +420,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser useCaseName_6045Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getUseCaseName_6045Parser() {
+ if (useCaseName_6045Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ useCaseName_6045Parser = parser;
+ }
+ return useCaseName_6045Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser componentName_5030Parser;
/**
@@ -457,6 +541,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser actorName_6050Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActorName_6050Parser() {
+ if (actorName_6050Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ actorName_6050Parser = parser;
+ }
+ return actorName_6050Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser constraintName_5020Parser;
/**
@@ -525,6 +628,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser actorName_6049Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getActorName_6049Parser() {
+ if (actorName_6049Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ actorName_6049Parser = parser;
+ }
+ return actorName_6049Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser useCaseName_5022Parser;
/**
@@ -544,6 +666,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser useCaseName_6046Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getUseCaseName_6046Parser() {
+ if (useCaseName_6046Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ useCaseName_6046Parser = parser;
+ }
+ return useCaseName_6046Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser componentName_5023Parser;
/**
@@ -563,6 +704,25 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
/**
* @generated
*/
+ private IParser componentName_6051Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getComponentName_6051Parser() {
+ if (componentName_6051Parser == null) {
+ EAttribute[] features = new EAttribute[] {
+ UMLPackage.eINSTANCE.getNamedElement_Name()
+ };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ componentName_6051Parser = parser;
+ }
+ return componentName_6051Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser packageName_5024Parser;
/**
@@ -833,18 +993,24 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
return getActorName_5014Parser();
case ActorAppliedStereotypeEditPartTN.VISUAL_ID:
return getActorLabel_6029Parser();
+ case ActorFloatingLabelEditPartTN.VISUAL_ID:
+ return getActorName_6048Parser();
case ActorAsRectangleNameEditPartTN.VISUAL_ID:
return getActorName_5015Parser();
case UseCaseNameEditPartTN.VISUAL_ID:
return getUseCaseName_5016Parser();
+ case UseCaseFloatingLabelEditPartTN.VISUAL_ID:
+ return getUseCaseName_6038Parser();
case UseCaseAsRectangleNameEditPartTN.VISUAL_ID:
return getUseCaseName_5017Parser();
case SubjectClassifierNameEditPartTN.VISUAL_ID:
return getClassifierName_5019Parser();
+ case SubjectClassifierFloatingLabelEditPartTN.VISUAL_ID:
+ return getClassifierName_6047Parser();
case PackageNameEditPartTN.VISUAL_ID:
return getPackageName_5025Parser();
@@ -869,6 +1035,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
return getExtensionPoint_3008Parser();
case UseCaseInComponentNameEditPart.VISUAL_ID:
return getUseCaseName_5018Parser();
+ case UseCaseInComponentFloatingLabelEditPart.VISUAL_ID:
+ return getUseCaseName_6045Parser();
case ComponentInComponentNameEditPart.VISUAL_ID:
return getComponentName_5030Parser();
@@ -885,6 +1053,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
return getActorName_5031Parser();
case ActorInComponentAppliedStereotypeEditPart.VISUAL_ID:
return getActorLabel_6027Parser();
+ case ActorInComponentFloatingLabelEditPart.VISUAL_ID:
+ return getActorName_6050Parser();
case ConstraintInPackageNameEditPart.VISUAL_ID:
return getConstraintName_5020Parser();
@@ -895,12 +1065,18 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid
return getActorName_5021Parser();
case ActorInPackageAppliedStereotypeEditPart.VISUAL_ID:
return getActorLabel_6028Parser();
+ case ActorInPackageFloatingLabelEditPart.VISUAL_ID:
+ return getActorName_6049Parser();
case UseCaseInPackageNameEditPart.VISUAL_ID:
return getUseCaseName_5022Parser();
+ case UseCaseInPackageFloatingLabelEditPart.VISUAL_ID:
+ return getUseCaseName_6046Parser();
case ComponentInPackageNameEditPart.VISUAL_ID:
return getComponentName_5023Parser();
+ case ComponentInPackageFloatingLabelEditPart.VISUAL_ID:
+ return getComponentName_6051Parser();
case PackageNameEditPartCN.VISUAL_ID:
return getPackageName_5024Parser();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/providers/UMLViewProvider.java
index e4a292beb4c..4bc1a4e5e2f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/providers/UMLViewProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/providers/UMLViewProvider.java
@@ -63,11 +63,14 @@ import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorAppliedStereotype
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorAsRectangleEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorAsRectangleNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorEditPartTN;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorFloatingLabelEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInComponentAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInComponentEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInComponentFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInComponentNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInPackageAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInPackageEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInPackageFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorInPackageNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ActorQualifiedNameEditPartTN;
@@ -87,6 +90,7 @@ import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.CommentEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInComponentEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInComponentNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInPackageEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInPackageFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentInPackageNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentUsecases2EditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ComponentUsecases3EditPart;
@@ -130,6 +134,7 @@ import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.RealizationNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.ShortCutDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectClassifierEditPartTN;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectClassifierFloatingLabelEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectClassifierNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectComponentUsecasesEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UsageEditPart;
@@ -138,9 +143,12 @@ import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseAsRectangleEdit
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseAsRectangleNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseEditPartTN;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseFloatingLabelEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInComponentEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInComponentFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInComponentNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInPackageEditPart;
+import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInPackageFloatingLabelEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseInPackageNameEditPart;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCaseNameEditPartTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.UseCasePointsEditPartTN;
@@ -180,10 +188,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
*/
protected boolean provides(CreateViewForKindOperation op) {
/*
- if (op.getViewKind() == Node.class)
- return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
- if (op.getViewKind() == Edge.class)
- return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ * if (op.getViewKind() == Node.class)
+ * return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ * if (op.getViewKind() == Edge.class)
+ * return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
*/
// check Diagram Type should be the class diagram
@@ -209,7 +217,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* <p>
* This method can be overloaded when diagram editor inherits from another one, but should never be <code>null</code>
* </p>
- *
+ *
* @return the unique identifier of the diagram for which views are provided.
*/
return UseCaseDiagramEditPart.MODEL_ID;
@@ -311,7 +319,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
*/
protected boolean provides(CreateEdgeViewOperation op) {
IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- //RS: add code for extended types creation
+ // RS: add code for extended types creation
if (elementType instanceof IExtendedHintedElementType) {
IElementType closestNonExtendedType = ElementTypeUtils.getClosestDiagramType(elementType);
if (!UMLElementTypes.isKnownElementType(closestNonExtendedType) || (!(closestNonExtendedType instanceof IHintedType))) {
@@ -322,9 +330,9 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
return false; // foreign element type
}
}
- //if (!org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
- // return false; // foreign element type
- //}
+ // if (!org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof org.eclipse.gmf.runtime.emf.type.core.IHintedType))) {
+ // return false; // foreign element type
+ // }
// END R.S.
String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
if (elementTypeHint == null || (op.getSemanticHint() != null && !elementTypeHint.equals(op.getSemanticHint()))) {
@@ -481,6 +489,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Location location6037 = (Location) label6037.getLayoutConstraint();
location6037.setX(20);
location6037.setY(80);
+ Node label6048 = createLabel(node, UMLVisualIDRegistry.getType(ActorFloatingLabelEditPartTN.VISUAL_ID));
+ label6048.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6048 = (Location) label6048.getLayoutConstraint();
+ location6048.setX(0);
+ location6048.setY(5);
return node;
}
@@ -517,7 +530,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "UseCase");
Node label5016 = createLabel(node, UMLVisualIDRegistry.getType(UseCaseNameEditPartTN.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(UseCasePointsEditPartTN.VISUAL_ID), false, false, true, true);
+ Node label6038 = createLabel(node, UMLVisualIDRegistry.getType(UseCaseFloatingLabelEditPartTN.VISUAL_ID));
+ label6038.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6038 = (Location) label6038.getLayoutConstraint();
+ location6038.setX(0);
+ location6038.setY(5);
+ createCompartment(node, UMLVisualIDRegistry.getType(UseCasePointsEditPartTN.VISUAL_ID), true, false, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "UseCase");
return node;
}
@@ -557,7 +575,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Classifier");
Node label5019 = createLabel(node, UMLVisualIDRegistry.getType(SubjectClassifierNameEditPartTN.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(SubjectComponentUsecasesEditPart.VISUAL_ID), false, false, false, false);
+ Node label6047 = createLabel(node, UMLVisualIDRegistry.getType(SubjectClassifierFloatingLabelEditPartTN.VISUAL_ID));
+ label6047.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6047 = (Location) label6047.getLayoutConstraint();
+ location6047.setX(0);
+ location6047.setY(5);
+ createCompartment(node, UMLVisualIDRegistry.getType(SubjectComponentUsecasesEditPart.VISUAL_ID), true, false, false, false);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Classifier");
return node;
}
@@ -705,7 +728,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "UseCase");
Node label5018 = createLabel(node, UMLVisualIDRegistry.getType(UseCaseInComponentNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(UseCasePointsInComponentEditPart.VISUAL_ID), false, false, true, true);
+ Node label6045 = createLabel(node, UMLVisualIDRegistry.getType(UseCaseInComponentFloatingLabelEditPart.VISUAL_ID));
+ label6045.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6045 = (Location) label6045.getLayoutConstraint();
+ location6045.setX(0);
+ location6045.setY(5);
+ createCompartment(node, UMLVisualIDRegistry.getType(UseCasePointsInComponentEditPart.VISUAL_ID), true, false, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "UseCase");
return node;
}
@@ -793,6 +821,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Location location6041 = (Location) label6041.getLayoutConstraint();
location6041.setX(20);
location6041.setY(80);
+ Node label6050 = createLabel(node, UMLVisualIDRegistry.getType(ActorInComponentFloatingLabelEditPart.VISUAL_ID));
+ label6050.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6050 = (Location) label6050.getLayoutConstraint();
+ location6050.setX(0);
+ location6050.setY(5);
return node;
}
@@ -842,6 +875,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
Location location6040 = (Location) label6040.getLayoutConstraint();
location6040.setX(20);
location6040.setY(80);
+ Node label6049 = createLabel(node, UMLVisualIDRegistry.getType(ActorInPackageFloatingLabelEditPart.VISUAL_ID));
+ label6049.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6049 = (Location) label6049.getLayoutConstraint();
+ location6049.setX(0);
+ location6049.setY(5);
return node;
}
@@ -859,7 +897,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "UseCase");
Node label5022 = createLabel(node, UMLVisualIDRegistry.getType(UseCaseInPackageNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(UseCasePointsInPackageEditPart.VISUAL_ID), false, false, true, true);
+ Node label6046 = createLabel(node, UMLVisualIDRegistry.getType(UseCaseInPackageFloatingLabelEditPart.VISUAL_ID));
+ label6046.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6046 = (Location) label6046.getLayoutConstraint();
+ location6046.setX(0);
+ location6046.setY(5);
+ createCompartment(node, UMLVisualIDRegistry.getType(UseCasePointsInPackageEditPart.VISUAL_ID), true, false, true, true);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "UseCase");
return node;
}
@@ -878,7 +921,12 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Component");
Node label5023 = createLabel(node, UMLVisualIDRegistry.getType(ComponentInPackageNameEditPart.VISUAL_ID));
- createCompartment(node, UMLVisualIDRegistry.getType(ComponentUsecases3EditPart.VISUAL_ID), false, false, false, false);
+ Node label6051 = createLabel(node, UMLVisualIDRegistry.getType(ComponentInPackageFloatingLabelEditPart.VISUAL_ID));
+ label6051.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location6051 = (Location) label6051.getLayoutConstraint();
+ location6051.setX(0);
+ location6051.setY(5);
+ createCompartment(node, UMLVisualIDRegistry.getType(ComponentUsecases3EditPart.VISUAL_ID), true, false, false, false);
PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Component");
return node;
}
@@ -922,10 +970,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Include");
- //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);
- //}
+ // 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);
+ // }
Node label6006 = createLabel(edge, UMLVisualIDRegistry.getType(IncludeLink_fixedEditPart.VISUAL_ID));
label6006.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6006 = (Location) label6006.getLayoutConstraint();
@@ -960,10 +1008,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Extend");
- //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);
- //}
+ // 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);
+ // }
Node label6007 = createLabel(edge, UMLVisualIDRegistry.getType(ExtendsLink_fixedEditPart.VISUAL_ID));
label6007.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6007 = (Location) label6007.getLayoutConstraint();
@@ -998,10 +1046,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
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) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
+ // 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);
+ // }
Node label6032 = createLabel(edge, UMLVisualIDRegistry.getType(GeneralizationAppliedStereotypeEditPart.VISUAL_ID));
label6032.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6032 = (Location) label6032.getLayoutConstraint();
@@ -1031,10 +1079,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
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) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
+ // 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);
+ // }
Node label6008 = createLabel(edge, UMLVisualIDRegistry.getType(AssociationNameEditPart.VISUAL_ID));
label6008.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6008 = (Location) label6008.getLayoutConstraint();
@@ -1068,10 +1116,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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;
}
@@ -1095,10 +1143,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
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);
- //}
+ // 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);
+ // }
Node label6010 = createLabel(edge, UMLVisualIDRegistry.getType(DependencyNameEditPart.VISUAL_ID));
label6010.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6010 = (Location) label6010.getLayoutConstraint();
@@ -1132,10 +1180,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
// 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);
- //}
+ // 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;
}
@@ -1159,10 +1207,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Abstraction");
- //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);
- //}
+ // 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);
+ // }
Node label6011 = createLabel(edge, UMLVisualIDRegistry.getType(AbstractionNameEditPart.VISUAL_ID));
label6011.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6011 = (Location) label6011.getLayoutConstraint();
@@ -1197,10 +1245,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Usage");
- //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);
- //}
+ // 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);
+ // }
Node label6012 = createLabel(edge, UMLVisualIDRegistry.getType(UsageNameEditPart.VISUAL_ID));
label6012.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6012 = (Location) label6012.getLayoutConstraint();
@@ -1235,10 +1283,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Realization");
- //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);
- //}
+ // 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);
+ // }
Node label6015 = createLabel(edge, UMLVisualIDRegistry.getType(RealizationNameEditPart.VISUAL_ID));
label6015.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6015 = (Location) label6015.getLayoutConstraint();
@@ -1273,10 +1321,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "PackageMerge");
- //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);
- //}
+ // 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);
+ // }
Node label0 = createLabel(edge, UMLVisualIDRegistry.getType(AppliedStereotypePackageMergeEditPart.VISUAL_ID));
label0.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location0 = (Location) label0.getLayoutConstraint();
@@ -1306,10 +1354,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
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) {
- // org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
- //}
+ // 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);
+ // }
Node label6036 = createLabel(edge, UMLVisualIDRegistry.getType(PackageImportAppliedStereotypeEditPart.VISUAL_ID));
label6036.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
Location location6036 = (Location) label6036.getLayoutConstraint();
@@ -1346,9 +1394,9 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider {
* @generated
*/
protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) {
- //SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
- //rv.setShowTitle(showTitle);
- //rv.setCollapsed(isCollapsed);
+ // SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
+ // rv.setShowTitle(showTitle);
+ // rv.setCollapsed(isCollapsed);
Node rv;
if (canCollapse) {
rv = NotationFactory.eINSTANCE.createBasicCompartment();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/sheet/UMLPropertySection.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/sheet/UMLPropertySection.java
index e1dd45c20a1..3cca15f9e9e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/sheet/UMLPropertySection.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/sheet/UMLPropertySection.java
@@ -26,7 +26,7 @@ public class UMLPropertySection extends DefaultPropertySection implements IPrope
*/
@Override
protected Object transformSelection(Object selected) {
- selected = /*super.*/transformSelectionToDomain(selected);
+ selected = /* super. */transformSelectionToDomain(selected);
return selected;
}
}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/parameter/xtext/generator/UmlParameterGenerator.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/parameter/xtext/generator/UmlParameterGenerator.java
index 1e746d12e70..807ed6d8d5d 100644
--- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/parameter/xtext/generator/UmlParameterGenerator.java
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/parameter/xtext/generator/UmlParameterGenerator.java
@@ -1,14 +1,14 @@
-/**
- * generated by Xtext
- */
-package org.eclipse.papyrus.uml.textedit.parameter.xtext.generator;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.xtext.generator.IFileSystemAccess;
-import org.eclipse.xtext.generator.IGenerator;
-
-@SuppressWarnings("all")
-public class UmlParameterGenerator implements IGenerator {
- public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
- }
-}
+/**
+ * generated by Xtext
+ */
+package org.eclipse.papyrus.uml.textedit.parameter.xtext.generator;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.xtext.generator.IFileSystemAccess;
+import org.eclipse.xtext.generator.IGenerator;
+
+@SuppressWarnings("all")
+public class UmlParameterGenerator implements IGenerator {
+ public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
+ }
+}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ICustomAppearance.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ICustomAppearance.java
index 646da6f7480..e00aa2d3074 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ICustomAppearance.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ICustomAppearance.java
@@ -1,156 +1,162 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi SCHNEKENBURGER (CEA LIST) Remi.schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.tools.utils;
-
-import java.util.Arrays;
-import java.util.Collection;
-
-/**
- * Interface that manages display constants for custom labels (ex: operations label in a class
- * diagram).
- */
-public interface ICustomAppearance {
-
- /**
- * key for the appearance property of graph nodes.
- */
- // @unused
- public final static String CUSTOM_APPEARENCE_KEY = "custom_disp";
-
- // /////////////////////////////////////////////////////////////////////////
- // Style constants
- // /////////////////////////////////////////////////////////////////////////
- /**
- * Style constant for visibility display in labels.
- */
- public final static String DISP_VISIBILITY = "visibility";
-
- /**
- * Style constant for isDerive display in labels.
- */
- public final static String DISP_DERIVE = "derived";
-
- /**
- * Style constant for name display in labels.
- */
- public final static String DISP_NAME = "name";
-
- /**
- * Style constant for type display in labels.
- */
- public final static String DISP_TYPE = "type";
-
- /**
- * Style constant for multiplicity display in labels.
- */
- public final static String DISP_MULTIPLICITY = "multiplicity";
-
- /**
- * Style constant for default value display in labels.
- */
- public final static String DISP_DEFAULT_VALUE = "defaultValue";
-
- /**
- * Style constant for modifiers display in labels.
- */
- public final static String DISP_MODIFIERS = "modifiers";
-
- /** Style constant for carriage return in labels */
- public final static String DISP_MULTI_LINE = "multiline";
-
- /** Prefix used to distinguish parameter-specific values (e.g. name vs parametersName, for an Operation) */
- public final static String PARAMETERS_PREFIX = "parameters";
-
- /** Style constant for operation#parameter direction display in labels */
- public final String DISP_PARAMETER_DIRECTION = PARAMETERS_PREFIX + "Direction";
-
- /** Style constant for direction display in labels */
- public final String DISP_DIRECTION = "direction";
-
- /** Style constant for operation#parameter name display in labels */
- public final String DISP_PARAMETER_NAME = PARAMETERS_PREFIX + "Name";
-
- /** Style constant for operation#parameter type display in labels */
- public final String DISP_PARAMETER_TYPE = PARAMETERS_PREFIX + "Type";
-
- /** Style constant for operation#parameter multiplicity display in labels */
- public final String DISP_PARAMETER_MULTIPLICITY = PARAMETERS_PREFIX + "Multiplicity";
-
- /** Style constant for operation#parameter default value display in labels */
- public final String DISP_PARAMETER_DEFAULT = PARAMETERS_PREFIX + "Default";
-
- /** Style constant for operation#parameter modifiers display in labels */
- public final String DISP_PARAMETER_MODIFIERS = PARAMETERS_PREFIX + "Modifiers";
-
- /** Style constant for return type display in labels */
- public final String DISP_RT_TYPE = "returnType";
-
- /** Style constant for return multiplicity display in labels */
- public final String DISP_RT_MULTIPLICITY = "returnMultiplicity";
-
- /** Style constant for conjugated labels */
- public final String DISP_CONJUGATED = "conjugated";
-
- // /////////////////////////////////////////////////////////////////////////
- // UML DEFAULT DISPLAY
- // /////////////////////////////////////////////////////////////////////////
- /**
- * default uml property display in classes edit part.
- */
- public final static Collection<String> DEFAULT_UML_PROPERTY = Arrays.asList(DISP_VISIBILITY, DISP_DERIVE, DISP_NAME, DISP_TYPE, DISP_MULTIPLICITY);
-
- /**
- * default uml property display in classes edit part.
- */
- public final static Collection<String> DEFAULT_UML_ROLE = Arrays.asList(DISP_VISIBILITY, DISP_DERIVE, DISP_NAME, DISP_TYPE);
-
- /**
- * default uml operation display.
- */
- public final static Collection<String> DEFAULT_UML_OPERATION = Arrays.asList(DISP_VISIBILITY, DISP_NAME, DISP_PARAMETER_DIRECTION, DISP_PARAMETER_TYPE, DISP_RT_TYPE, DISP_PARAMETER_NAME);
-
- /**
- * default uml Property in composite diagrams.
- */
- // @unused
- public final static Collection<String> DEFAULT_UML_COMPO_PROPERTY = Arrays.asList(DISP_NAME, DISP_TYPE);
-
- /**
- * default uml Property in class diagrams as association ends.
- */
- // @unused
- public final static Collection<String> DEFAULT_UML_RELATIONEND_PROPERTY = Arrays.asList(DISP_VISIBILITY, DISP_DERIVE, DISP_NAME, DISP_MODIFIERS, DISP_MULTI_LINE);
-
- /**
- * default uml Port ins composite diagrams.
- */
- public final static Collection<String> DEFAULT_UML_PORT = Arrays.asList(DISP_VISIBILITY, DISP_DERIVE, DISP_NAME, DISP_TYPE, DISP_MULTIPLICITY, DISP_CONJUGATED);
-
- /**
- * default uml OpaqueAction in activity diagrams.
- */
- // @unused
- public final static Collection<String> DEFAULT_UML_OPAQUE_ACTION = Arrays.asList(DISP_NAME);
-
- /**
- * default uml Parameter in composite diagrams.
- */
- public final static Collection<String> DEFAULT_UML_PARAMETER = Arrays.asList(DISP_DIRECTION, DISP_NAME, DISP_TYPE);
-
- /**
- * default uml instancespecification .
- */
- public final static Collection<String> DEFAULT_UML_INSTANCESPECIFICATION = Arrays.asList(DISP_NAME, DISP_TYPE);
-
-}
+/*****************************************************************************
+ * Copyright (c) 2008 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi SCHNEKENBURGER (CEA LIST) Remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.tools.utils;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ * Interface that manages display constants for custom labels (ex: operations label in a class
+ * diagram).
+ */
+public interface ICustomAppearance {
+
+ /**
+ * key for the appearance property of graph nodes.
+ */
+ // @unused
+ public final static String CUSTOM_APPEARENCE_KEY = "custom_disp";
+
+ // /////////////////////////////////////////////////////////////////////////
+ // Style constants
+ // /////////////////////////////////////////////////////////////////////////
+ /**
+ * Style constant for visibility display in labels.
+ */
+ public final static String DISP_VISIBILITY = "visibility";
+
+ /**
+ * Style constant for isDerive display in labels.
+ */
+ public final static String DISP_DERIVE = "derived";
+
+ /**
+ * Style constant for name display in labels.
+ */
+ public final static String DISP_NAME = "name";
+
+ /**
+ * Style constant for type display in labels.
+ */
+ public final static String DISP_TYPE = "type";
+
+ /**
+ * Style constant for multiplicity display in labels.
+ */
+ public final static String DISP_MULTIPLICITY = "multiplicity";
+
+ /**
+ * Style constant for default value display in labels.
+ */
+ public final static String DISP_DEFAULT_VALUE = "defaultValue";
+
+ /**
+ * Style constant for modifiers display in labels.
+ */
+ public final static String DISP_MODIFIERS = "modifiers";
+
+ /** Style constant for carriage return in labels */
+ public final static String DISP_MULTI_LINE = "multiline";
+
+ /** Prefix used to distinguish parameter-specific values (e.g. name vs parametersName, for an Operation) */
+ public final static String PARAMETERS_PREFIX = "parameters";
+
+ /** Style constant for operation#parameter direction display in labels */
+ public final String DISP_PARAMETER_DIRECTION = PARAMETERS_PREFIX + "Direction";
+
+ /** Style constant for direction display in labels */
+ public final String DISP_DIRECTION = "direction";
+
+ /** Style constant for operation#parameter name display in labels */
+ public final String DISP_PARAMETER_NAME = PARAMETERS_PREFIX + "Name";
+
+ /** Style constant for operation#parameter type display in labels */
+ public final String DISP_PARAMETER_TYPE = PARAMETERS_PREFIX + "Type";
+
+ /** Style constant for operation#parameter multiplicity display in labels */
+ public final String DISP_PARAMETER_MULTIPLICITY = PARAMETERS_PREFIX + "Multiplicity";
+
+ /** Style constant for operation#parameter default value display in labels */
+ public final String DISP_PARAMETER_DEFAULT = PARAMETERS_PREFIX + "Default";
+
+ /** Style constant for operation#parameter modifiers display in labels */
+ public final String DISP_PARAMETER_MODIFIERS = PARAMETERS_PREFIX + "Modifiers";
+
+ /** Style constant for return type display in labels */
+ public final String DISP_RT_TYPE = "returnType";
+
+ /** Style constant for return multiplicity display in labels */
+ public final String DISP_RT_MULTIPLICITY = "returnMultiplicity";
+
+ /** Style constant for conjugated labels */
+ public final String DISP_CONJUGATED = "conjugated";
+
+ // /////////////////////////////////////////////////////////////////////////
+ // UML DEFAULT DISPLAY
+ // /////////////////////////////////////////////////////////////////////////
+ /**
+ * default uml property display in classes edit part.
+ */
+ public final static Collection<String> DEFAULT_UML_PROPERTY = Arrays.asList(DISP_VISIBILITY, DISP_DERIVE, DISP_NAME, DISP_TYPE, DISP_MULTIPLICITY);
+
+ /**
+ * default uml property display in for floating label edit part.
+ */
+ public final static Collection<String> DEFAULT_UML_FLOATING_LABEL = Arrays.asList(DISP_NAME);
+
+
+ /**
+ * default uml property display in classes edit part.
+ */
+ public final static Collection<String> DEFAULT_UML_ROLE = Arrays.asList(DISP_VISIBILITY, DISP_DERIVE, DISP_NAME, DISP_TYPE);
+
+ /**
+ * default uml operation display.
+ */
+ public final static Collection<String> DEFAULT_UML_OPERATION = Arrays.asList(DISP_VISIBILITY, DISP_NAME, DISP_PARAMETER_DIRECTION, DISP_PARAMETER_TYPE, DISP_RT_TYPE, DISP_PARAMETER_NAME);
+
+ /**
+ * default uml Property in composite diagrams.
+ */
+ // @unused
+ public final static Collection<String> DEFAULT_UML_COMPO_PROPERTY = Arrays.asList(DISP_NAME, DISP_TYPE);
+
+ /**
+ * default uml Property in class diagrams as association ends.
+ */
+ // @unused
+ public final static Collection<String> DEFAULT_UML_RELATIONEND_PROPERTY = Arrays.asList(DISP_VISIBILITY, DISP_DERIVE, DISP_NAME, DISP_MODIFIERS, DISP_MULTI_LINE);
+
+ /**
+ * default uml Port ins composite diagrams.
+ */
+ public final static Collection<String> DEFAULT_UML_PORT = Arrays.asList(DISP_VISIBILITY, DISP_DERIVE, DISP_NAME, DISP_TYPE, DISP_MULTIPLICITY, DISP_CONJUGATED);
+
+ /**
+ * default uml OpaqueAction in activity diagrams.
+ */
+ // @unused
+ public final static Collection<String> DEFAULT_UML_OPAQUE_ACTION = Arrays.asList(DISP_NAME);
+
+ /**
+ * default uml Parameter in composite diagrams.
+ */
+ public final static Collection<String> DEFAULT_UML_PARAMETER = Arrays.asList(DISP_DIRECTION, DISP_NAME, DISP_TYPE);
+
+ /**
+ * default uml instancespecification .
+ */
+ public final static Collection<String> DEFAULT_UML_INSTANCESPECIFICATION = Arrays.asList(DISP_NAME, DISP_TYPE);
+
+}

Back to the top